<div dir="ltr">Hello,<div><br></div><div><a href="https://wiki.freeswitch.org/wiki/Variable_sip_copy_custom_headers">https://wiki.freeswitch.org/wiki/Variable_sip_copy_custom_headers</a><br></div><div><br></div><div>I'm not sure but this link may help you.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 10, 2017 at 2:24 PM, Lợi Đặng <span dir="ltr"><<a href="mailto:loi.dangthanh@gmail.com" target="_blank">loi.dangthanh@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hi guys, I have a simple call scenario:<br></div><i>Caller -> FS -> Callee</i><br></div><div>Callee
 answer the call with an additional header called X-MyVar in 200 OK. I'm
 trying to store that value only for reporting via 
CHANNEL_HANGUP_COMPLETE - event socket.<br><br></div><div>I'm retrieving
 that custom header by looking at ${sip_rh_X-MyVar} via <i>execute_on_answer</i> on B leg, and it's fine. But I'm unable to export it
 to the A leg.<br></div><div>Here's my dialplan:<br><b><br><extension name="logvar"><br>    <condition field="destination_number" expression="^logvar$"><br>        <action application="export" data="myvar=${sip_rh_X-MyVar}"<wbr>/><br>    </condition><br></extension><br><br><action application="bridge" data="{execute_on_answer=<wbr>execute_extension logvar XML external}sofia/external/${<wbr>destination_number}"/></b><br></div><div><div><div><br></div><div>I don't want X-MyVar header to be passed to Caller, so I have to export the variable.<br></div><div>But
 when CHANNEL_HANGUP_COMPLETE fires, the variable <i>variable_myvar</i> present only in the outbound B leg. Look like my export did not work.<br></div><div>Note that I have some upstream exports from A leg to B leg in normal XML dialplan and they're all fine.<br><br>Below is my fs_cli log: 192.168.1.100 is my FS.<br><b>Dialplan: sofia/external/<a href="http://400@192.168.1.100:5060" target="_blank">400@192.168.1.<wbr>100:5060</a> Action export(myvar=${sip_rh_X-MyVar}<wbr>)<br>2017-08-10 17:27:29.958572 [NOTICE] switch_core_session.c:2913 Execute export(myvar=${sip_rh_X-MyVar}<wbr>)<br>EXECUTE sofia/external/<a href="http://400@192.168.1.100:5060" target="_blank">400@192.168.1.<wbr>100:5060</a> export(myvar=598c35116ee949.<wbr>25824485)<br>2017-08-10 17:27:29.958572 [DEBUG] switch_channel.c:1296 EXPORT (export_vars) [myvar]=[598c35116ee949.<wbr>25824485]</b><br><br></div><div>Not sure what I'm missing in this case.<br></div><div>Any help would be appreciated.<br></div><div>rgds,<br></div><div>Loi Dang<br></div></div></div></div>
<br>______________________________<wbr>______________________________<wbr>_____________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.<wbr>freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.<wbr>org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.<wbr>freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/<wbr>mailman/listinfo/freeswitch-<wbr>users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.<wbr>freeswitch.org/mailman/<wbr>options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">С уважением,<br>Владислав Захожай<br><br></div></div>
</div>