Hmmm,<div>I wonder if the multiple syntax only made it into the execute_on_xxx vars. I&#39;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="&#39;courier new&#39;, monospace">&lt;action application=&quot;export&quot; data=&quot;nolocal:execute_on_answer=execute_extension do_stuff XML custom_context&quot;/&gt;</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="&#39;courier new&#39;, monospace">&lt;include&gt;</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">  &lt;context name=&quot;custom_context&quot;&gt;</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">    &lt;extension name=&quot;do my stuff&quot;&gt;</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">      &lt;condition field=&quot;destination_number&quot; expression=&quot;^do_stuff$&quot;&gt;</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">        &lt;action application=&quot;set&quot; data=&quot;res1=${<span class="Apple-style-span" style="background-color: rgb(255, 255, 255); ">sched_broadcast(+1 ${uuid} playback::sound1.wav aleg)</span>}&quot;/&gt;</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">        &lt;action application=&quot;set&quot; data=&quot;res2=${<span class="Apple-style-span" style="background-color: rgb(255, 255, 255); ">sched_hangup(+30 ${uuid})</span>}&quot;/&gt;</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">      &lt;/condition&gt;</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">    &lt;/extension&gt;</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">  &lt;/context&gt;</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">&lt;/include&gt;</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">&lt;<a href="mailto:lakersman2006@yahoo.com">lakersman2006@yahoo.com</a>&gt;</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>&lt;action application=&quot;export&quot; data=&quot;nolocal:api_on_answer_1=sched_broadcast(+1 ${uuid} playback::sound1.wav aleg), nolocal:api_on_answer_2=sched_hangup(+30 ${uuid})&quot;/&gt;</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>&lt;action application=&quot;export&quot; data=&quot;api_on_answer_1=sched_broadcast +1 ${uuid} 
playback::sound1.wav&quot;/&gt;
<br>&lt;action application=&quot;export&quot; data=&quot;api_on_answer_2=sched_hangup +15 ${uuid}&quot;/&gt;
</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 &lt;<a href="mailto:msc@freeswitch.org" target="_blank">msc@freeswitch.org</a>&gt;<br><b><span style="font-weight:bold">To:</span></b> FreeSWITCH Users Help &lt;<a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a>&gt;<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">&lt;<a rel="nofollow" href="mailto:lakersman2006@yahoo.com" target="_blank">lakersman2006@yahoo.com</a>&gt;</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 &quot;api_on_answer&quot; 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>