<div dir="ltr">I just finished playing with it.  You can just do this:<div><br></div><div>&lt;action application=&quot;bind_digit_action&quot; data=&quot;my_digits,0,exec:lua,your_script.lua,param1 param2 param3&quot;/&gt;<br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 8, 2015 at 1:05 PM, Aqs Younas <span dir="ltr">&lt;<a href="mailto:aqsyounas@gmail.com" target="_blank">aqsyounas@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi, users. <br><br>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. <br><br></div><div>&lt;condition&gt;<br>&lt;action application=&quot;bind_digit_action&quot; data=&quot;moderator,~\*,exec:execute_extension,previous XML Previous&quot;/&gt;<br>        &lt;action application=&quot;bind_digit_action&quot; data=&quot;moderator,~\#,exec:execute_extension,next XML Next&quot;/&gt;<br>        &lt;action application=&quot;bind_digit_action&quot; data=&quot;moderator,~^\d$,exec:execute_extension,exten XML Exten&quot;/&gt;<br>                &lt;action application=&quot;digit_action_set_realm&quot; data=&quot;moderator&quot;/&gt;<br>        &lt;action application=&quot;answer&quot;/&gt;<br>        &lt;action application=&quot;playback&quot; data=&quot;shout://<a href="http://127.0.0.1/radio" target="_blank">127.0.0.1/radio</a>&quot;/&gt; &lt;/condition&gt;<br>  <br></div><div>Now I want to write my dialplan in lua which I think is more handy than xml.<br></div><div>Upon regex match call to be executed in corresponding functions.<br><br></div><div>Like, for *<br></div><div><b>function next()</b><br></div><div>for #,<br></div><div><b>function previous()</b><br><br><br></div><div><br></div><div>I know there is a application <b>session.setHangupHook(hangup_function_name)</b>;<br></div><div>Which executes the function(hangup_function_name) upon call hangup.<br><br></div><div>Is there anything available in lua witch executes functions upon regex match.<br></div><div>Or any other way for doing this.<br><br></div><div>Any pointer would be much appreciated. <br><br></div><div>Thanks. <br></div><div><br></div><div><br></div></div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" 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.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br></div>