[Freeswitch-users] Issues detecting DTMF tones
Michael Collins
msc at freeswitch.org
Fri Apr 17 11:55:28 PDT 2009
Quick question: do you do anything interesting in the dialplan prior to
calling the script? For posterity's sake could you paste the extension info
here as well?
Thanks,
MC
On Fri, Apr 17, 2009 at 11:47 AM, <pete at privateconnect.com> wrote:
> below is the lua script that is running when the caller dials in. As
> mentioned before, swaping the streamFile and sleep make the problem go away.
>
>
> I am experiencing different issues all related to DTMF tones, again, I
> don't think FS is the problem. But I'm wondering how to find the culprit.
>
> Issues:
> 1. for 4-5 hours the other day I could not detect the 1,2,3 tones, but 4-0
> worked fine.
> 2. Using some cellphones (iphone) the digits take 1-2 seconds each to be
> received by FS, no matter how fast the digits were typed on the phone's
> keypad.
>
> I believe the isuse with #2 is somewhere in the iphone/ATT as I can call
> other IVR systems and sometimes get the same problem. (Etnering a 10 digit
> phone number will take 15 seconds to be recognized, because the digits seem
> to be spaced 1-2 seconds apart)
>
> Issue #1 is the more problematic one. It occurs intermittently, and for
> hours at a time, and then everything goes back to normal.
>
> Thanks for your help
> -pete
>
> ------- BEGIN SCRIPT -------
>
> function cbPIN(ses, type, data, arg)
> if (type == "dtmf") then
> freeswitch.consoleLog("info", "DIGIT: " .. data.digit)
> local d = ses:getVariable("private_digits")
> if ((d == nil) or (d == "")) then d = data.digit
> else d = d .. data.digit end
> ses:setVariable("private_digits", d)
> if (d == "1234") then return "break" end
> end
> end
>
> function inboundToHotline(isUser)
> if (isUser == true) then
> session:setInputCallback("cbPIN")
> session:streamFile(soundDir .. "thank-you-for-calling")
> --session:sleep(20000)
> if (session:getVariable("private_digits") == "1234") then
> session:transfer("privateMenu", "XML", "public")
> else
> session:hangup()
> end
> else
> session:streamFile(soundDir .. "thank-you-for-calling")
> session:hangup()
> end
> end
>
>
>
> if (session:ready()) then
> session:answer()
> session:sleep(500)
> inboundToHotline(true)
> end
>
> -------- Original Message --------
> Subject: Re: [Freeswitch-users] Issues detecting DTMF tones
> From: Brian West <brian at freeswitch.org>
> Date: Thu, April 16, 2009 2:27 pm
> To: freeswitch-users at lists.freeswitch.org
>
> What are you doing exactly? Can you provide us an example.
> /b
>
> On Apr 16, 2009, at 3:49 PM, Pete Mueller wrote:
>
> Hey guys. Has anyone else experienced the inability to detect/receive DTMF
> tones? Just yesterday I had about 4-5 hours where One of my IVR scripts
> would not detect 1, 2 or 3, but detected the other digits perfectly. If I
> removed the sound file that was playing, and substituted silence it worked,
> add the sound file in, and it broke. I have a strong feeling that this is
> not an issue with FS, but with an upstream system. But wanted to know if
> anyone has seen this before, and how they went about identifying the culprit
> and/or fixing it.
>
> Some background:
> - Using FS trunk
> - Both legs of the call were via SIP gateway.
> - Setting loglevel to 9 (console and sofia) showed that the RTP
> packets were not received by FS for 1/2/3 but were received for other digits
> - Both legs of calls were to/from ATT cell phones
> - Was using session:setInputCallback() to receive tones, did not
> test with playAndGetDigits()
>
> Thanks for any help.
> -pete
>
>
> Brian West
> brian at freeswitch.org
>
> -- Meet us at ClueCon! http://www.cluecon.com
>
>
>
>
> ------------------------------
> _______________________________________________
> Freeswitch-users mailing list
> Freeswitch-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
> _______________________________________________
> Freeswitch-users mailing list
> Freeswitch-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090417/0d033c58/attachment-0002.html
More information about the FreeSWITCH-users
mailing list