[svn-commits] mmichelson: branch 13 r421566 - in /branches/13: ./ channels/chan_pjsip.c

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


Author: mmichelson
Date: Wed Aug 20 15:04:08 2014
New Revision: 421566

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=421566
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

Modified:
    branches/13/   (props changed)
    branches/13/channels/chan_pjsip.c

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

Modified: branches/13/channels/chan_pjsip.c
URL: http://svnview.digium.com/svn/asterisk/branches/13/channels/chan_pjsip.c?view=diff&rev=421566&r1=421565&r2=421566
==============================================================================
--- branches/13/channels/chan_pjsip.c (original)
+++ branches/13/channels/chan_pjsip.c Wed Aug 20 15:04:08 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