[svn-commits] mmichelson: trunk r421567 - in /trunk: ./ channels/chan_pjsip.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Aug 20 15:04:45 CDT 2014


Author: mmichelson
Date: Wed Aug 20 15:04:43 2014
New Revision: 421567

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=421567
Log:
Move evaluation of set_var options in pjsip to the end of channel initialization.

This allows for set_var to override certain defaults such as caller ID and codec
values. This also fixes a test suite regression. The "set_var" test suite test attempted
to use set_var to override caller ID, but a recent change caused that to no longer work.
........

Merged revisions 421565 from http://svn.asterisk.org/svn/asterisk/branches/12
........

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

Modified:
    trunk/   (props changed)
    trunk/channels/chan_pjsip.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-13-merged' - no diff available.

Modified: trunk/channels/chan_pjsip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_pjsip.c?view=diff&rev=421567&r1=421566&r2=421567
==============================================================================
--- trunk/channels/chan_pjsip.c (original)
+++ trunk/channels/chan_pjsip.c Wed Aug 20 15:04:43 2014
@@ -402,12 +402,6 @@
 		return NULL;
 	}
 
-	for (var = session->endpoint->channel_vars; var; var = var->next) {
-		char buf[512];
-		pbx_builtin_setvar_helper(chan, var->name, ast_get_encoded_str(
-						  var->value, buf, sizeof(buf)));
-	}
-
 	ast_channel_stage_snapshot(chan);
 
 	ast_channel_tech_pvt_set(chan, channel);
@@ -457,6 +451,12 @@
 			ast_log(LOG_ERROR, "Unknown country code '%s' for tonezone. Check indications.conf for available country codes.\n", session->endpoint->zone);
 		}
 		ast_channel_zone_set(chan, zone);
+	}
+
+	for (var = session->endpoint->channel_vars; var; var = var->next) {
+		char buf[512];
+		pbx_builtin_setvar_helper(chan, var->name, ast_get_encoded_str(
+						  var->value, buf, sizeof(buf)));
 	}
 
 	ast_channel_stage_snapshot_done(chan);




More information about the svn-commits mailing list