<div dir="ltr"><div><div><div>Hi Jurijs, your answer really helps, thanks a lot.<br>My problem is solved with below call from the dialplan got executed on answer.<br><b>${uuid_setvar(${signal_bond} myvar ${sip_rh_X-MyVar})}<br></b></div><br>And btw, I find an alternative way in the meantime with using <b>bridge_export</b> instead of <b>export.<br><br></b></div>rgds,<br></div>Loi Dang<br><div><div><div><div><div dir="ltr"><br></div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Aug 11, 2017 at 1:25 PM Jurijs Ivolga <<a href="mailto:jurijs.ivolga@gmail.com">jurijs.ivolga@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hi Loi,<br><br></div>You can try to use uuid_setvar and set a variable for specific call.<br><br><a href="https://freeswitch.org/confluence/display/FREESWITCH/Channel+Variables#ChannelVariables-AccessingChannelVariablesinOtherEnvironments" target="_blank">https://freeswitch.org/confluence/display/FREESWITCH/Channel+Variables#ChannelVariables-AccessingChannelVariablesinOtherEnvironments</a><br><br></div>I hope this will help.<br><br></div>With kind regards,<br></div><div class="gmail_extra"><br clear="all"><div><div class="m_-6571935501056325502gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Jurijs<br></div></div></div></div><div class="gmail_extra">
<br><div class="gmail_quote">On Thu, Aug 10, 2017 at 3:40 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">Hi <span style="font-size:12.8px;font-weight:bold;white-space:nowrap">Vladyslav, </span><div><span style="font-size:12.8px;white-space:nowrap">many thanks for your reply, but I don't want the Caller receive my custom header(s), so I intend to disable the copying.</span></div><div><span style="font-size:12.8px;white-space:nowrap"><br></span></div><div><span style="font-size:12.8px;white-space:nowrap">I just want to export a flag variable to the channel so that I could retrieve it later.</span></div><div><br></div><div>rgds,</div><div>Loi Dang</div></div><div class="gmail_extra"><br clear="all"><div><div class="m_-6571935501056325502m_856268648155098924gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div>Loi Dang Thanh<br></div>Phone : +84. 1224.735.448<br></div>Email : <a href="mailto:loi.dangthanh@gmail.com" target="_blank">loi.dangthanh@gmail.com</a><br></div></div></div></div></div></div></div><div><div class="m_-6571935501056325502h5">
<br><div class="gmail_quote">On Thu, Aug 10, 2017 at 6:32 PM, Vladyslav Zakhozhai <span dir="ltr"><<a href="mailto:v.zakhozhai@gmail.com" target="_blank">v.zakhozhai@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">Hello,<div><br></div><div><a href="https://wiki.freeswitch.org/wiki/Variable_sip_copy_custom_headers" target="_blank">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"><div><div class="m_-6571935501056325502m_856268648155098924h5">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></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_-6571935501056325502m_856268648155098924h5"><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}"/><br>    </condition><br></extension><br><br><action application="bridge" data="{execute_on_answer=execute_extension logvar XML external}sofia/external/${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.100:5060</a> Action export(myvar=${sip_rh_X-MyVar})<br>2017-08-10 17:27:29.958572 [NOTICE] switch_core_session.c:2913 Execute export(myvar=${sip_rh_X-MyVar})<br>EXECUTE sofia/external/<a href="http://400@192.168.1.100:5060" target="_blank">400@192.168.1.100:5060</a> export(myvar=598c35116ee949.25824485)<br>2017-08-10 17:27:29.958572 [DEBUG] switch_channel.c:1296 EXPORT (export_vars) [myvar]=[598c35116ee949.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></div></div>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.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.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" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><span class="m_-6571935501056325502m_856268648155098924HOEnZb"><font color="#888888"><br></font></span></blockquote></div><span class="m_-6571935501056325502m_856268648155098924HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div class="m_-6571935501056325502m_856268648155098924m_-7790628272656558447gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">С уважением,<br>Владислав Захожай<br><br></div></div>
</font></span></div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.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.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" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br></div></div></div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.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.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" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br></div>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.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.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" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a></blockquote></div>