Hi
I am following FreeSWITCH cookbook Chapter 1, Page 15: Ringing multiple endpoints sequentially.
I am also using mod_lua to do a simple app that does the bridging.
The problem scenario is as follows: The first endpoint rings. It is not answered. The second endpoint starts ringing. It is answered but the call is immediately disconnected. And then the first endpoint starts ringing again!
Probably, the reason why the first endpoint starts ringing again is a repeat try in bridge application. Is there anyway to disable it ?
Here is my dialplan snippet
<action application="lua" data="bridge.lua 1 8860133622 | 9711450555"/>
And here is bridge.lua
# cat scripts/bridge.lua
-- arguments from dialplan
setAnswer = argv[1]
num1 = argv[2]
limiter1 = argv[3]
num2 = argv[4]
session:answer()
welcome= "welcome.wav"
session:streamFile(welcome)
freeswitch.consoleLog("INFO","Prompt file is '" .. welcome .. "'\n")
freeswitch.consoleLog("INFO","Arguments '" .. argv[1] .. " " .. argv[2] .. " " .. argv[3] .. " " .. argv[4] .. "'\n")
globalChanVars = "{ignore_early_media=true,originate_continue_on_timeout=true,call_timout=60,monitor_early_media_fail=user_busy:2:480+620!destination_out_of_order:2:1776.7}"
chan1 = "[leg_timeout=15]" .. "freetdm/1/a/" .. num1
chan2 = "[leg_timeout=55]" .. "freetdm/1/a/" .. num2
-- global channel variables are applicable to all channels in the session
newSession = freeswitch.Session(globalChanVars .. chan1 .. limiter1 .. chan2)
-- bridge new Session to the current session
freeswitch.bridge(session, newSession)
Much thanks!
regards,
Anita