[Freeswitch-users] Altering arbitrary channels
Michael Collins
msc at freeswitch.org
Mon Jul 25 21:09:43 MSD 2011
On Mon, Jul 25, 2011 at 8:47 AM, Isaac Jurado <ijurado at econcept.es> wrote:
> On Mon, Jul 25, 2011 at 2:30 PM, Steven Ayre <steveayre at gmail.com> wrote:
> >
> > There are 2 types of commands... dialplan apps (which execute on the
> > current channel) and API commands (which may or may not involve a
> > channel, when they do they always need its UUID).
> >
> > APIs are generally executed from the console but can be used in the
> > dialplan. It's a slightly different syntax though:
> > <action application="set" data="result=${api arg1 arg2 arg3}"/>
>
> The mod_commands wiki page shows a slightly different syntax:
>
> <action application="set" data="api_result=${sched_api(+5 none avmd
> ${uuid} start)}"/>
>
> Are the brackets optional?
>
Curly braces are not optional when using this syntax. When using the set dp
app and having ${api_name} in the data argument it will evaluate that
argument as an API command.
>
> And also, a command like "uuid_setvar" probably does not generate any
> value if it is evaluated like an expression. Which value would be
> assigned to the channel variable in such case?
>
Not sure what you mean. There's no technical reason why you couldn't do
this:
<action application="set" data="${uuid_setvar(${uuid} var_name
var_value)}"/>
However, obviously there's no need to use uuid_setvar on the current channel
since you can just use the set application.
-MC
>
> Thanks again.
>
> --
> Isaac Jurado
> Internet Busines Solutions eConcept
>
> _______________________________________________
> Join us at ClueCon 2011, Aug 9-11, Chicago
> http://www.cluecon.com 877-7-4ACLUE
>
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20110725/849fae50/attachment-0001.html
More information about the FreeSWITCH-users
mailing list