[Freeswitch-users] user dial-string getting variables
Antonio
asilva at wirelessmundi.com
Tue Mar 6 22:21:52 MSK 2012
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|[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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120306/ddea78dc/attachment.html
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list