Hi All,<br><br> Thought I would share my solution to this DTMF problem: it turns out my ISP was capping my bandwidth & dropping packets to keep the connection & 1Mbps, so the experienced DTMF loss was actually packets being discarded.<br>
<br> On my way to this discovery I tested Freeswitch & DTMF quite thoroughly & never actually found any problems even at hundreds of concurrent calls. Here is how I tested, who knows this might be useful to someone:<br>
<ul><li>I used SIPp to generate calls & a Python script to log the received DTMF digits</li><li>SIPp command line: </li><ul><li>sipp -sf dtmfSenario.xml -d 10000 -s 451 -l 96 -mp 5606 -i xxx.xxx.xxx.xxx</li></ul><li>
dtmfSenario.xml below<br></li><li>Dialplan:</li><ul><li> <extension name="test_dtmf_capture_test"><br> <!--Grab calls for dialing --><br> <condition field="destination_number" expression="(^100100$)"><br>
<action application="answer"/><br> <action application="python" data="writeDtmfStats"/><br> </condition><br> </extension></li></ul><li>Python:</li>
<ul><li>import sys<br>from freeswitch import *<br><br><br>def get_number(session,invalid,num=20):<br> digits = session.getDigits(num, "", 15000)<br><br> consoleLog("info","Got '%s' digits from user.\n" % digits)<br>
if digits == '':<br> # Invalid call<br> if invalid == 3:<br> consoleLog("info","Three invalid attempts!!\n")<br> session.streamFile("/usr/local/freeswitch/sounds/en/us/callie/misc/8000/invalid_extension.wav")<br>
session.hangup()<br> sys.exit(0)<br> else:<br> session.streamFile("/usr/local/freeswitch/sounds/en/us/callie/misc/8000/invalid_extension.wav")<br>
get_number(session,invalid + 1)<br> else:<br> consoleLog("info","Got a valid number: %s, proceeding...\n" % digits)<br> return digits<br><br>
<br><br>def handler(session, args):<br> session.streamFile("/usr/local/freeswitch/sounds/en/us/callie/ivr/8000/ivr-please_enter_extension_followed_by_pound.wav")<br> numberToDial = get_number(session,2,num=10)<br>
consoleLog('info','Got 10 DTMF digits. Writing "1" to file...\n')<br> fo = open('/tmp/dtmfData.csv','a')<br> fo.write('"1"\n')<br> fo.close()<br> # Do some stuff & wait for SIPP to hangup<br>
session.streamFile("/usr/local/freeswitch/sounds/en/us/callie/ivr/8000/ivr-please_enter_extension_followed_by_pound.wav")<br> session.streamFile("/usr/local/freeswitch/sounds/en/us/callie/ivr/8000/ivr-please_enter_extension_followed_by_pound.wav")<br>
return</li></ul><li>DTMF senario file:</li><ul><li># cat dtmfSenario.xml <br><?xml version="1.0" encoding="ISO-8859-1"?><br><!DOCTYPE scenario SYSTEM "sipp.dtd"><br><!-- This program is free software; you can redistribute it and/or --><br>
<!-- modify it under the terms of the GNU General Public License as --><br><!-- published by the Free Software Foundation; either version 2 of the --><br><!-- License, or (at your option) any later version. --><br>
<!-- --><br><!-- This program is distributed in the hope that it will be useful, --><br><!-- but WITHOUT ANY WARRANTY; without even the implied warranty of --><br>
<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --><br><!-- GNU General Public License for more details. --><br><!-- --><br>
<!-- You should have received a copy of the GNU General Public License --><br><!-- along with this program; if not, write to the --><br><!-- Free Software Foundation, Inc., --><br>
<!-- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --><br><!-- --><br><!-- Sipp 'uac' scenario with pcap (rtp) play --><br>
<!-- --><br><scenario name="UAC with media"><br> <!-- In client mode (sipp placing calls), the Call-ID MUST be --><br>
<!-- generated by sipp. To do so, use [call_id] keyword. --><br> <send retrans="500"><br> <![CDATA[<br><br> INVITE sip:[service]@[remote_ip]:[remote_port] SIP/2.0<br> Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]<br>
From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[call_number]<br> To: sut <sip:[service]@[remote_ip]:[remote_port]><br> Call-ID: [call_id]<br> CSeq: 1 INVITE<br> Contact: sip:sipp@[local_ip]:[local_port]<br>
Max-Forwards: 70<br> Subject: Performance Test<br> Content-Type: application/sdp<br> Content-Length: [len]<br><br> v=0<br> o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]<br> s=-<br>
c=IN IP[local_ip_type] [local_ip]<br> t=0 0<br> m=audio [auto_media_port] RTP/AVP 18 100<br> a=rtpmap:18 G729/8000<br> a=fmtp:18 annexb=no<br> a=rtpmap:100 telephone-event/8000<br> a=fmtp:100 0-16<br>
a=silenceSupp:off - - - -<br> a=ptime:20<br> a=sendrecv<br> ]]><br> </send><br><br><!-- a=rtpmap:8 PCMA/8000 --><br> <recv response="100" optional="true"><br>
</recv><br><br> <recv response="180" optional="true"><br> </recv><br><br> <!-- By adding rrs="true" (Record Route Sets), the route sets --><br> <!-- are saved and used for following messages sent. Useful to test --><br>
<!-- against stateful SIP proxies/B2BUAs. --><br> <recv response="200" rtd="true" crlf="true"><br> </recv><br><br> <!-- Packet lost can be simulated in any send/recv message by --><br>
<!-- by adding the 'lost = "10"'. Value can be [1-100] percent. --><br> <send><br> <![CDATA[<br><br> ACK sip:[service]@[remote_ip]:[remote_port] SIP/2.0<br> Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]<br>
From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[call_number]<br> To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]<br> Call-ID: [call_id]<br> CSeq: 1 ACK<br> Contact: sip:sipp@[local_ip]:[local_port]<br>
Max-Forwards: 70<br> Subject: Performance Test<br> Content-Length: 0<br><br> ]]><br> </send><br><br> <!-- Play a pre-recorded PCAP file (RTP stream) --><br><!--<br>
<nop><br> <action><br> <exec play_pcap_audio="g711a.pcap"/><br> </action><br> </nop><br>--><br><br> <!-- Pause 8 seconds, which is approximately the duration of the --><br>
<!-- PCAP file --><br> <pause milliseconds="5000"/><br><br> <!-- Play an out of band DTMF '1' --><br>
<nop><br> <action><br> <exec play_pcap_audio="dtmf_2833_1.pcap"/><br> </action><br> </nop><br><br> <pause milliseconds="1000"/><br> <br> <!-- Play an out of band DTMF '1' --><br>
<nop><br> <action><br> <exec play_pcap_audio="dtmf_2833_1.pcap"/><br> </action><br> </nop><br> <pause milliseconds="1000"/><br> <br> <!-- Play an out of band DTMF '1' --><br>
<nop><br> <action><br> <exec play_pcap_audio="dtmf_2833_1.pcap"/><br> </action><br> </nop><br> <pause milliseconds="500"/><br> <br> <!-- Play an out of band DTMF '1' --><br>
<nop><br> <action><br> <exec play_pcap_audio="dtmf_2833_1.pcap"/><br> </action><br> </nop><br> <pause milliseconds="500"/><br> <br> <!-- Play an out of band DTMF '1' --><br>
<nop><br> <action><br> <exec play_pcap_audio="dtmf_2833_1.pcap"/><br> </action><br> </nop><br> <pause milliseconds="500"/><br> <br> <!-- Play an out of band DTMF '1' --><br>
<nop><br> <action><br> <exec play_pcap_audio="dtmf_2833_1.pcap"/><br> </action><br> </nop><br> <pause milliseconds="500"/><br> <br> <!-- Play an out of band DTMF '1' --><br>
<nop><br> <action><br> <exec play_pcap_audio="dtmf_2833_1.pcap"/><br> </action><br> </nop><br> <pause milliseconds="500"/><br> <br> <!-- Play an out of band DTMF '1' --><br>
<nop><br> <action><br> <exec play_pcap_audio="dtmf_2833_1.pcap"/><br> </action><br> </nop><br> <pause milliseconds="500"/><br> <br> <!-- Play an out of band DTMF '1' --><br>
<nop><br> <action><br> <exec play_pcap_audio="dtmf_2833_1.pcap"/><br> </action><br> </nop><br> <pause milliseconds="500"/><br> <br> <!-- Play an out of band DTMF '1' --><br>
<nop><br> <action><br> <exec play_pcap_audio="dtmf_2833_1.pcap"/><br> </action><br> </nop><br><br> <pause milliseconds="2000"/><br><br> <!-- The 'crlf' option inserts a blank line in the statistics report. --><br>
<send retrans="500"><br> <![CDATA[<br><br> BYE sip:[service]@[remote_ip]:[remote_port] SIP/2.0<br> Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]<br> From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[call_number]<br>
To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]<br> Call-ID: [call_id]<br> CSeq: 2 BYE<br> Contact: sip:sipp@[local_ip]:[local_port]<br> Max-Forwards: 70<br> Subject: Performance Test<br>
Content-Length: 0<br><br> ]]><br> </send><br><br> <recv response="200" crlf="true"><br> </recv><br><br> <!-- definition of the response time repartition table (unit is ms) --><br>
<ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/><br><br> <!-- definition of the call length repartition table (unit is ms) --><br> <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/><br>
<br></scenario><br></li></ul></ul>Cheers,<br><br>Michael<br><br><div class="gmail_quote">On Mon, Nov 16, 2009 at 5:25 PM, Anthony Minessale <span dir="ltr"><<a href="mailto:anthony.minessale@gmail.com">anthony.minessale@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">That's a pretty small problem description to be so sure about something.<br>It would probably be better to capture some evidence of the exact problem you are having since we are using computers and we need to see the computers in action doing something specifically incorrect to diagnose any sort of problem. Take the time to describe the origin and destination of your calls, the call flow, the hardware in use on both ends of the call, detailed console logs on debug level, (maybe even uncomment the 2833 debug ifded in switch_rtp.c) and gather something to go on besides "I seem to be losing dtmf) maybe a packect capture of the networking interface on both ends of these calls.<br>
<br>Also problems should be reported to <a href="http://jira.freeswitch.org" target="_blank">http://jira.freeswitch.org</a> not this mailing list.<br>Save us a step if you report a jira and provide all the info above or we will just have to ask for it again.<br>
<br><br><div class="gmail_quote"><div><div></div><div class="h5">On Mon, Nov 16, 2009 at 1:07 AM, Michael Toop <span dir="ltr"><<a href="mailto:michaelt@voxcore.voxtelecom.co.za" target="_blank">michaelt@voxcore.voxtelecom.co.za</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">
Hi All,<br><br> I have an issue that when my call volumes on my FS IVR
box > 30 calls DTMF digits are lost (using RFC2833). It is definitely load related as it all works perfectly under 30 calls.<br><br> Any pointers or a solution to the problem? <br>
<br>Thanks,<br><font color="#888888"><br>Michael
</font><br></div></div>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a 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" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a 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" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br>
Twitter: <a href="http://twitter.com/FreeSWITCH_wire" target="_blank">http://twitter.com/FreeSWITCH_wire</a><br><br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com" target="_blank">MSN:anthony_minessale@hotmail.com</a><br>
GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com" target="_blank">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org" target="_blank">sip:888@conference.freeswitch.org</a><br>
<a href="http://iax:guest@conference.freeswitch.org/888" target="_blank">iax:guest@conference.freeswitch.org/888</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org" target="_blank">googletalk:conf+888@conference.freeswitch.org</a><br>pstn:213-799-1400<br>
<br>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a 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" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br>