[Freeswitch-users] Altering arbitrary channels

Isaac Jurado ijurado at econcept.es
Mon Jul 25 21:49:50 MSD 2011


On Mon, Jul 25, 2011 at 7:09 PM, Michael Collins <msc at freeswitch.org> wrote:
>
>>> <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.

I was actually asking about the parenthesis surrounding the API command
arguments.  Seems like the "bracket" term is a british dialect.  Sorry
for the confusing.

Anyway, from your "uuid_setvar" example below I can grasp that I should
better use parenthesis.

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

In all the examples I've seen, the use of "set" is something like:

<action application="set" data="foo=bar"/>

So I understood that the "foo=" part was mandatory.  Considering that
uuid_setvar seems to evaluate to nothing/null/empty, I was wondering if,
by writing something like the following:

<action application="set" data="foo=${uuid_setvar(${uuid} var_name
var_value)}"/>

What would be actually assigned to the "foo" variable.  But never mind,
if I can skip the "foo=" part it is enough for me.

Thank you very much.

-- 
Isaac Jurado
Internet Busines Solutions eConcept



More information about the FreeSWITCH-users mailing list