I must have misunderstood something with (Bridge)<br><br>The same dialplan (context) was executed for the new outgoing leg.<br><br>I added this condition in the context / extension to stop the B Leg from processing the dial plan.<br>
<br><condition field="${direction}" expression="^outbound$" break="on-true"></condition><br><br>Strange I was not expecting Bridge to behave this way.<br><br><br><br><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Julien Chavanton <<a href="mailto:jchavanton@gmail.com">jchavanton@gmail.com</a>><br>To: <a href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a><br>
Cc: <br>Date: Wed, 6 Jun 2012 11:10:03 -0400<br>Subject: [Freeswitch-users] scope of channel variables, when are they accessible ?<br><div>I do not understand the scope of channel variables, when are they accessible ?</div>
<div><br></div><div>For example, I am looking for the sip username of the caller call leg.</div><div><br></div><div>In this example ${sip_auth_username} is empty when logging or calling <a href="http://sf_update.pl" target="_blank">sf_update.pl</a> but it is correct when calling <a href="http://sf_hangup.pl" target="_blank">sf_hangup.pl</a></div>
<div><br></div><div><include></div><div> <extension name="outdialing"></div><div> <condition field="destination_number" expression=".*)"></div><div> <action application="answer"/></div>
<div> <action application="log" data="VARIABLES [${sip_auth_username}][${Caller-Username}][${sip_from_user}][${effective_caller_id_name}][${effective_caller_id_number}]"/></div>
<div> <action application="perl" data="/var/fs_hook/<a href="http://sf_update.pl" target="_blank">sf_update.pl</a> ${sip_auth_username} ${sip_to_user}"/></div><div> <action application="set" data="api_hangup_hook=perl /var/fs_hook/<a href="http://sf_hangup.pl" target="_blank">sf_hangup.pl</a>
${sip_auth_username} ${sip_to_user} "/></div><div> <action application="bridge" data="{absolute_codec_string='PCMA,PCMU,G729',call_leg=B,session_in_hangup_hook=true'}sofia/gateway/XXXX/XXXX$1"/></div>
<div><br></div><div> </condition></div><div><div></extension></div><div></include></div></div>
<br><br></blockquote></div><br>