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

Aloysius Lloyd lloyd.aloysius at gmail.com
Tue Jun 1 12:05:35 PDT 2010


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

Thanks
Lloyd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20100601/e8326e4c/attachment.html 


More information about the FreeSWITCH-users mailing list