<html><body><span style="font-family:Verdana; color:#000000; font-size:10pt;">Just the usual goodies, here it is:<br><br>&nbsp; &lt;context name="public"&gt;<br><br>&nbsp;&nbsp;&nbsp; &lt;extension name="unloop"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;condition field="${unroll_loops}" expression="^true$"/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;condition field="${sip_looped_call}" expression="^true$"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="deflect" data="${destination_number}"/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/condition&gt;<br>&nbsp;&nbsp;&nbsp; &lt;/extension&gt;<br>&nbsp;&nbsp;&nbsp; &lt;!--<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Tag anything pass thru here as an outside_call so you can make sure not<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; to create any routing loops based on the conditions that it came from<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the outside of the switch.<br>&nbsp;&nbsp;&nbsp; --&gt;<br>&nbsp;&nbsp;&nbsp; &lt;extension name="outside_call" continue="true"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;condition&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="set" data="outside_call=true"/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/condition&gt;<br>&nbsp;&nbsp;&nbsp; &lt;/extension&gt;<br><br>&nbsp;&nbsp;&nbsp; &lt;extension name="call_debug" continue="true"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;condition field="${call_debug}" expression="^true$" break="never"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="info"/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/condition&gt;<br>&nbsp;&nbsp;&nbsp; &lt;/extension&gt;<br><br><br>&nbsp;&nbsp;&nbsp; &lt;!-- central inbound point --&gt;<br>&nbsp;&nbsp;&nbsp; &lt;extension name="incoming_call"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;condition field="destination_number" expression="^InboundCall$"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="lua" data="${base_dir}/scripts/privateIn.lua"/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/condition&gt;<br>&nbsp;&nbsp;&nbsp; &lt;/extension&gt;<br><br><br>......<br>&lt;/context&gt;<br><br>
<blockquote webmail="1" style="border-left: 2px solid blue; margin-left: 8px; padding-left: 8px; font-size: 10pt; color: black; font-family: verdana;">
<div   >
-------- Original Message --------<br>
Subject: Re: [Freeswitch-users] Issues detecting DTMF tones<br>
From: Michael Collins &lt;msc@freeswitch.org&gt;<br>
Date: Fri, April 17, 2009 11:55 am<br>
To: freeswitch-users@lists.freeswitch.org<br>
<br>
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?<br><br>Thanks,<br>MC<br><br><div class="gmail_quote">On Fri, Apr 17, 2009 at 11:47 AM, <font dir="ltr">&lt;<a onclick="return true;if(window.location==top.location){Popup.composeWindow('pcompose.php?sendto=pete%40privateconnect.com');}else{top.Popup.composeWindow('pcompose.php?sendto=pete%40privateconnect.com');}; return false;" href="mailto:pete@privateconnect.com" target="_blank" mce_href="mailto:pete@privateconnect.com">pete@privateconnect.com</a>&gt;</font> wrote:<br> <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><font style="font-family: Verdana;" size="2" color="#000000" face="Verdana">below is the lua script that is running when the caller dials in.&nbsp; As mentioned before, swaping the streamFile and sleep make the problem go away. <br> <br>I am experiencing different issues all related to DTMF tones, again, I don't think FS is the problem.&nbsp; But I'm wondering how to find the culprit.<br><br>Issues:<br>1. for 4-5 hours the other day I could not detect the 1,2,3 tones, but 4-0 worked fine. <br> 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.<br><br>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)<br> <br>Issue #1 is the more problematic one.&nbsp; It occurs intermittently, and for hours at a time, and then everything goes back to normal.&nbsp; <br><br>Thanks for your help<br>-pete<br><br>------- BEGIN SCRIPT -------<br><br>function cbPIN(ses, type, data, arg)<br> &nbsp; if (type == "dtmf") then<br>&nbsp;&nbsp;&nbsp; freeswitch.consoleLog("info", "DIGIT: " .. data.digit)<br>&nbsp;&nbsp;&nbsp; local d = ses:getVariable("private_digits")<br>&nbsp;&nbsp;&nbsp; if ((d == nil) or (d == "")) then d = data.digit<br> &nbsp;&nbsp;&nbsp; else d = d .. data.digit end<br>&nbsp;&nbsp;&nbsp; ses:setVariable("private_digits", d)<br>&nbsp;&nbsp;&nbsp; if (d == "1234") then return "break" end<br>&nbsp; end<br>end<br><br>function inboundToHotline(isUser)<br>&nbsp; if (isUser == true) then<br> &nbsp;&nbsp;&nbsp; session:setInputCallback("cbPIN")<br>&nbsp;&nbsp;&nbsp; session:streamFile(soundDir .. "thank-you-for-calling")<br>&nbsp;&nbsp;&nbsp; --session:sleep(20000)<br>&nbsp;&nbsp;&nbsp; if (session:getVariable("private_digits") == "1234") then<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; session:transfer("privateMenu", "XML", "public")<br>&nbsp;&nbsp;&nbsp; else<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; session:hangup()<br>&nbsp;&nbsp;&nbsp; end<br>&nbsp; else<br>&nbsp;&nbsp;&nbsp; session:streamFile(soundDir .. "thank-you-for-calling")<br>&nbsp;&nbsp;&nbsp; session:hangup()<br> &nbsp; end<br>end<br><br><br><br>if (session:ready()) then<br>&nbsp; session:answer()<br>&nbsp; session:sleep(500)<br>&nbsp; inboundToHotline(true)<br>end<br><br> </font><blockquote style="border-left: 2px solid blue; margin-left: 8px; padding-left: 8px; font-size: 10pt; color: black; font-family: verdana;"><font style="font-family: Verdana;" size="2" color="#000000" face="Verdana"> </font><div><font style="font-family: Verdana;" size="2" color="#000000" face="Verdana"> -------- Original Message --------<br> Subject: Re: [Freeswitch-users] Issues detecting DTMF tones<br> From: Brian West &lt;<a onclick="return true;if(window.location==top.location){Popup.composeWindow('pcompose.php?sendto=brian%40freeswitch.org');}else{top.Popup.composeWindow('pcompose.php?sendto=brian%40freeswitch.org');}; return false;" href="mailto:brian@freeswitch.org" mce_href="mailto:brian@freeswitch.org" target="_blank">brian@freeswitch.org</a>&gt;<br> Date: Thu, April 16, 2009 2:27 pm<br> To: <a onclick="return true;if(window.location==top.location){Popup.composeWindow('pcompose.php?sendto=freeswitch-users%40lists.freeswitch.org');}else{top.Popup.composeWindow('pcompose.php?sendto=freeswitch-users%40lists.freeswitch.org');}; return false;" href="mailto:freeswitch-users@lists.freeswitch.org" mce_href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a><br> <br> What are you doing exactly? &nbsp;Can you provide us an example.</font><div><font style="font-family: Verdana;" size="2" color="#000000" face="Verdana"><br></font></div><div><font style="font-family: Verdana;" size="2" color="#000000" face="Verdana">/b</font></div><div><font style="font-family: Verdana;" size="2" color="#000000" face="Verdana"><br></font><div><div><font style="font-family: Verdana;" size="2" color="#000000" face="Verdana">On Apr 16, 2009, at 3:49 PM, Pete Mueller wrote:</font></div><font style="font-family: Verdana;" size="2" color="#000000" face="Verdana"><br></font><blockquote type="cite" style="border-left: 2px solid blue; margin-left: 8px; padding-left: 8px;"><font style="font-family: Verdana;" size="2" color="#000000" face="Verdana"> <font style="border-collapse: separate; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" color="#000000" face="Helvetica"></font></font><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri,sans-serif;"><font style="font-family: Verdana;" size="2" color="#000000" face="Verdana"> <font style="border-collapse: separate; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" color="#000000" face="Helvetica">Hey guys.&nbsp; Has anyone else experienced the inability to detect/receive DTMF tones?&nbsp; 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. &nbsp;If I removed the sound file that was playing, and substituted silence it worked, add the sound file in, and it broke.&nbsp; I have a strong feeling that this is not an issue with FS, but with an upstream system.&nbsp; But wanted to know if anyone has seen this before, and how they went about identifying the culprit and/or fixing it.</font></font></div><font style="font-family: Verdana;" size="2" color="#000000" face="Verdana"> </font><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri,sans-serif;"><font style="font-family: Verdana;" size="2" color="#000000" face="Verdana"><font style="border-collapse: separate; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" color="#000000" face="Helvetica">&nbsp;</font></font></div><font style="font-family: Verdana;" size="2" color="#000000" face="Verdana"> </font><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri,sans-serif;"><font style="font-family: Verdana;" size="2" color="#000000" face="Verdana"><font style="border-collapse: separate; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" color="#000000" face="Helvetica">Some background:</font></font></div><font style="font-family: Verdana;" size="2" color="#000000" face="Verdana"> </font><div style="margin: 0cm 0cm 0.0001pt 36pt; font-size: 11pt; font-family: Calibri,sans-serif; text-indent: -18pt;"><font style="font-family: Verdana;" size="2" color="#000000" face="Verdana"><font style="border-collapse: separate; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" color="#000000" face="Helvetica">-<font style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;" face="Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font></font></font>Using FS trunk</div> <div style="margin: 0cm 0cm 0.0001pt 36pt; font-size: 11pt; font-family: Calibri,sans-serif; text-indent: -18pt;">-<font style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;" face="Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font>Both legs of the call were via SIP gateway.</div> <div style="margin: 0cm 0cm 0.0001pt 36pt; font-size: 11pt; font-family: Calibri,sans-serif; text-indent: -18pt;">-<font style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;" face="Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font>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</div> <div style="margin: 0cm 0cm 0.0001pt 36pt; font-size: 11pt; font-family: Calibri,sans-serif; text-indent: -18pt;">-<font style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;" face="Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font>Both legs of calls were to/from ATT cell phones</div> <div style="margin: 0cm 0cm 0.0001pt 36pt; font-size: 11pt; font-family: Calibri,sans-serif; text-indent: -18pt;">-<font style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;" face="Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font>&nbsp;Was using session:setInputCallback() to receive tones, did not test with playAndGetDigits()</div> <div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri,sans-serif;">&nbsp;</div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri,sans-serif;">Thanks for any help.</div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri,sans-serif;"> -pete</div></blockquote></div><br><div> <font style="border-collapse: separate; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" color="#000000" face="Helvetica"><div> <font style="border-collapse: separate; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" color="#000000" face="Helvetica"><div> <font style="border-collapse: separate; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" color="#000000" face="Helvetica"><div> <div>Brian West</div><div><a onclick="return true;if(window.location==top.location){Popup.composeWindow('pcompose.php?sendto=brian%40freeswitch.org');}else{top.Popup.composeWindow('pcompose.php?sendto=brian%40freeswitch.org');}; return false;" href="mailto:brian@freeswitch.org" mce_href="mailto:brian@freeswitch.org" target="_blank">brian@freeswitch.org</a></div><div><br></div></div></font>-- Meet us at ClueCon! &nbsp;<a href="http://www.cluecon.com/" mce_href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com</a><br> <div><br></div></div></font><br></div></font><br> </div><br></div><hr>_______________________________________________<br> Freeswitch-users mailing list<br> <a onclick="return true;if(window.location==top.location){Popup.composeWindow('pcompose.php?sendto=Freeswitch-users%40lists.freeswitch.org');}else{top.Popup.composeWindow('pcompose.php?sendto=Freeswitch-users%40lists.freeswitch.org');}; return false;" href="mailto:Freeswitch-users@lists.freeswitch.org" mce_href="mailto:Freeswitch-users@lists.freeswitch.org" target="_blank">Freeswitch-users@lists.freeswitch.org</a><br> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" mce_href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" mce_href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br> <a href="http://www.freeswitch.org" mce_href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br> </div> </blockquote></div> <br>_______________________________________________<br> Freeswitch-users mailing list<br> <a onclick="return true;if(window.location==top.location){Popup.composeWindow('pcompose.php?sendto=Freeswitch-users%40lists.freeswitch.org');}else{top.Popup.composeWindow('pcompose.php?sendto=Freeswitch-users%40lists.freeswitch.org');}; return false;" href="mailto:Freeswitch-users@lists.freeswitch.org" target="_blank" mce_href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" mce_href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" mce_href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br> <a href="http://www.freeswitch.org" mce_href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br> <br></blockquote></div><br> <hr>_______________________________________________<br>
Freeswitch-users mailing list<br>
Freeswitch-users@lists.freeswitch.org<br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank" mce_href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank" mce_href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank" mce_href="http://www.freeswitch.org">http://www.freeswitch.org</a><br>

</div>
</blockquote></span></body></html>