I just finished playing with it. You can just do this: <action application="bind_digit_action" data="my_digits,0,exec:lua,your_script.lua,param1 param2 param3"/> On Fri, May 8, 2015 at 1:05 PM, Aqs Younas <aqsyounas@gmail.com> wrote:
Hi, users.
Below is my default.xml snippet. I am using bind_digit_action for different inputs bindings and moves the call to that context upon regex match.
<condition> <action application="bind_digit_action" data="moderator,~\*,exec:execute_extension,previous XML Previous"/> <action application="bind_digit_action" data="moderator,~\#,exec:execute_extension,next XML Next"/> <action application="bind_digit_action" data="moderator,~^\d$,exec:execute_extension,exten XML Exten"/> <action application="digit_action_set_realm" data="moderator"/> <action application="answer"/> <action application="playback" data="shout://127.0.0.1/radio"/> </condition>
Now I want to write my dialplan in lua which I think is more handy than xml. Upon regex match call to be executed in corresponding functions.
Like, for * *function next()* for #, *function previous()*
I know there is a application *session.setHangupHook(hangup_function_name)*; Which executes the function(hangup_function_name) upon call hangup.
Is there anything available in lua witch executes functions upon regex match. Or any other way for doing this.
Any pointer would be much appreciated.
Thanks.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org