[asterisk-commits] mjordan: branch certified-13.1 r430093 - in /certified/branches/13.1: ./ cont...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Dec 24 09:27:24 CST 2014


Author: mjordan
Date: Wed Dec 24 09:27:22 2014
New Revision: 430093

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=430093
Log:
res_pjsip: Backport missing commits for user_eq_phone

This backports the following from trunk, which were missed:

r427257 | file | 2014-11-04 16:31:16 -0600 (Tue, 04 Nov 2014) | 2 lines

res_pjsip: Allow + at the beginning of a phone number when user_eq_phone is enabled.

r427259 | file | 2014-11-04 16:51:32 -0600 (Tue, 04 Nov 2014) | 2 lines

res_pjsip: Apply the 'user_eq_phone' setting to the To header as well.

It also adds the Alembic script for the option.
........

Merged revisions 430092 from http://svn.asterisk.org/svn/asterisk/branches/13

Added:
    certified/branches/13.1/contrib/ast-db-manage/config/versions/371a3bf4143e_add_user_eq_phone_option_to_pjsip.py
      - copied unchanged from r430092, branches/13/contrib/ast-db-manage/config/versions/371a3bf4143e_add_user_eq_phone_option_to_pjsip.py
Modified:
    certified/branches/13.1/   (props changed)
    certified/branches/13.1/res/res_pjsip.c

Propchange: certified/branches/13.1/
------------------------------------------------------------------------------
--- branch-13-merged (original)
+++ branch-13-merged Wed Dec 24 09:27:22 2014
@@ -1,1 +1,1 @@
-/branches/13:429128-429222,429224-429246,429352,429407,429409,429433,429477,429497,429540,429571,429739,429741,429761,429829,430010,430034,430083-430084
+/branches/13:429128-429222,429224-429246,429352,429407,429409,429433,429477,429497,429540,429571,429739,429741,429761,429829,430010,430034,430083-430084,430092

Modified: certified/branches/13.1/res/res_pjsip.c
URL: http://svnview.digium.com/svn/asterisk/certified/branches/13.1/res/res_pjsip.c?view=diff&rev=430093&r1=430092&r2=430093
==============================================================================
--- certified/branches/13.1/res/res_pjsip.c (original)
+++ certified/branches/13.1/res/res_pjsip.c Wed Dec 24 09:27:22 2014
@@ -2155,6 +2155,10 @@
 		return;
 	}
 
+	if (pj_strbuf(&sip_uri->user)[0] == '+') {
+		i = 1;
+	}
+
 	/* Test URI user against allowed characters in AST_DIGIT_ANY */
 	for (; i < pj_strlen(&sip_uri->user); i++) {
 		if (!strchr(AST_DIGIT_ANYNUM, pj_strbuf(&sip_uri->user)[i])) {
@@ -2221,6 +2225,7 @@
 
 	/* Add the user=phone parameter if applicable */
 	ast_sip_add_usereqphone(endpoint, dlg->pool, dlg->target);
+	ast_sip_add_usereqphone(endpoint, dlg->pool, dlg->remote.info->uri);
 
 	/* We have to temporarily bump up the sess_count here so the dialog is not prematurely destroyed */
 	dlg->sess_count++;




More information about the asterisk-commits mailing list