[Freeswitch-users] user dial-string getting variables
Michael Collins
msc at freeswitch.org
Tue Mar 13 19:17:13 MSK 2012
Sorry for the late reply...
Did you figure this one out yet? I think you can set the uuid of the b-leg
to a known value and then do a uuid_dump (or whatever) to check stuff on
that uuid:
<action application="set" data="new_uuid=${create_uuid}" inline="true"/>
<action application="bridge"
data="{origination_uuid=${new_uuid}[leg_timeout=60,var1=
555]user/100 at default.com <100 at commsmundi.com>|[leg_timeout=60,var1=777]user/
101 at default.com"/>
You will have ${new_uuid} on the A leg which contains the B leg uuid. I
suppose you could also skip the create_uuid/origination_uuid thing and just
use the value in ${signal_bond}. However, personally, I like creating the
uuid beforehand and knowing what the B leg's uuid will be.
In any case, you can do a uuid_dump XXXX where XXXX is whatever is in
${new_uuid} (or in ${signal_bond})
Let us know what happens.
-MC
On Tue, Mar 6, 2012 at 11:21 AM, Antonio <asilva at wirelessmundi.com> wrote:
> **
> Hi,
>
> Is it possible to access a variable that is passed per channel, in some
> script called in the directory.xml, parameter dial-string?
>
> I need to be able to set the var1 dynamically from the dialplan, so i can
> parse it from my lua script.
>
> Using the set command directly it will set the variables for both channels.
>
>
> For example, I dialed two users:
>
> <extension name="test" continue="false">
> <condition field="destination_number" expression=".*">
> <action application="bridge" data="[leg_timeout=60,var1=555]user/
> 100 at default.com <100 at commsmundi.com>|[leg_timeout=60,var1=777]user/
> 101 at default.com"/>
> </condition>
> </extension>
>
> then in my directory.xml, i have:
>
> <param name="dial-string" value="${lua(dial.lua ${dialed_user}
> ${dialed_domain} ${var1})}"/>
>
>
> So when the return dial-string for the user 100 has it's own var1, and
> when dial the user 102 has another value.
>
> I already try to uuid_dump in dial.lua, but i can't see the variable
> var1...
>
> Using this method, [var1=value], it will set the variable var1 for the B
> channel, but can i access it from the A channel? Or is there another way
> to set this variables before processing the dial-string...
>
> Thanks,
> António
>
>
> --
>
> Un cordial saludo / Best regards,
>
> _________________________
>
> António Silva
>
> E-mail:asilva at wirelessmundi.com
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
>
>
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> 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/20120313/e1bb5de6/attachment-0001.html
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list