Hmmm,
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:

<action application="export" data="nolocal:execute_on_answer=execute_extension do_stuff XML custom_context"/>

Then have a simple context. Add file conf/dialplan/custom.xml:
<include>
  <context name="custom_context">
    <extension name="do my stuff">
      <condition field="destination_number" expression="^do_stuff$">
        <action application="set" data="res1=${sched_broadcast(+1 ${uuid} playback::sound1.wav aleg)}"/>
        <action application="set" data="res2=${sched_hangup(+30 ${uuid})}"/>
      </condition>
    </extension>
  </context>
</include>

You can try that one for kicks while we research the api_on_answer question.

-MC

On Wed, Aug 17, 2011 at 4:39 PM, Sam <lakersman2006@yahoo.com> wrote:
MC,

I tried the syntax you suggested but I does not seem to be working

<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})"/>


I also tried this syntax and still no luck

<action application="export" data="api_on_answer_1=sched_broadcast +1 ${uuid}  playback::sound1.wav"/>
<action application="export" data="api_on_answer_2=sched_hangup +15 ${uuid}"/>


From: Michael Collins <msc@freeswitch.org>
To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org>
Sent: Wednesday, August 17, 2011 3:05 PM
Subject: Re: [Freeswitch-users] Simulating Asterisk dial(x:y:z)

You can do multiple api_on_answer calls by using a relatively new syntax:

api_on_answer_1=api(arg),api_on_answer_2=api2(arg2),api_on_answer_3=api3(arg3)

Same syntax applies to the execute_on_xxx variables.

-MC

On Wed, Aug 17, 2011 at 12:33 AM, Sam <lakersman2006@yahoo.com> wrote:
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?


FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org




FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org




FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org