<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">I agree it should work, I call Lua in incoming and outgoing dial plans using the literal CALLIN and others and it works fine.<div class=""> <action application="lua" data="TxCall.lua CALLIN”/></div><div class="">But I do not use a numeric literal. You should test with an alpha, if that works then there is an issue with numbers that should be reported in JIRA, then I would assign 3000 to a variable and pass that since I know that also works.</div><div class="">Mario G<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On May 22, 2018, at 8:53 AM, Alexandr Popov <<a href="mailto:alexandr.popov@iqoption.com" class="">alexandr.popov@iqoption.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">it must work</div><div class="gmail_extra"><br class=""><div class="gmail_quote">2018-05-22 18:00 GMT+03:00 Petr Both <span dir="ltr" class=""><<a href="mailto:both@antek.it" target="_blank" class="">both@antek.it</a>></span>:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#339999" bgcolor="#FFFFFF" class="">
    Hi all,<br class="">
    <br class="">
    I'm trying to call Lua script from the dialplan using the following
    section in etc/freeswitch/diaplan/<wbr class="">default.xml<br class="">
    <br class="">
       <extension name="New_Extension"><br class="">
          <condition field="destination_number"
    expression="^(3[0-9][0-9][0-9]<wbr class="">)$"><br class="">
           <action application="lua" data="TxCall.lua 3000"/><br class="">
          </condition><br class="">
        </extension><br class="">
    <br class="">
    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 class="">
    <br class="">
    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 class="">
    <br class="">
    Location in manual is <br class="">
    <a class="m_-2570833517083594231moz-txt-link-freetext" href="https://freeswitch.org/confluence/display/FREESWITCH/mod_lua" target="_blank">https://freeswitch.org/<wbr class="">confluence/display/FREESWITCH/<wbr class="">mod_lua</a><br class="">
    chapter "Sample Dialplan"<br class="">
    <br class="">
    Is there any special trick to deliver arguments into the script from
    Dialplan?<br class="">
    <br class="">
    Regards<br class="">
    Petr B.<br class="">
    <br class="">
    <br class="">
  </div>

<br class="">______________________________<wbr class="">______________________________<wbr class="">_____________<br class="">
Professional FreeSWITCH Consulting Services:<br class="">
<a href="mailto:consulting@freeswitch.org" class="">consulting@freeswitch.org</a><br class="">
<a href="http://www.freeswitchsolutions.com/" rel="noreferrer" target="_blank" class="">http://www.<wbr class="">freeswitchsolutions.com</a><br class="">
<br class="">
Official FreeSWITCH Sites<br class="">
<a href="http://www.freeswitch.org/" rel="noreferrer" target="_blank" class="">http://www.freeswitch.org</a><br class="">
<a href="http://confluence.freeswitch.org/" rel="noreferrer" target="_blank" class="">http://confluence.freeswitch.<wbr class="">org</a><br class="">
<a href="http://www.cluecon.com/" rel="noreferrer" target="_blank" class="">http://www.cluecon.com</a><br class="">
<br class="">
FreeSWITCH-users mailing list<br class="">
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" class="">FreeSWITCH-users@lists.<wbr class="">freeswitch.org</a><br class="">
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank" class="">http://lists.freeswitch.org/<wbr class="">mailman/listinfo/freeswitch-<wbr class="">users</a><br class="">
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank" class="">http://lists.<wbr class="">freeswitch.org/mailman/<wbr class="">options/freeswitch-users</a><br class="">
<a href="http://www.freeswitch.org/" rel="noreferrer" target="_blank" class="">http://www.freeswitch.org</a><br class=""></blockquote></div><br class=""></div>
_________________________________________________________________________<br class="">Professional FreeSWITCH Consulting Services:<br class=""><a href="mailto:consulting@freeswitch.org" class="">consulting@freeswitch.org</a><br class="">http://www.freeswitchsolutions.com<br class=""><br class="">Official FreeSWITCH Sites<br class="">http://www.freeswitch.org<br class="">http://confluence.freeswitch.org<br class="">http://www.cluecon.com<br class=""><br class="">FreeSWITCH-users mailing list<br class="">FreeSWITCH-users@lists.freeswitch.org<br class="">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users<br class="">UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<br class="">http://www.freeswitch.org</div></blockquote></div><br class=""></div></body></html>