[Freeswitch-users] Lua script with arguments called from Dialplan
alexandr.popov at iqoption.com
Tue May 22 15:53:00 UTC 2018
it must work
2018-05-22 18:00 GMT+03:00 Petr Both <both at antek.it>:
> Hi all,
> I'm trying to call Lua script from the dialplan using the following
> section in etc/freeswitch/diaplan/default.xml
> <extension name="New_Extension">
> <condition field="destination_number" expression="^(3[0-9][0-9][0-9]
> <action application="lua" data="TxCall.lua 3000"/>
> I.e. the TxCall.lua is called with argument 3000 and should be available
> in lua script intself in argv member of the argv field. However trying
> to use argv the lua reports nil in this member of this field. argv
> contains correctly name of the script but argv seems to be empty. Seems
> like arguments are not delivered to lua script from dialplan.
> 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.
> Location in manual is
> chapter "Sample Dialplan"
> Is there any special trick to deliver arguments into the script from
> Petr B.
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> Official FreeSWITCH Sites
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the FreeSWITCH-users