<div dir="ltr">it must work</div><div class="gmail_extra"><br><div class="gmail_quote">2018-05-22 18:00 GMT+03:00 Petr Both <span dir="ltr"><<a href="mailto:both@antek.it" target="_blank">both@antek.it</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div 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/<wbr>default.xml<br>
<br>
<extension name="New_Extension"><br>
<condition field="destination_number"
expression="^(3[0-9][0-9][0-9]<wbr>)$"><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="m_-2570833517083594231moz-txt-link-freetext" href="https://freeswitch.org/confluence/display/FREESWITCH/mod_lua" target="_blank">https://freeswitch.org/<wbr>confluence/display/FREESWITCH/<wbr>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>
</div>
<br>______________________________<wbr>______________________________<wbr>_____________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.<wbr>freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.<wbr>org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.<wbr>freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/<wbr>mailman/listinfo/freeswitch-<wbr>users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.<wbr>freeswitch.org/mailman/<wbr>options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br></div>