Index: pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c
===================================================================
--- pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c	(revision 3322)
+++ pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c	(revision 3323)
@@ -920,5 +920,5 @@
 
 	case OPT_ID:   /* id */
-	    if (pjsua_verify_sip_url(pj_optarg) != 0) {
+	    if (pjsua_verify_url(pj_optarg) != 0) {
 		PJ_LOG(1,(THIS_FILE, 
 			  "Error: invalid SIP URL '%s' "
@@ -1038,5 +1038,5 @@
 
 	case OPT_ADD_BUDDY: /* Add to buddy list. */
-	    if (pjsua_verify_sip_url(pj_optarg) != 0) {
+	    if (pjsua_verify_url(pj_optarg) != 0) {
 		PJ_LOG(1,(THIS_FILE, 
 			  "Error: invalid URL '%s' in "
@@ -1422,5 +1422,5 @@
 	pj_str_t uri_arg;
 
-	if (pjsua_verify_sip_url(argv[pj_optind]) != PJ_SUCCESS) {
+	if (pjsua_verify_url(argv[pj_optind]) != PJ_SUCCESS) {
 	    PJ_LOG(1,(THIS_FILE, "Invalid SIP URI %s", argv[pj_optind]));
 	    return -1;
@@ -3277,5 +3277,5 @@
 	pj_status_t status;
 
-	if ((status=pjsua_verify_sip_url(buf)) != PJ_SUCCESS) {
+	if ((status=pjsua_verify_url(buf)) != PJ_SUCCESS) {
 	    pjsua_perror(THIS_FILE, "Invalid URL", status);
 	    return;
@@ -3812,6 +3812,6 @@
 		    break;
 
-		if (pjsua_verify_sip_url(buf) != PJ_SUCCESS) {
-		    printf("Invalid SIP URI '%s'\n", buf);
+		if (pjsua_verify_url(buf) != PJ_SUCCESS) {
+		    printf("Invalid URI '%s'\n", buf);
 		    break;
 		}
Index: pjproject/trunk/pjsip-apps/src/samples/simple_pjsua.c
===================================================================
--- pjproject/trunk/pjsip-apps/src/samples/simple_pjsua.c	(revision 3322)
+++ pjproject/trunk/pjsip-apps/src/samples/simple_pjsua.c	(revision 3323)
@@ -118,5 +118,5 @@
     /* If argument is specified, it's got to be a valid SIP URL */
     if (argc > 1) {
-	status = pjsua_verify_sip_url(argv[1]);
+	status = pjsua_verify_url(argv[1]);
 	if (status != PJ_SUCCESS) error_exit("Invalid URL in argv", status);
     }
Index: pjproject/trunk/pjsip-apps/src/symbian_ua/ua.cpp
===================================================================
--- pjproject/trunk/pjsip-apps/src/symbian_ua/ua.cpp	(revision 3322)
+++ pjproject/trunk/pjsip-apps/src/symbian_ua/ua.cpp	(revision 3323)
@@ -734,5 +734,5 @@
 	}
 
-	if (pjsua_verify_sip_url(SIP_DST_URI) == PJ_SUCCESS) {
+	if (pjsua_verify_url(SIP_DST_URI) == PJ_SUCCESS) {
 		pj_str_t dst = pj_str(SIP_DST_URI);
 		pjsua_call_make_call(g_acc_id, &dst, 0, NULL,
Index: pjproject/trunk/pjsip-apps/src/symbian_ua_gui/src/symbian_ua.cpp
===================================================================
--- pjproject/trunk/pjsip-apps/src/symbian_ua_gui/src/symbian_ua.cpp	(revision 3322)
+++ pjproject/trunk/pjsip-apps/src/symbian_ua_gui/src/symbian_ua.cpp	(revision 3323)
@@ -483,5 +483,5 @@
 int symbian_ua_makecall(const char* dest_url)
 {
-    if (pjsua_verify_sip_url(dest_url) == PJ_SUCCESS) {
+    if (pjsua_verify_url(dest_url) == PJ_SUCCESS) {
 	    pj_str_t dst = pj_str((char*)dest_url);
 	    pjsua_call_make_call(g_acc_id, &dst, 0, NULL,
Index: pjproject/trunk/pjsip/include/pjsip/sip_errno.h
===================================================================
--- pjproject/trunk/pjsip/include/pjsip/sip_errno.h	(revision 3322)
+++ pjproject/trunk/pjsip/include/pjsip/sip_errno.h	(revision 3323)
@@ -97,4 +97,9 @@
  */
 #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 */
 
 
Index: pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h
===================================================================
--- pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h	(revision 3322)
+++ pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h	(revision 3323)
@@ -1541,11 +1541,27 @@
 /**
  * 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);
 
 
Index: pjproject/trunk/pjsip/src/pjsip/sip_errno.c
===================================================================
--- pjproject/trunk/pjsip/src/pjsip/sip_errno.c	(revision 3322)
+++ pjproject/trunk/pjsip/src/pjsip/sip_errno.c	(revision 3323)
@@ -40,4 +40,5 @@
     PJ_BUILD_ERR( PJSIP_ESHUTDOWN,	"SIP stack shutting down" ),
     PJ_BUILD_ERR( PJSIP_ENOTINITIALIZED,"SIP object is not initialized." ),
+    PJ_BUILD_ERR( PJSIP_ENOROUTESET,	"Missing route set (for tel: URI)" ),
 
     /* Messaging errors */
Index: pjproject/trunk/pjsip/src/pjsip/sip_util.c
===================================================================
--- pjproject/trunk/pjsip/src/pjsip/sip_util.c	(revision 3322)
+++ pjproject/trunk/pjsip/src/pjsip/sip_util.c	(revision 3323)
@@ -836,7 +836,10 @@
 	    pjsip_transport_get_flag_from_type(dest_info->type);
     } else {
+	/* Should have never reached here; app should have configured route
+	 * set when sending to tel: URI
         pj_assert(!"Unsupported URI scheme!");
+	 */
 	PJ_TODO(SUPPORT_REQUEST_ADDR_RESOLUTION_FOR_TEL_URI);
-	return PJSIP_EINVALIDSCHEME;
+	return PJSIP_ENOROUTESET;
     }
 
Index: pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c
===================================================================
--- pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c	(revision 3322)
+++ pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c	(revision 3323)
@@ -120,5 +120,5 @@
     pjsua_acc *acc = &pjsua_var.acc[acc_id];
     pjsip_name_addr *name_addr;
-    pjsip_sip_uri *sip_uri, *sip_reg_uri;
+    pjsip_sip_uri *sip_reg_uri;
     pj_status_t status;
     unsigned i;
@@ -137,16 +137,25 @@
 
     /* Local URI MUST be a SIP or SIPS: */
-
     if (!PJSIP_URI_SCHEME_IS_SIP(name_addr) && 
 	!PJSIP_URI_SCHEME_IS_SIPS(name_addr)) 
     {
-	pjsua_perror(THIS_FILE, "Invalid local URI", 
-		     PJSIP_EINVALIDSCHEME);
-	return PJSIP_EINVALIDSCHEME;
-    }
-
-
-    /* Get the SIP URI object: */
-    sip_uri = (pjsip_sip_uri*) pjsip_uri_get_uri(name_addr);
+	acc->display = name_addr->display;
+	acc->user_part = name_addr->display;
+	acc->srv_domain = pj_str("");
+	acc->srv_port = 0;
+    } else {
+	pjsip_sip_uri *sip_uri;
+
+	/* Get the SIP URI object: */
+	sip_uri = (pjsip_sip_uri*) pjsip_uri_get_uri(name_addr);
+
+	/* Save the user and domain part. These will be used when finding an
+	 * account for incoming requests.
+	 */
+	acc->display = name_addr->display;
+	acc->user_part = sip_uri->user;
+	acc->srv_domain = sip_uri->host;
+	acc->srv_port = 0;
+    }
 
 
@@ -177,12 +186,4 @@
 	sip_reg_uri = NULL;
     }
-
-    /* Save the user and domain part. These will be used when finding an 
-     * account for incoming requests.
-     */
-    acc->display = name_addr->display;
-    acc->user_part = sip_uri->user;
-    acc->srv_domain = sip_uri->host;
-    acc->srv_port = 0;
 
     if (sip_reg_uri) {
@@ -2161,5 +2162,5 @@
 	/* For non-SIP scheme, route set should be configured */
 	if (!PJSIP_URI_SCHEME_IS_SIP(uri) && !PJSIP_URI_SCHEME_IS_SIPS(uri))
-	    return PJSIP_EINVALIDREQURI;
+	    return PJSIP_ENOROUTESET;
 
 	sip_uri = (pjsip_sip_uri*)pjsip_uri_get_uri(uri);
Index: pjproject/trunk/pjsip/src/pjsua-lib/pjsua_core.c
===================================================================
--- pjproject/trunk/pjsip/src/pjsua-lib/pjsua_core.c	(revision 3322)
+++ pjproject/trunk/pjsip/src/pjsua-lib/pjsua_core.c	(revision 3323)
@@ -2405,9 +2405,8 @@
 }
 
-
-/*
- * Verify that valid SIP url is given.
- */
-PJ_DEF(pj_status_t) pjsua_verify_sip_url(const char *c_url)
+/*
+ * Verify that valid url is given.
+ */
+PJ_DEF(pj_status_t) pjsua_verify_url(const char *c_url)
 {
     pjsip_uri *p;
@@ -2416,8 +2415,32 @@
     int len = (c_url ? pj_ansi_strlen(c_url) : 0);
 
-    if (!len) return -1;
+    if (!len) return PJSIP_EINVALIDURI;
 
     pool = pj_pool_create(&pjsua_var.cp.factory, "check%p", 1024, 0, NULL);
-    if (!pool) return -1;
+    if (!pool) return PJ_ENOMEM;
+
+    url = (char*) pj_pool_alloc(pool, len+1);
+    pj_ansi_strcpy(url, c_url);
+
+    p = pjsip_parse_uri(pool, url, len, 0);
+
+    pj_pool_release(pool);
+    return p ? 0 : PJSIP_EINVALIDURI;
+}
+
+/*
+ * Verify that valid SIP url is given.
+ */
+PJ_DEF(pj_status_t) pjsua_verify_sip_url(const char *c_url)
+{
+    pjsip_uri *p;
+    pj_pool_t *pool;
+    char *url;
+    int len = (c_url ? pj_ansi_strlen(c_url) : 0);
+
+    if (!len) return PJSIP_EINVALIDURI;
+
+    pool = pj_pool_create(&pjsua_var.cp.factory, "check%p", 1024, 0, NULL);
+    if (!pool) return PJ_ENOMEM;
 
     url = (char*) pj_pool_alloc(pool, len+1);
@@ -2432,5 +2455,5 @@
 
     pj_pool_release(pool);
-    return p ? 0 : -1;
+    return p ? 0 : PJSIP_EINVALIDURI;
 }
 
Index: pjproject/trunk/tests/pjsua/scripts-call/400_tel_uri.py
===================================================================
--- pjproject/trunk/tests/pjsua/scripts-call/400_tel_uri.py	(revision 3323)
+++ pjproject/trunk/tests/pjsua/scripts-call/400_tel_uri.py	(revision 3323)
@@ -0,0 +1,12 @@
+# $Id$
+#
+from inc_cfg import *
+
+# Simple call
+test_param = TestParam(
+		"tel: URI in From",
+		[
+			InstanceParam("callee", "--null-audio --max-calls=1 --id tel:+111"),
+			InstanceParam("caller", "--null-audio --max-calls=1")
+		]
+		)
Index: pjproject/trunk/tests/pjsua/scripts-recvfrom/235_reg_good_tel_uri_enocredential.py
===================================================================
--- pjproject/trunk/tests/pjsua/scripts-recvfrom/235_reg_good_tel_uri_enocredential.py	(revision 3323)
+++ pjproject/trunk/tests/pjsua/scripts-recvfrom/235_reg_good_tel_uri_enocredential.py	(revision 3323)
@@ -0,0 +1,15 @@
+# $Id$
+import inc_sip as sip
+import inc_sdp as sdp
+
+pjsua = "--null-audio --id=tel:+12345 --registrar sip:127.0.0.1:$PORT"
+
+req1 = sip.RecvfromTransaction("", 401,
+				include=["REGISTER sip"], 
+				exclude=["Authorization"],
+				resp_hdr=["WWW-Authenticate: Digest realm=\"python\", nonce=\"1234\""],
+				expect="PJSIP_ENOCREDENTIAL"
+			  )
+
+recvfrom_cfg = sip.RecvfromCfg("Failed registration with tel: URI test",
+			       pjsua, [req1])
