From 6e7c99b00209bbdb5403cec88f6b7ad01e25526c Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Tue, 28 Sep 2010 07:43:18 +0000 Subject: Closed #1139 (Support for tel: URI in PJSUA-LIB): - added new PJSUA API: pjsua_verify_url() which can be used for tel: URI - modified and tested according to spec - added new PJSIP error code, PJSIP_ENOROUTESET, to indicate that route set is needed to send to tel: URI - added couple of unit tests (we can't cover the whole tel: URI scenario yet) git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3323 74dad513-b988-da41-8d7b-12977e46ad98 --- pjsip/include/pjsip/sip_errno.h | 5 +++++ pjsip/include/pjsua-lib/pjsua.h | 18 +++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) (limited to 'pjsip/include') diff --git a/pjsip/include/pjsip/sip_errno.h b/pjsip/include/pjsip/sip_errno.h index 15f842a9..8e075f28 100644 --- a/pjsip/include/pjsip/sip_errno.h +++ b/pjsip/include/pjsip/sip_errno.h @@ -96,6 +96,11 @@ PJ_BEGIN_DECL * SIP object is not initialized. */ #define PJSIP_ENOTINITIALIZED (PJSIP_ERRNO_START_PJSIP + 4) /* 171004 */ +/** + * @hideinitializer + * Missing route set (for tel: URI) + */ +#define PJSIP_ENOROUTESET (PJSIP_ERRNO_START_PJSIP + 5) /* 171005 */ /************************************************************ diff --git a/pjsip/include/pjsua-lib/pjsua.h b/pjsip/include/pjsua-lib/pjsua.h index 3aa03b93..10e1b0fe 100644 --- a/pjsip/include/pjsua-lib/pjsua.h +++ b/pjsip/include/pjsua-lib/pjsua.h @@ -1540,15 +1540,31 @@ PJ_DECL(pj_status_t) pjsua_cancel_stun_resolution(void *token, /** * This is a utility function to verify that valid SIP url is given. If the - * URL is valid, PJ_SUCCESS will be returned. + * URL is a valid SIP/SIPS scheme, PJ_SUCCESS will be returned. * * @param url The URL, as NULL terminated string. * * @return PJ_SUCCESS on success, or the appropriate error code. + * + * @see pjsua_verify_url() */ PJ_DECL(pj_status_t) pjsua_verify_sip_url(const char *url); +/** + * This is a utility function to verify that valid URI is given. Unlike + * pjsua_verify_sip_url(), this function will return PJ_SUCCESS if tel: URI + * is given. + * + * @param url The URL, as NULL terminated string. + * + * @return PJ_SUCCESS on success, or the appropriate error code. + * + * @see pjsua_verify_sip_url() + */ +PJ_DECL(pj_status_t) pjsua_verify_url(const char *url); + + /** * Schedule a timer entry. Note that the timer callback may be executed * by different thread, depending on whether worker thread is enabled or -- cgit v1.2.3