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>&lt;condition field=&quot;${direction}&quot; expression=&quot;^outbound$&quot; break=&quot;on-true&quot;&gt;&lt;/condition&gt;<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 &lt;<a href="mailto:jchavanton@gmail.com">jchavanton@gmail.com</a>&gt;<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>&lt;include&gt;</div><div>        &lt;extension name=&quot;outdialing&quot;&gt;</div><div>                &lt;condition field=&quot;destination_number&quot; expression=&quot;.*)&quot;&gt;</div><div>                        &lt;action application=&quot;answer&quot;/&gt;</div>

<div>                        &lt;action application=&quot;log&quot; data=&quot;VARIABLES [${sip_auth_username}][${Caller-Username}][${sip_from_user}][${effective_caller_id_name}][${effective_caller_id_number}]&quot;/&gt;</div>

<div>                        &lt;action application=&quot;perl&quot; data=&quot;/var/fs_hook/<a href="http://sf_update.pl" target="_blank">sf_update.pl</a> ${sip_auth_username} ${sip_to_user}&quot;/&gt;</div><div>                        &lt;action application=&quot;set&quot; data=&quot;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} &quot;/&gt;</div><div>                        &lt;action application=&quot;bridge&quot;  data=&quot;{absolute_codec_string=&#39;PCMA,PCMU,G729&#39;,call_leg=B,session_in_hangup_hook=true&#39;}sofia/gateway/XXXX/XXXX$1&quot;/&gt;</div>

<div><br></div><div>                 &lt;/condition&gt;</div><div><div>&lt;/extension&gt;</div><div>&lt;/include&gt;</div></div>
<br><br></blockquote></div><br>