Hi all,
From the diaplan, is it possible to set a variable in any other channel? That is, by specifying the channel UUID.
Thanks. -- Isaac Jurado Internet Busines Solutions eConcept
http://wiki.freeswitch.org/wiki/Mod_commands#uuid_setvar On 25 July 2011 10:17, Isaac Jurado <ijurado@econcept.es> wrote:
Hi all,
From the diaplan, is it possible to set a variable in any other channel? That is, by specifying the channel UUID.
Thanks.
-- 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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
On Mon, Jul 25, 2011 at 12:42 PM, Steven Ayre <steveayre@gmail.com> wrote:
For some reason I was failing to find that wiki page. I assumed that the dialplan actions were limited to what is offered by mod_dptools. Thank you very much :-) -- Isaac Jurado Internet Busines Solutions eConcept
I think it's the opposite - the ESL tools are limited by mod_commands, but in the dialplan you can do either. Dialplan tools act on the current channel without having to specify a UUID, the mod_commands you need to specify a uuid to use them. -Avi On Mon, Jul 25, 2011 at 2:00 PM, Isaac Jurado <ijurado@econcept.es> wrote:
On Mon, Jul 25, 2011 at 12:42 PM, Steven Ayre <steveayre@gmail.com> wrote:
For some reason I was failing to find that wiki page. I assumed that the dialplan actions were limited to what is offered by mod_dptools.
Thank you very much :-)
-- 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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Actually, using ESL you can use mod_dptools as well. Using SendMsg to queue the execution of an app into a specific channel. /Peter ________________________________________ Från: freeswitch-users-bounces@lists.freeswitch.org [freeswitch-users-bounces@lists.freeswitch.org] för Avi Marcus [avi@avimarcus.net] Skickat: den 25 juli 2011 13:10 Till: FreeSWITCH Users Help Ämne: Re: [Freeswitch-users] Altering arbitrary channels I think it's the opposite - the ESL tools are limited by mod_commands, but in the dialplan you can do either. Dialplan tools act on the current channel without having to specify a UUID, the mod_commands you need to specify a uuid to use them. -Avi On Mon, Jul 25, 2011 at 2:00 PM, Isaac Jurado <ijurado@econcept.es<mailto:ijurado@econcept.es>> wrote: On Mon, Jul 25, 2011 at 12:42 PM, Steven Ayre <steveayre@gmail.com<mailto:steveayre@gmail.com>> wrote:
For some reason I was failing to find that wiki page. I assumed that the dialplan actions were limited to what is offered by mod_dptools. Thank you very much :-) -- 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@lists.freeswitch.org<mailto: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 !DSPAM:4e2d504232761845388632!
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}"/> It doesn't have to be used with set, it can be used anywhere: <condition field="${api arg1 arg2 arg3}" expression="^true$"> <action application="bridge" data="${api arg1 arg2 arg3}"/> </condition> Any module can register either type of command... mod_dptools contains the generic dialplan apps mod_commands contains the generic API commands module-specific stuff will be registered by that module, e.g. the sofia API is registered by mod_sofia -Steve On 25 July 2011 12:00, Isaac Jurado <ijurado@econcept.es> wrote:
On Mon, Jul 25, 2011 at 12:42 PM, Steven Ayre <steveayre@gmail.com> wrote:
For some reason I was failing to find that wiki page. I assumed that the dialplan actions were limited to what is offered by mod_dptools.
Thank you very much :-)
-- 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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
On Mon, Jul 25, 2011 at 2:30 PM, Steven Ayre <steveayre@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? 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? Thanks again. -- Isaac Jurado Internet Busines Solutions eConcept
On Mon, Jul 25, 2011 at 8:47 AM, Isaac Jurado <ijurado@econcept.es> wrote:
On Mon, Jul 25, 2011 at 2:30 PM, Steven Ayre <steveayre@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
On Mon, Jul 25, 2011 at 7:09 PM, Michael Collins <msc@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
participants (5)
-
Avi Marcus
-
Isaac Jurado
-
Michael Collins
-
Peter Olsson
-
Steven Ayre