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@default.com|[leg_timeout=60,var1=777]user/101@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@wirelessmundi.com