<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.30.3">
</HEAD>
<BODY>
Hi,<BR>
<BR>
Is it possible to access a variable that is passed per channel, in some script called in the directory.xml, parameter dial-string?<BR>
<BR>
I need to be able to set the var1 dynamically from the dialplan, so i can parse it from my lua script.<BR>
<BR>
Using the set command directly it will set the variables for both channels.<BR>
<BR>
<BR>
For example, I dialed two users:<BR>
<BR>
<extension name="test" continue="false"><BR>
<condition field="destination_number" expression=".*"><BR>
<action application="bridge" data="[leg_timeout=60,var1=555]user/<A HREF="mailto:100@commsmundi.com">100@default.com</A>|[leg_timeout=60,var1=777]user/101@default.com"/><BR>
</condition><BR>
</extension><BR>
<BR>
then in my directory.xml, i have:<BR>
<BR>
<param name="dial-string" value="${lua(dial.lua ${dialed_user} ${dialed_domain} ${var1})}"/><BR>
<BR>
<BR>
So when the return dial-string for the user 100 has it's own var1, and when dial the user 102 has another value.<BR>
<BR>
I already try to uuid_dump in dial.lua, but i can't see the variable var1... <BR>
<BR>
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...<BR>
<BR>
Thanks,<BR>
António<BR>
<BR>
<BR>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
<PRE>
--
Un cordial saludo / Best regards,
_________________________
António Silva
E-mail:<A HREF="mailto:asilva@wirelessmundi.com">asilva@wirelessmundi.com</A>
</PRE>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>