Index: pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c
===================================================================
--- pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c	(revision 2300)
+++ pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c	(revision 2301)
@@ -278,4 +278,5 @@
     puts  ("  --norefersub        Suppress event subscription when transfering calls");
     puts  ("  --use-compact-form  Minimize SIP message size");
+    puts  ("  --no-force-lr       Allow strict-route to be used (i.e. do not force lr)");
 
     puts  ("");
@@ -482,5 +483,6 @@
 	   OPT_STDOUT_NO_BUF,
 #endif
-	   OPT_AUTO_UPDATE_NAT,OPT_USE_COMPACT_FORM,OPT_DIS_CODEC
+	   OPT_AUTO_UPDATE_NAT,OPT_USE_COMPACT_FORM,OPT_DIS_CODEC,
+	   OPT_NO_FORCE_LR
     };
     struct pj_getopt_option long_options[] = {
@@ -514,4 +516,5 @@
 	{ "auto-update-nat",	1, 0, OPT_AUTO_UPDATE_NAT},
         { "use-compact-form",	0, 0, OPT_USE_COMPACT_FORM},
+	{ "no-force-lr",0, 0, OPT_NO_FORCE_LR},
 	{ "realm",	1, 0, OPT_REALM},
 	{ "username",	1, 0, OPT_USERNAME},
@@ -838,4 +841,8 @@
 	    break;
 
+	case OPT_NO_FORCE_LR:
+	    cfg->cfg.force_lr = PJ_FALSE;
+	    break;
+
 	case OPT_NEXT_ACCOUNT: /* Add more account. */
 	    cfg->acc_cnt++;
@@ -1799,4 +1806,8 @@
     {
 	pj_strcat2(&cfg, "--use-compact-form\n");
+    }
+
+    if (config->cfg.force_lr) {
+	pj_strcat2(&cfg, "--no-force-lr\n");
     }
 
Index: pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h
===================================================================
--- pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h	(revision 2300)
+++ pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h	(revision 2301)
@@ -1116,4 +1116,14 @@
 
     /**
+     * Force loose-route to be used in all route/proxy URIs (outbound_proxy
+     * and account's proxy settings). When this setting is enabled, the
+     * library will check all the route/proxy URIs specified in the settings
+     * and append ";lr" parameter to the URI if the parameter is not present.
+     *
+     * Default: 1
+     */
+    pj_bool_t	    force_lr;
+
+    /**
      * Number of outbound proxies in the \a outbound_proxy array.
      */
Index: pjproject/trunk/pjsip/include/pjsua-lib/pjsua_internal.h
===================================================================
--- pjproject/trunk/pjsip/include/pjsua-lib/pjsua_internal.h	(revision 2300)
+++ pjproject/trunk/pjsip/include/pjsua-lib/pjsua_internal.h	(revision 2301)
@@ -343,4 +343,9 @@
 #endif
 
+/** 
+ * Normalize route URI (check for ";lr" and append one if it doesn't
+ * exist and pjsua_config.force_lr is set.
+ */
+pj_status_t normalize_route_uri(pj_pool_t *pool, pj_str_t *uri);
 
 /**
Index: pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c
===================================================================
--- pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c	(revision 2300)
+++ pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c	(revision 2301)
@@ -257,5 +257,5 @@
 {
     pjsua_acc *acc;
-    unsigned id;
+    unsigned i, id;
     pj_status_t status;
 
@@ -294,4 +294,11 @@
     {
 	pjsua_var.acc[id].cfg.reg_timeout = PJSUA_REG_INTERVAL;
+    }
+
+    /* Check the route URI's and force loose route if required */
+    for (i=0; i<acc->cfg.proxy_cnt; ++i) {
+	status = normalize_route_uri(acc->pool, &acc->cfg.proxy[i]);
+	if (status != PJ_SUCCESS)
+	    return status;
     }
 
Index: pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
===================================================================
--- pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c	(revision 2300)
+++ pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c	(revision 2301)
@@ -140,4 +140,12 @@
     /* Copy config */
     pjsua_config_dup(pjsua_var.pool, &pjsua_var.ua_cfg, cfg);
+
+    /* Check the route URI's and force loose route if required */
+    for (i=0; i<pjsua_var.ua_cfg.outbound_proxy_cnt; ++i) {
+	status = normalize_route_uri(pjsua_var.pool, 
+				     &pjsua_var.ua_cfg.outbound_proxy[i]);
+	if (status != PJ_SUCCESS)
+	    return status;
+    }
 
     /* Initialize invite session callback. */
Index: pjproject/trunk/pjsip/src/pjsua-lib/pjsua_core.c
===================================================================
--- pjproject/trunk/pjsip/src/pjsua-lib/pjsua_core.c	(revision 2300)
+++ pjproject/trunk/pjsip/src/pjsua-lib/pjsua_core.c	(revision 2301)
@@ -92,4 +92,5 @@
     cfg->thread_cnt = 1;
     cfg->nat_type_in_sdp = 1;
+    cfg->force_lr = PJ_TRUE;
 #if defined(PJMEDIA_HAS_SRTP) && (PJMEDIA_HAS_SRTP != 0)
     cfg->use_srtp = PJSUA_DEFAULT_USE_SRTP;
@@ -2077,4 +2078,66 @@
 
 
+/** 
+ * Normalize route URI (check for ";lr" and append one if it doesn't
+ * exist and pjsua_config.force_lr is set.
+ */
+pj_status_t normalize_route_uri(pj_pool_t *pool, pj_str_t *uri)
+{
+    pj_str_t tmp_uri;
+    pj_pool_t *tmp_pool;
+    pjsip_uri *uri_obj;
+    pjsip_sip_uri *sip_uri;
+
+    tmp_pool = pjsua_pool_create("tmplr%p", 512, 512);
+    if (!tmp_pool)
+	return PJ_ENOMEM;
+
+    pj_strdup_with_null(tmp_pool, &tmp_uri, uri);
+
+    uri_obj = pjsip_parse_uri(tmp_pool, tmp_uri.ptr, tmp_uri.slen, 0);
+    if (!uri_obj) {
+	PJ_LOG(1,(THIS_FILE, "Invalid route URI: %.*s", 
+		  (int)uri->slen, uri->ptr));
+	pj_pool_release(tmp_pool);
+	return PJSIP_EINVALIDURI;
+    }
+
+    if (!PJSIP_URI_SCHEME_IS_SIP(uri_obj) && 
+	!PJSIP_URI_SCHEME_IS_SIP(uri_obj))
+    {
+	PJ_LOG(1,(THIS_FILE, "Route URI must be SIP URI: %.*s", 
+		  (int)uri->slen, uri->ptr));
+	pj_pool_release(tmp_pool);
+	return PJSIP_EINVALIDSCHEME;
+    }
+
+    sip_uri = (pjsip_sip_uri*) pjsip_uri_get_uri(uri_obj);
+
+    /* Done if force_lr is disabled or if lr parameter is present */
+    if (!pjsua_var.ua_cfg.force_lr || sip_uri->lr_param) {
+	pj_pool_release(tmp_pool);
+	return PJ_SUCCESS;
+    }
+
+    /* Set lr param */
+    sip_uri->lr_param = 1;
+
+    /* Print the URI */
+    tmp_uri.ptr = (char*) pj_pool_alloc(tmp_pool, PJSIP_MAX_URL_SIZE);
+    tmp_uri.slen = pjsip_uri_print(PJSIP_URI_IN_ROUTING_HDR, uri_obj, 
+				   tmp_uri.ptr, PJSIP_MAX_URL_SIZE);
+    if (tmp_uri.slen < 1) {
+	PJ_LOG(1,(THIS_FILE, "Route URI is too long: %.*s", 
+		  (int)uri->slen, uri->ptr));
+	pj_pool_release(tmp_pool);
+	return PJSIP_EURITOOLONG;
+    }
+
+    /* Clone the URI */
+    pj_strdup_with_null(pool, uri, &tmp_uri);
+
+    return PJ_SUCCESS;
+}
+
 /*
  * This is a utility function to dump the stack states to log, using
