[Freeswitch-users] bind_digit_action for lua

Aqs Younas aqsyounas at gmail.com
Sat May 9 00:05:17 MSD 2015


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20150508/695a1c73/attachment-0001.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list