[Freeswitch-users] LUA - ** - Disconnect the call or stop call progress [ ringing or slient] and jump to the next statement

Michael Jerris mike at jerris.com
Sun Jun 6 19:30:11 PDT 2010


http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_bind_meta_app

On Jun 1, 2010, at 3:05 PM, Aloysius Lloyd wrote:

> Hi All,
> 
> I would like to implement a feature code  ** - Disconnect the leg B or stop call progress [ ringing or slient] and jump to the next statement.
> 
> Here is the Lua code I am using to bridge two calls. How to implement the feature code like ** for this purpose.
> 
> session:preAnswer();
> 
> digits = session:playAndGetDigits(10, 20, 3, 5000, "#", "enter-dest.wav", "invalid-digits.wav", "\\d+|\\*");
> obSession = freeswitch.Session("sofia/gateway/voipms/"..digits,session)
> 
> if obSession:ready() then
>     obSession:execute("sched_hangup","+60 alloted_timeout");
>     freeswitch.bridge(session, obSession);
> end




More information about the FreeSWITCH-users mailing list