I have spoken to my SIP trunk supplier and they say they have a timeout of 10 seconds on their system, so if no signalling or RTP media it disconnects. So question is now how can I get FS to send some signalling or RTP messages back to SIP trunk while my IVR is dialling an extension.

regards, John Carpenter


On Sat, 2011-01-22 at 01:57 +0000, John Carpenter wrote:
Hi, I am trying to setup a very simple IVR using LUA. Call arrives from a DID SIP trunk and is answered and message is played ok, after a particular digit is pressed it bridges the call to an extension which is remotely connected. It works but after 2 rings the call to the extension is dropped with a SIP message "BYE" from DID provider. If I just route the call directly to the extension (no IVR) it works fine. It seems like the DID hangs up when the call is bridged to the extension. Have tried same thing using the XML IVR Engine and get exactly the same result. The IVR script is below

pathsep = '/'
session:setAutoHangup(false);
session:answer()
prompt = "ivr" .. pathsep .. "247talk.wav"
invalid = "ivr" .. pathsep .. "ivr-that_was_an_invalid_entry.wav"
freeswitch.consoleLog("INFO", "Prompt file is '" .. prompt .. "'\n")
continue = true

while( session:ready() == true and continue == true) do
        digits = session:playAndGetDigits(1,1,3,7000,"#", prompt, invalid, "\\d+")
        if (digits == "1") then
                continue = false
                session:execute("bridge","sofia/external/2476%91.xxx.xx.xx")
        end
        if (digits == "2") then
                session:execute("bridge","sofia/external/2475%91.xxx.xx.xx")
        end
        if (digits == "3") then
                continue = false
                session:execute("bridge","sofia/external/2475%91.xxx.xx.xx")
        end
end

session:hangup()

Any help with this greatly appreciated it is driving me nuts.

regards, John Carpenter
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org