Hmmm,<div>I wonder if the multiple syntax only made it into the execute_on_xxx vars. I'll ask Brian about that. In the meantime it is possible to use execute_on_answer and execute an extension that in turn does all these API calls on your channel:</div>
<div><br></div><div><font class="Apple-style-span" face="'courier new', monospace"><action application="export" data="nolocal:execute_on_answer=execute_extension do_stuff XML custom_context"/></font></div>
<div><br></div><div>Then have a simple context. Add file conf/dialplan/custom.xml:</div><div><font class="Apple-style-span" face="'courier new', monospace"><include></font></div><div><font class="Apple-style-span" face="'courier new', monospace"> <context name="custom_context"></font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"> <extension name="do my stuff"></font></div><div><font class="Apple-style-span" face="'courier new', monospace"> <condition field="destination_number" expression="^do_stuff$"></font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"> <action application="set" data="res1=${<span class="Apple-style-span" style="background-color: rgb(255, 255, 255); ">sched_broadcast(+1 ${uuid} playback::sound1.wav aleg)</span>}"/></font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"> <action application="set" data="res2=${<span class="Apple-style-span" style="background-color: rgb(255, 255, 255); ">sched_hangup(+30 ${uuid})</span>}"/></font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"> </condition></font></div><div><font class="Apple-style-span" face="'courier new', monospace"> </extension></font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"> </context></font></div><div><font class="Apple-style-span" face="'courier new', monospace"></include></font></div><div><br>
</div><div>You can try that one for kicks while we research the api_on_answer question.</div><div><br></div><div>-MC<br><br><div class="gmail_quote">On Wed, Aug 17, 2011 at 4:39 PM, Sam <span dir="ltr"><<a href="mailto:lakersman2006@yahoo.com">lakersman2006@yahoo.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div style="color:#000;background-color:#fff;font-family:times new roman, new york, times, serif;font-size:12pt">
<div><span>MC,</span></div><div><br><span></span></div><div><span>I tried the syntax you suggested but I does not seem to be working</span></div><div><br><span></span></div><div><span><action application="export" data="nolocal:api_on_answer_1=sched_broadcast(+1 ${uuid} playback::sound1.wav aleg), nolocal:api_on_answer_2=sched_hangup(+30 ${uuid})"/></span></div>
<div><br></div><div><br><span></span></div><div><span>I also tried this syntax and still no luck</span></div><div><br><span></span></div><div><action application="export" data="api_on_answer_1=sched_broadcast +1 ${uuid}
playback::sound1.wav"/>
<br><action application="export" data="api_on_answer_2=sched_hangup +15 ${uuid}"/>
</div><div><br></div><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><font face="Arial" size="2"><hr size="1">
<b><span style="font-weight:bold">From:</span></b> Michael Collins <<a href="mailto:msc@freeswitch.org" target="_blank">msc@freeswitch.org</a>><br><b><span style="font-weight:bold">To:</span></b> FreeSWITCH Users Help <<a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a>><br>
<b><span style="font-weight:bold">Sent:</span></b> Wednesday, August 17, 2011 3:05 PM<br><b><span style="font-weight:bold">Subject:</span></b> Re: [Freeswitch-users] Simulating Asterisk dial(x:y:z)<br></font><div><div></div>
<div class="h5"><br><div>You can do multiple api_on_answer calls by using a relatively new syntax:<div><br></div><div>api_on_answer_1=api(arg),api_on_answer_2=api2(arg2),api_on_answer_3=api3(arg3)</div><div><br></div><div>
Same syntax applies to the execute_on_xxx variables.</div>
<div><br></div><div>-MC<br><br><div>
On Wed, Aug 17, 2011 at 12:33 AM, Sam <span dir="ltr"><<a rel="nofollow" href="mailto:lakersman2006@yahoo.com" target="_blank">lakersman2006@yahoo.com</a>></span> wrote:<br><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div style="color:#000;background-color:#fff;font-family:times new roman, new york, times, serif;font-size:12pt"><div>I want to simulate the Asterisk dial(x:y:z) app where (x=total call time, y=warning time, z=warning interval) in Freeswitch. I know it can be done with sched_hangup and sched_broadcast, my question is how can I call a series of "api_on_answer" comands to do it?<br>
</div></div></div><br><br>
FreeSWITCH-users mailing list<br>
<a rel="nofollow" href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a rel="nofollow" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a rel="nofollow" href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a rel="nofollow" href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>
</div><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" 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><br></div></div></div></div></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></div>