No subject


Sun Jul 19 19:54:31 CDT 2009


There are three test cases run. In each, SIPp is used to place a call to Asterisk, playback one or multiple pcap files and then send a BYE. The test.lua script is set to run a handler for each VarSet manager event that is received. In the handler, we compare the received DTMF digits to what we expected to receive and fail if there is a discrepancy.

The pcap files that I used for playing DTMF could not be attached, so I will include a brief description of them here:

dtmf_2833_*.pcap: These are the RFC2833 DTMF pcap files included in the distribution of SIPp. Strangely, they do not include a '0' DTMF digit.
dtmf_2833_*_noend.pcap: These are generated from the original DTMF pcap files by chopping off the end frames.
broken_dtmf.pcap: This is a series of digits that was collected from the reporter of Mantis issue 15811 who was having a problem with duplicate DTMF being detected. The quirk with the DTMF here is that there are out-of-order frames received.

If more information is required regarding the tests run, see
tests/rfc2833_dtmf_detect/test-config.yaml

Review: https://reviewboard.asterisk.org/r/560


Added:
    asterisk/trunk/tests/rfc2833_dtmf_detect/
    asterisk/trunk/tests/rfc2833_dtmf_detect/configs/
    asterisk/trunk/tests/rfc2833_dtmf_detect/configs/extensions.conf   (with props)
    asterisk/trunk/tests/rfc2833_dtmf_detect/configs/sip.conf   (with props)
    asterisk/trunk/tests/rfc2833_dtmf_detect/run-test   (with props)
    asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/
    asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/broken_dtmf.pcap   (with props)
    asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/broken_dtmf.xml   (with props)
    asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_1.pcap   (with props)
    asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_1_noend.pcap   (with props)
    asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_2.pcap   (with props)
    asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_2_noend.pcap   (with props)
    asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_3.pcap   (with props)
    asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_3_noend.pcap   (with props)
    asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_4.pcap   (with props)
    asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_4_noend.pcap   (with props)
    asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_5.pcap   (with props)
    asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_6.pcap   (with props)
    asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_7.pcap   (with props)
    asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_8.pcap   (with props)
    asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_9.pcap   (with props)
    asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_pound.pcap   (with props)
    asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_star.pcap   (with props)
    asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_baseline.xml   (with props)
    asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_noend.xml   (with props)
    asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/register.xml   (with props)
    asterisk/trunk/tests/rfc2833_dtmf_detect/test-config.yaml   (with props)
    asterisk/trunk/tests/rfc2833_dtmf_detect/test.lua   (with props)
Modified:
    asterisk/trunk/tests/tests.yaml

Added: asterisk/trunk/tests/rfc2833_dtmf_detect/configs/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rfc2833_dtmf_detect/configs/extensions.conf?view=auto&rev=143
==============================================================================
--- asterisk/trunk/tests/rfc2833_dtmf_detect/configs/extensions.conf (added)
+++ asterisk/trunk/tests/rfc2833_dtmf_detect/configs/extensions.conf Thu Mar 25 11:27:08 2010
@@ -1,0 +1,6 @@
+[dtmf_test]
+
+exten => test,1,Answer
+exten => test,n,Noop(Read test)
+exten => test,n,Read(READRESULT,,0,1,5)
+exten => test,n,Hangup

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/configs/extensions.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/configs/extensions.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/configs/extensions.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/rfc2833_dtmf_detect/configs/sip.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rfc2833_dtmf_detect/configs/sip.conf?view=auto&rev=143
==============================================================================
--- asterisk/trunk/tests/rfc2833_dtmf_detect/configs/sip.conf (added)
+++ asterisk/trunk/tests/rfc2833_dtmf_detect/configs/sip.conf Thu Mar 25 11:27:08 2010
@@ -1,0 +1,9 @@
+[general]
+udpbindaddr=127.0.0.1:5060
+canreinvite=no
+
+[test1]
+type=friend
+host=dynamic
+dtmf=rfc2833
+context=dtmf_test

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/configs/sip.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/configs/sip.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/configs/sip.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/rfc2833_dtmf_detect/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rfc2833_dtmf_detect/run-test?view=auto&rev=143
==============================================================================
--- asterisk/trunk/tests/rfc2833_dtmf_detect/run-test (added)
+++ asterisk/trunk/tests/rfc2833_dtmf_detect/run-test Thu Mar 25 11:27:08 2010
@@ -1,0 +1,4 @@
+#!/bin/bash -e
+
+asttest -a / -s tests/rfc2833_dtmf_detect
+

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/run-test
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/run-test
------------------------------------------------------------------------------
    svn:executable = *

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/run-test
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/run-test
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/broken_dtmf.pcap
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/broken_dtmf.pcap?view=auto&rev=143
==============================================================================
Binary file - no diff available.

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/broken_dtmf.pcap
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/broken_dtmf.pcap
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/broken_dtmf.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/broken_dtmf.xml?view=auto&rev=143
==============================================================================
--- asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/broken_dtmf.xml (added)
+++ asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/broken_dtmf.xml Thu Mar 25 11:27:08 2010
@@ -1,0 +1,102 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="DTMF TEST 1">
+  <send retrans="500">
+    <![CDATA[
+
+      INVITE sip:test@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:test1@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: 1 INVITE
+      Contact: sip:test1@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Subject: Performance Test
+      Content-Type: application/sdp
+      Content-Length: [len]
+
+      v=0
+      o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]
+      s=-
+      c=IN IP[media_ip_type] [media_ip]
+      t=0 0
+      m=audio [media_port] RTP/AVP 0 101
+      a=rtpmap:0 PCMU/8000
+      a=rtpmap:101 telephone-event/8000
+
+    ]]>
+  </send>
+
+  <recv response="100"
+        optional="true">
+  </recv>
+
+  <recv response="180" optional="true">
+  </recv>
+
+  <recv response="183" optional="true">
+  </recv>
+
+  <recv response="200" rtd="true">
+  </recv>
+
+  <send>
+    <![CDATA[
+
+	  ACK sip:test@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:test1@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 1 ACK
+      Contact: sip:test1@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Subject: Performance Test
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <!-- Brief pause before sending DTMF... -->
+  <pause milliseconds="500" />
+
+  <nop>
+  	<action>
+		<exec play_pcap_audio="sipp/broken_dtmf.pcap" />
+	</action>
+  </nop>
+
+  <!-- This pause gives enough time to play the DTMF -->
+  <!-- Also, we have enough time to retrieve the value read -->
+  <pause milliseconds="1500" />
+
+  <send retrans="500">
+    <![CDATA[
+
+      BYE sip:test@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:[test1@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 2 BYE
+      Contact: sip:test1@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Subject: Performance Test
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <recv response="200" crlf="true">
+  </recv>
+
+  <!-- definition of the response time repartition table (unit is ms)   -->
+  <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
+
+  <!-- definition of the call length repartition table (unit is ms)     -->
+  <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
+
+</scenario>
+

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/broken_dtmf.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/broken_dtmf.xml
------------------------------------------------------------------------------
    svn:executable = *

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/broken_dtmf.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/broken_dtmf.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_1.pcap
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_1.pcap?view=auto&rev=143
==============================================================================
Binary file - no diff available.

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_1.pcap
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_1.pcap
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_1_noend.pcap
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_1_noend.pcap?view=auto&rev=143
==============================================================================
Binary file - no diff available.

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_1_noend.pcap
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_1_noend.pcap
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_2.pcap
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_2.pcap?view=auto&rev=143
==============================================================================
Binary file - no diff available.

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_2.pcap
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_2.pcap
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_2_noend.pcap
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_2_noend.pcap?view=auto&rev=143
==============================================================================
Binary file - no diff available.

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_2_noend.pcap
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_2_noend.pcap
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_3.pcap
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_3.pcap?view=auto&rev=143
==============================================================================
Binary file - no diff available.

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_3.pcap
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_3.pcap
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_3_noend.pcap
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_3_noend.pcap?view=auto&rev=143
==============================================================================
Binary file - no diff available.

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_3_noend.pcap
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_3_noend.pcap
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_4.pcap
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_4.pcap?view=auto&rev=143
==============================================================================
Binary file - no diff available.

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_4.pcap
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_4.pcap
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_4_noend.pcap
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_4_noend.pcap?view=auto&rev=143
==============================================================================
Binary file - no diff available.

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_4_noend.pcap
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_4_noend.pcap
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_5.pcap
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_5.pcap?view=auto&rev=143
==============================================================================
Binary file - no diff available.

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_5.pcap
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_5.pcap
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_6.pcap
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_6.pcap?view=auto&rev=143
==============================================================================
Binary file - no diff available.

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_6.pcap
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_6.pcap
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_7.pcap
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_7.pcap?view=auto&rev=143
==============================================================================
Binary file - no diff available.

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_7.pcap
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_7.pcap
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_8.pcap
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_8.pcap?view=auto&rev=143
==============================================================================
Binary file - no diff available.

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_8.pcap
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_8.pcap
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_9.pcap
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_9.pcap?view=auto&rev=143
==============================================================================
Binary file - no diff available.

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_9.pcap
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_9.pcap
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_pound.pcap
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_pound.pcap?view=auto&rev=143
==============================================================================
Binary file - no diff available.

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_pound.pcap
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_pound.pcap
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_star.pcap
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_star.pcap?view=auto&rev=143
==============================================================================
Binary file - no diff available.

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_star.pcap
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_star.pcap
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_baseline.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_baseline.xml?view=auto&rev=143
==============================================================================
--- asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_baseline.xml (added)
+++ asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_baseline.xml Thu Mar 25 11:27:08 2010
@@ -1,0 +1,182 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="DTMF TEST 1">
+  <send retrans="500">
+    <![CDATA[
+
+      INVITE sip:test@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:test1@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: 1 INVITE
+      Contact: sip:test1@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Subject: Performance Test
+      Content-Type: application/sdp
+      Content-Length: [len]
+
+      v=0
+      o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]
+      s=-
+      c=IN IP[media_ip_type] [media_ip]
+      t=0 0
+      m=audio [media_port] RTP/AVP 0 101
+      a=rtpmap:0 PCMU/8000
+      a=rtpmap:101 telephone-event/8000
+
+    ]]>
+  </send>
+
+  <recv response="100"
+        optional="true">
+  </recv>
+
+  <recv response="180" optional="true">
+  </recv>
+
+  <recv response="183" optional="true">
+  </recv>
+
+  <recv response="200" rtd="true">
+  </recv>
+
+  <send>
+    <![CDATA[
+
+	  ACK sip:test@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:test1@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 1 ACK
+      Contact: sip:test1@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Subject: Performance Test
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <!-- Brief pause before sending DTMF... -->
+  <pause milliseconds="500" />
+
+  <nop>
+  	<action>
+		<exec play_pcap_audio="sipp/dtmf_2833_1.pcap" />
+	</action>
+  </nop>
+
+  <!-- This pause gives enough time to play the DTMF -->
+  <pause milliseconds="160" />
+
+  <nop>
+  	<action>
+		<exec play_pcap_audio="sipp/dtmf_2833_2.pcap" />
+	</action>
+  </nop>
+
+  <!-- This pause gives enough time to play the DTMF -->
+  <pause milliseconds="160" />
+
+  <nop>
+  	<action>
+		<exec play_pcap_audio="sipp/dtmf_2833_3.pcap" />
+	</action>
+  </nop>
+
+  <!-- This pause gives enough time to play the DTMF -->
+  <pause milliseconds="160" />
+
+  <nop>
+  	<action>
+		<exec play_pcap_audio="sipp/dtmf_2833_4.pcap" />
+	</action>
+  </nop>
+
+  <!-- This pause gives enough time to play the DTMF -->
+  <pause milliseconds="160" />
+
+  <nop>
+  	<action>
+		<exec play_pcap_audio="sipp/dtmf_2833_5.pcap" />
+	</action>
+  </nop>
+
+  <!-- This pause gives enough time to play the DTMF -->
+  <pause milliseconds="160" />
+
+  <nop>
+  	<action>
+		<exec play_pcap_audio="sipp/dtmf_2833_6.pcap" />
+	</action>
+  </nop>
+
+  <!-- This pause gives enough time to play the DTMF -->
+  <pause milliseconds="160" />
+
+  <nop>
+  	<action>
+		<exec play_pcap_audio="sipp/dtmf_2833_7.pcap" />
+	</action>
+  </nop>
+
+  <!-- This pause gives enough time to play the DTMF -->
+  <pause milliseconds="160" />
+
+  <nop>
+  	<action>
+		<exec play_pcap_audio="sipp/dtmf_2833_8.pcap" />
+	</action>
+  </nop>
+
+  <!-- This pause gives enough time to play the DTMF -->
+  <pause milliseconds="160" />
+
+  <nop>
+  	<action>
+		<exec play_pcap_audio="sipp/dtmf_2833_9.pcap" />
+	</action>
+  </nop>
+
+  <!-- This pause gives enough time to play the DTMF -->
+  <pause milliseconds="160" />
+
+  <nop>
+  	<action>
+		<exec play_pcap_audio="sipp/dtmf_2833_star.pcap" />
+	</action>
+  </nop>
+
+  <!-- This pause gives enough time to play the DTMF -->
+  <pause milliseconds="160" />
+
+  <send retrans="500">
+    <![CDATA[
+
+      BYE sip:test@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:test1@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 2 BYE
+      Contact: sip:test1@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Subject: Performance Test
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <recv response="200" crlf="true">
+  </recv>
+
+  <!-- definition of the response time repartition table (unit is ms)   -->
+  <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
+
+  <!-- definition of the call length repartition table (unit is ms)     -->
+  <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
+
+</scenario>
+

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_baseline.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_baseline.xml
------------------------------------------------------------------------------
    svn:executable = *

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_baseline.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_baseline.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_noend.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_noend.xml?view=auto&rev=143
==============================================================================
--- asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_noend.xml (added)
+++ asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_noend.xml Thu Mar 25 11:27:08 2010
@@ -1,0 +1,127 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="DTMF TEST 1">
+  <send retrans="500">
+    <![CDATA[
+
+      INVITE sip:test@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:test1@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: 1 INVITE
+      Contact: sip:test1@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Subject: Performance Test
+      Content-Type: application/sdp
+      Content-Length: [len]
+
+      v=0
+      o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]
+      s=-
+      c=IN IP[media_ip_type] [media_ip]
+      t=0 0
+      m=audio [media_port] RTP/AVP 0 101
+      a=rtpmap:0 PCMU/8000
+      a=rtpmap:101 telephone-event/8000
+
+    ]]>
+  </send>
+
+  <recv response="100"
+        optional="true">
+  </recv>
+
+  <recv response="180" optional="true">
+  </recv>
+
+  <recv response="183" optional="true">
+  </recv>
+
+  <recv response="200" rtd="true">
+  </recv>
+
+  <send>
+    <![CDATA[
+
+	  ACK sip:test@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:test1@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 1 ACK
+      Contact: test1@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Subject: Performance Test
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <!-- Brief pause before sending DTMF... -->
+  <pause milliseconds="500" />
+
+  <nop>
+  	<action>
+		<exec play_pcap_audio="sipp/dtmf_2833_1_noend.pcap" />
+	</action>
+  </nop>
+
+  <!-- This pause gives enough time to play the DTMF -->
+  <pause milliseconds="160" />
+
+  <nop>
+  	<action>
+		<exec play_pcap_audio="sipp/dtmf_2833_2_noend.pcap" />
+	</action>
+  </nop>
+
+  <!-- This pause gives enough time to play the DTMF -->
+  <pause milliseconds="160" />
+
+  <nop>
+  	<action>
+		<exec play_pcap_audio="sipp/dtmf_2833_3_noend.pcap" />
+	</action>
+  </nop>
+
+  <!-- This pause gives enough time to play the DTMF -->
+  <pause milliseconds="160" />
+
+  <nop>
+  	<action>
+		<exec play_pcap_audio="sipp/dtmf_2833_4.pcap" />
+	</action>
+  </nop>
+
+  <!-- This pause gives enough time to play the DTMF -->
+  <pause milliseconds="160" />
+  <send retrans="500">
+    <![CDATA[
+
+      BYE sip:test@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:test1@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 2 BYE
+      Contact: sip:test1@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Subject: Performance Test
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <recv response="200" crlf="true">
+  </recv>
+
+  <!-- definition of the response time repartition table (unit is ms)   -->
+  <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
+
+  <!-- definition of the call length repartition table (unit is ms)     -->
+  <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
+
+</scenario>
+

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_noend.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_noend.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_noend.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/register.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/register.xml?view=auto&rev=143
==============================================================================
--- asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/register.xml (added)
+++ asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/register.xml Thu Mar 25 11:27:08 2010
@@ -1,0 +1,29 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<!--
+This scenario will execute a sip register with the given parameters.
+-->
+
+
+<scenario name="Register">
+	<send retrans="500">
+		<![CDATA[
+
+		REGISTER sip:test1@[remote_ip]:[remote_port] SIP/2.0
+		Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+		From: test1 <sip:test1@[local_ip]:[local_port]>;tag=[call_number]
+		To: test1 <sip:test1@[remote_ip]:[remote_port]>
+		Call-ID: [call_id]
+		CSeq: 1 REGISTER
+		Contact: sip:test1@[local_ip]:[local_port]
+		Content-Length: 0
+		Expires: 120
+
+		]]>
+	</send>
+
+	<recv response="100" optional="true" />
+	<recv response="200"/>
+
+</scenario>
+

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/register.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/register.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/register.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/rfc2833_dtmf_detect/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rfc2833_dtmf_detect/test-config.yaml?view=auto&rev=143
==============================================================================
--- asterisk/trunk/tests/rfc2833_dtmf_detect/test-config.yaml (added)
+++ asterisk/trunk/tests/rfc2833_dtmf_detect/test-config.yaml Thu Mar 25 11:27:08 2010
@@ -1,0 +1,29 @@
+testinfo:
+    summary:     'Test RFC2833 DTMF detection'
+    description: |
+        "This test places several calls to Asterisk using SIPp. SIPp,
+        upon receiving an answer, will use its capability to play pcap
+        files to play a set of DTMF tones toward Asterisk. The Read()
+        dialplan application is used to detect the tones. Afterward, a
+        comparison is made to determine if the detected DTMF is what we
+        expected. The test consists of three calls and three sets of DTMF
+        to be detected.
+
+        Test 1: The RFC2833 DTMF has no oddities to it. This is a basic detection
+        test.
+
+        Test 2: The RFC2833 DTMF has out-of-order packets, thus possibly
+        triggering the false detection of duplicate tones.
+
+        Test 3: The first three DTMF digits contain no end frames. Asterisk
+        should be able to properly handle the situation and still log the
+        DTMF presses.
+    issues:
+        - mantis : '15811'
+
+properties:
+    minversion: '1.4'
+    dependencies:
+        - app : 'bash'
+        - app : 'sipp'
+        - app : 'asttest'

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/test-config.yaml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/test-config.yaml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/test-config.yaml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/rfc2833_dtmf_detect/test.lua
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rfc2833_dtmf_detect/test.lua?view=auto&rev=143
==============================================================================
--- asterisk/trunk/tests/rfc2833_dtmf_detect/test.lua (added)
+++ asterisk/trunk/tests/rfc2833_dtmf_detect/test.lua Thu Mar 25 11:27:08 2010
@@ -1,0 +1,106 @@
+function sipp_exec(scenario, name, local_port)
+	return proc.exec_io("sipp",
+	"127.0.0.1",
+	"-m", "1",
+	"-sf", scenario,
+	"-i", "127.0.0.1",
+	"-p", local_port,
+	"-timeout", "30",
+	"-trace_err"
+	)
+end
+
+function sipp_exec_and_wait(scenario, name, local_port)
+	return sipp_check_error(sipp_exec(scenario, name, local_port), scenario)
+end
+
+function sipp_check_error(p, scenario)
+	local res, err = p:wait()
+
+	if not res then error(err) end
+	if res ~= 0 then
+		error("error while executing " .. scenario .. " sipp scenario (sipp exited with status " .. res .. ")\n" .. p.stderr:read("*a"))
+	end
+
+	return res, err
+end
+
+function varset_event_one(event)
+	if (event["Variable"] == "READRESULT") then
+		if (event["Value"] ~= "123456789*") then
+			fail("DTMF not detected properly. Expected '123456789*' but received " .. event["Value"])
+		end
+	end
+end
+
+function varset_event_two(event)
+	if (event["Variable"] == "READRESULT") then
+		if (event["Value"] ~= "1000") then
+			fail("DTMF not detected properly. Expected '1000' but received " .. event["Value"])
+		end
+	end
+end
+
+function varset_event_three(event)
+	if (event["Variable"] == "READRESULT") then
+		if (event["Value"] ~= "1234") then
+			fail("DTMF not detected properly. Expected '1234' but received " .. event["Value"])
+		end
+	end
+end
+
+function manager_setup(a)
+	m,err = a:manager_connect()
+	if not m then
+		fail("error connecting to asterisk: " .. err)
+	end
+
+	login = ast.manager.action:new("login")
+	login["Username"] = "asttest"
+	login["Secret"] = "asttest"
+
+	local r = m(login)
+	if not r then
+		fail("error logging in to the manager: " .. err)
+	end
+
+	if r["Response"] ~= "Success" then
+		fail("error authenticating: " .. r["Message"])
+	end
+end
+
+function test_call(scenario, handler, name, local_port)
+	m:register_event("VarSet", handler)
+	local t1 = sipp_exec(scenario, name, local_port)
+
+	--wait for everything to finish
+	sipp_check_error(t1, scenario)
+	posix.sleep(1)
+	local res, err = m:pump_messages()
+	if not res then
+		fail("error pumping manager messages: " .. err)
+	end
+	m:process_events()
+	m:unregister_event("VarSet", handler)
+end
+
+function do_dtmf_and_check_results(name)
+	local a = ast.new()
+	a:load_config("configs/sip.conf")
+	a:load_config("configs/extensions.conf")
+	a:generate_manager_conf()
+	a:spawn()
+
+	manager_setup(a)
+
+	--register our peer
+	sipp_exec_and_wait("sipp/register.xml", name, "5061")
+
+	test_call("sipp/dtmf_baseline.xml", varset_event_one, name, "5061")
+	test_call("sipp/broken_dtmf.xml", varset_event_two, name, "5061")
+	test_call("sipp/dtmf_noend.xml", varset_event_three, name, "5061")
+
+	a:term_or_kill()
+end
+
+do_dtmf_and_check_results("test1")

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/test.lua
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/test.lua
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/rfc2833_dtmf_detect/test.lua
------------------------------------------------------------------------------

[... 13 lines stripped ...]



More information about the svn-commits mailing list