[asterisk-commits] kpfleming: branch 1.4 r65683 - in /branches/1.4: ./ channels/chan_sip.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed May 23 13:51:56 MST 2007


Author: kpfleming
Date: Wed May 23 15:51:56 2007
New Revision: 65683

URL: http://svn.digium.com/view/asterisk?view=rev&rev=65683
Log:
Merged revisions 65682 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r65682 | kpfleming | 2007-05-23 16:46:22 -0400 (Wed, 23 May 2007) | 2 lines

ensure that variables are set on a newly created channel before we start a PBX on it

........

Modified:
    branches/1.4/   (props changed)
    branches/1.4/channels/chan_sip.c

Propchange: branches/1.4/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Modified: branches/1.4/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_sip.c?view=diff&rev=65683&r1=65682&r2=65683
==============================================================================
--- branches/1.4/channels/chan_sip.c (original)
+++ branches/1.4/channels/chan_sip.c Wed May 23 15:51:56 2007
@@ -3932,15 +3932,17 @@
 		pbx_builtin_setvar_helper(tmp, "SIPCALLID", i->callid);
 	if (i->rtp)
 		ast_jb_configure(tmp, &global_jbconf);
+
+	/* Set channel variables for this call from configuration */
+	for (v = i->chanvars ; v ; v = v->next)
+		pbx_builtin_setvar_helper(tmp, v->name, v->value);
+
 	if (state != AST_STATE_DOWN && ast_pbx_start(tmp)) {
 		ast_log(LOG_WARNING, "Unable to start PBX on %s\n", tmp->name);
 		tmp->hangupcause = AST_CAUSE_SWITCH_CONGESTION;
 		ast_hangup(tmp);
 		tmp = NULL;
 	}
-	/* Set channel variables for this call from configuration */
-	for (v = i->chanvars ; v ; v = v->next)
-		pbx_builtin_setvar_helper(tmp,v->name,v->value);
 
 	if (!ast_test_flag(&i->flags[0], SIP_NO_HISTORY))
 		append_history(i, "NewChan", "Channel %s - from %s", tmp->name, i->callid);



More information about the asterisk-commits mailing list