<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">sf_update.pl</a> but it is correct when calling <a href="http://sf_hangup.pl">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">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">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>