<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><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">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">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>