<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body text="#339999" bgcolor="#FFFFFF">
Hi all,<br>
<br>
I'm trying to call Lua script from the dialplan using the following
section in etc/freeswitch/diaplan/default.xml<br>
<br>
<extension name="New_Extension"><br>
<condition field="destination_number"
expression="^(3[0-9][0-9][0-9])$"><br>
<action application="lua" data="TxCall.lua 3000"/><br>
</condition><br>
</extension><br>
<br>
I.e. the TxCall.lua is called with argument 3000 and should be
available in lua script intself in argv[1] member of the argv field.
However trying to use argv[1] the lua reports nil in this member of
this field. argv[0] contains correctly name of the script but
argv[1] seems to be empty. Seems like arguments are not delivered to
lua script from dialplan.<br>
<br>
I have also found the description if FS manual where such usage of
dialplan is described but as I described above it doesn't work for
me.<br>
<br>
Location in manual is <br>
<a class="moz-txt-link-freetext" href="https://freeswitch.org/confluence/display/FREESWITCH/mod_lua">https://freeswitch.org/confluence/display/FREESWITCH/mod_lua</a><br>
chapter "Sample Dialplan"<br>
<br>
Is there any special trick to deliver arguments into the script from
Dialplan?<br>
<br>
Regards<br>
Petr B.<br>
<br>
<br>
</body>
</html>