[Freeswitch-users] Simulating Asterisk dial(x:y:z)
Anthony Minessale
anthony.minessale at gmail.com
Thu Aug 18 20:34:33 MSD 2011
latest git all of the above should work including pushing many vars
into execute_on_answer/api_on_answer referenced as an array.
On Wed, Aug 17, 2011 at 7:11 PM, Michael Collins <msc at freeswitch.org> wrote:
> 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 at 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 at freeswitch.org>
>> To: FreeSWITCH Users Help <freeswitch-users at 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 at 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 at 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 at 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 at 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 at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
--
Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm
MSN:anthony_minessale at hotmail.com
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com
IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org
googletalk:conf+888 at conference.freeswitch.org
pstn:+19193869900
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list