<div dir="ltr">which leg do you want to see the variable and which leg do you need to execute the extension<br><br>normally execute_on_answer is not used to do any prolonged activities since it will indeed block the progress of the call until the application you specified is done so it's normally just used to set a variable or schedule a call hangup etc.<br>
<br><br>if you only want the execute_on_answer to happen on the b-leg you can do the following in your existing code.<br><br><span lang="EN-GB"> <action
application="export" data="nolocal:execute_on_answer=execute_extension
ONANSWER XML default"/><br>
</span><br><br>the nolocal: tells the system to only set the variables on the b-legs spawned from the current channel and never the A leg itself otherwise export will set the variable on both legs.<br><br>This is the same as using {<span lang="EN-GB">execute_on_answer='execute_extension
ONANSWER XML default</span>'}<br>at the beginning of your dial string.<br> <br>The variables you put in the [foo=bar] will only be set on the B-legs spawned off from that originate.<br><br>if you do it like i mentioned here you can eliminate all of the checks for a or b leg because you will be certain that the event is only triggered on the B legs<br>
<br><br><br><div class="gmail_quote">On Thu, Sep 25, 2008 at 1:57 PM, Jon Bruel <span dir="ltr"><<a href="mailto:jbr@consiglia.dk">jbr@consiglia.dk</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div link="blue" vlink="purple" lang="EN-US">
<div>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; line-height: 110%;" lang="EN-GB">Anthony, this is a simplified version
dialplan, just for an illustration of the previous posts:</span><span lang="EN-GB"> </span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; line-height: 110%;"><br>
file default.xml:<br>
</span></font><span lang="EN-GB"><div class="Ih2E3d"><?xml version="1.0"
encoding="utf-8"?><br>
<include><br></div>
<context name="default"><br>
<extension name="Local_Extension"><br>
<condition
field="destination_number" expression="^(10[01][0-9])$"><br>
<action
application="set" data="leg=a"/><br>
<action
application="set" data="destination=user/$<a href="mailto:1@10.3.1.11" target="_blank">1@10.3.1.11</a>"/><br>
<action
application="export" data="execute_on_answer=execute_extension
ONANSWER XML default"/><br>
<action application="bridge"
data=" ="[NEWVARIABLE=AAABBBCCC]${destination}"/><br>
</condition><br>
</extension><div class="Ih2E3d"><br>
<br>
<extension name="Call_Answered"><br>
<condition
field="destination_number" expression="^ONANSWER$"><br></div>
<action
application="execute_extension" data="INFO XML info"/><br>
</condition><br>
</extension><br>
</context><br>
</include></span></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; line-height: 110%;" lang="EN-GB">file info.xml:<div class="Ih2E3d"><br>
<xml version="1.0" encoding="utf-8"?><br>
<include><br></div>
<context name="info"><br>
<extension name="Call_Info"><br>
<condition
field="destination_number" expression="^INFO$" /><div class="Ih2E3d"><br>
</condition><br>
<condition
field="${leg}" expression="^a$"><br></div><div class="Ih2E3d">
<!--
We are in the b-leg--><br>
<anti-action
application="set"
data="On_Answer_Is_It_Then_Passed=${NEWVARIABLE}"/><br>
<anti-action
application="info"/><br>
</condition><br>
</extension><br>
</context><br>
</include></div></span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; line-height: 110%;" lang="EN-GB">Sorry about my inconsistent use of the
terms, the XML about should explain. /Jon</span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt; line-height: 110%;" lang="EN-GB"> </span></font></p>
</div>
</div>
<br>_______________________________________________<br>
Freeswitch-users mailing list<br>
<a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/">http://www.cluecon.com/</a><br>
<br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br><a href="http://iax:guest@conference.freeswitch.org/888">iax:guest@conference.freeswitch.org/888</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>pstn:213-799-1400<br>
</div>