[asterisk-commits] mjordan: testsuite/asterisk/trunk r4970 - in /asterisk/trunk/tests/channels/p...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Apr 17 16:05:49 CDT 2014


Author: mjordan
Date: Thu Apr 17 16:05:43 2014
New Revision: 4970

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=4970
Log:
tests/channels/pjsip: Add tests for INFO DTMF

This patch adds a test that checks to see that a DTMF character can be received
through a SIP INFO request using the res_pjsip stack.

- The test covers DTMF characters A-D, 0-9, *, and #. Note that it currently
  skips the "!" and blank characters.
- Tests all DTMF characters with and without a specified duration.

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

ASTERISK-23451 #close
patches:
  pjsip_dtmf_info_diff uploaded by bford (License 6580)

Added:
    asterisk/trunk/tests/channels/pjsip/info_dtmf/
    asterisk/trunk/tests/channels/pjsip/info_dtmf/configs/
    asterisk/trunk/tests/channels/pjsip/info_dtmf/configs/ast1/
    asterisk/trunk/tests/channels/pjsip/info_dtmf/configs/ast1/extensions.conf   (with props)
    asterisk/trunk/tests/channels/pjsip/info_dtmf/configs/ast1/pjsip.conf   (with props)
    asterisk/trunk/tests/channels/pjsip/info_dtmf/sipp/
    asterisk/trunk/tests/channels/pjsip/info_dtmf/sipp/dtmf-duration.xml   (with props)
    asterisk/trunk/tests/channels/pjsip/info_dtmf/sipp/dtmf.xml   (with props)
    asterisk/trunk/tests/channels/pjsip/info_dtmf/test-config.yaml   (with props)
Modified:
    asterisk/trunk/tests/channels/pjsip/tests.yaml

Added: asterisk/trunk/tests/channels/pjsip/info_dtmf/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/info_dtmf/configs/ast1/extensions.conf?view=auto&rev=4970
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/info_dtmf/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/channels/pjsip/info_dtmf/configs/ast1/extensions.conf Thu Apr 17 16:05:43 2014
@@ -1,0 +1,5 @@
+[default]
+
+exten => dtmf,1,NoOp()
+    same => n,Answer()
+    same => n,MusicOnHold()

Propchange: asterisk/trunk/tests/channels/pjsip/info_dtmf/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/channels/pjsip/info_dtmf/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/channels/pjsip/info_dtmf/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/channels/pjsip/info_dtmf/configs/ast1/pjsip.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/info_dtmf/configs/ast1/pjsip.conf?view=auto&rev=4970
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/info_dtmf/configs/ast1/pjsip.conf (added)
+++ asterisk/trunk/tests/channels/pjsip/info_dtmf/configs/ast1/pjsip.conf Thu Apr 17 16:05:43 2014
@@ -1,0 +1,33 @@
+[local]
+type=transport
+protocol=udp
+bind=0.0.0.0
+
+[endpoint_t](!)
+type=endpoint
+context=default
+transport=local
+direct_media=no
+disallow=all
+allow=ulaw
+dtmf_mode=info
+
+[aor_t](!)
+type=aor
+max_contacts=1
+
+;; test
+
+[test](endpoint_t)
+aors=test
+
+[test](aor_t)
+contact=sip:test at localhost:5061
+
+;; test2
+
+[test2](endpoint_t)
+aors=test2
+
+[test2](aor_t)
+contact=sip:test2 at localhost:5062

Propchange: asterisk/trunk/tests/channels/pjsip/info_dtmf/configs/ast1/pjsip.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/channels/pjsip/info_dtmf/configs/ast1/pjsip.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/channels/pjsip/info_dtmf/configs/ast1/pjsip.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/channels/pjsip/info_dtmf/sipp/dtmf-duration.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/info_dtmf/sipp/dtmf-duration.xml?view=auto&rev=4970
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/info_dtmf/sipp/dtmf-duration.xml (added)
+++ asterisk/trunk/tests/channels/pjsip/info_dtmf/sipp/dtmf-duration.xml Thu Apr 17 16:05:43 2014
@@ -1,0 +1,444 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="INFO Test with duration">
+  <send retrans="500">
+    <![CDATA[
+
+      INVITE sip:dtmf@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test2 <sip:test2@[local_ip]:[local_port]>;tag=[call_number]
+      To: dtmf <sip:dtmf@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: 1 INVITE
+      Contact: sip:test2@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Subject: INFO Test
+      Content-Length: [len]
+
+      v=0
+      o=phoneA 53655765 2353687637 IN IP[local_ip_type] [local_ip]
+      s=-
+      c=IN IP[media_ip_type] [media_ip]
+      t=0 0
+      m=audio 6000 RTP/AVP 0
+      a=rtpmap:0 PCMU/8000
+
+    ]]>
+  </send>
+
+  <recv response="100" optional="true">
+  </recv>
+
+  <recv response="200" rtd="true">
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      ACK sip:dtmf@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test2 <sip:test2@[local_ip]:[local_port]>;tag=[call_number]
+      To: dtmf <sip:dtmf@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 1 ACK
+      Contact: sip:test2@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Subject: INFO Test
+      Content-Type: application/sdp
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <send retrans="500">
+    <![CDATA[
+
+      INFO sip:test2@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: dtmf <sip:dtmf@[local_ip]:[local_port]>;tag=[call_number]
+      To: test2 <sip:test2@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 2 INFO
+      Contact: sip:test2@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Content-Type: application/dtmf-relay
+      Content-Length: [len]
+
+      Signal=0
+      Duration=150
+
+    ]]>
+  </send>
+
+  <recv response="200" crlf="true">
+  </recv>
+
+  <send retrans="500">
+    <![CDATA[
+
+      INFO sip:test2@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: dtmf <sip:dtmf@[local_ip]:[local_port]>;tag=[call_number]
+      To: test2 <sip:test2@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 3 INFO
+      Contact: sip:test2@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Content-Type: application/dtmf-relay
+      Content-Length: [len]
+
+      Signal=1
+      Duration=150
+
+    ]]>
+  </send>
+
+  <recv response="200" crlf="true">
+  </recv>
+
+  <send retrans="500">
+    <![CDATA[
+
+      INFO sip:test2@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: dtmf <sip:dtmf@[local_ip]:[local_port]>;tag=[call_number]
+      To: test2 <sip:test2@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 4 INFO
+      Contact: sip:test2@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Content-Type: application/dtmf-relay
+      Content-Length: [len]
+
+      Signal=2
+      Duration=150
+
+    ]]>
+  </send>
+
+  <recv response="200" crlf="true">
+  </recv>
+
+  <send retrans="500">
+    <![CDATA[
+
+      INFO sip:test2@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: dtmf <sip:dtmf@[local_ip]:[local_port]>;tag=[call_number]
+      To: test2 <sip:test2@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 5 INFO
+      Contact: sip:test2@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Content-Type: application/dtmf-relay
+      Content-Length: [len]
+
+      Signal=3
+      Duration=150
+
+    ]]>
+  </send>
+
+  <recv response="200" crlf="true">
+  </recv>
+
+  <send retrans="500">
+    <![CDATA[
+
+      INFO sip:test2@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: dtmf <sip:dtmf@[local_ip]:[local_port]>;tag=[call_number]
+      To: test2 <sip:test2@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 6 INFO
+      Contact: sip:test2@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Content-Type: application/dtmf-relay
+      Content-Length: [len]
+
+      Signal=4
+      Duration=150
+
+    ]]>
+  </send>
+
+  <recv response="200" crlf="true">
+  </recv>
+
+  <send retrans="500">
+    <![CDATA[
+
+      INFO sip:test2@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: dtmf <sip:dtmf@[local_ip]:[local_port]>;tag=[call_number]
+      To: test2 <sip:test2@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 7 INFO
+      Contact: sip:test2@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Content-Type: application/dtmf-relay
+      Content-Length: [len]
+
+      Signal=5
+      Duration=150
+
+    ]]>
+  </send>
+
+  <recv response="200" crlf="true">
+  </recv>
+
+  <send retrans="500">
+    <![CDATA[
+
+      INFO sip:test2@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: dtmf <sip:dtmf@[local_ip]:[local_port]>;tag=[call_number]
+      To: test2 <sip:test2@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 8 INFO
+      Contact: sip:test2@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Content-Type: application/dtmf-relay
+      Content-Length: [len]
+
+      Signal=6
+      Duration=150
+
+    ]]>
+  </send>
+
+  <recv response="200" crlf="true">
+  </recv>
+
+  <send retrans="500">
+    <![CDATA[
+
+      INFO sip:test2@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: dtmf <sip:dtmf@[local_ip]:[local_port]>;tag=[call_number]
+      To: test2 <sip:test2@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 9 INFO
+      Contact: sip:test2@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Content-Type: application/dtmf-relay
+      Content-Length: [len]
+
+      Signal=7
+      Duration=150
+
+    ]]>
+  </send>
+
+  <recv response="200" crlf="true">
+  </recv>
+
+  <send retrans="500">
+    <![CDATA[
+
+      INFO sip:test2@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: dtmf <sip:dtmf@[local_ip]:[local_port]>;tag=[call_number]
+      To: test2 <sip:test2@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 10 INFO
+      Contact: sip:test2@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Content-Type: application/dtmf-relay
+      Content-Length: [len]
+
+      Signal=8
+      Duration=150
+
+    ]]>
+  </send>
+
+  <recv response="200" crlf="true">
+  </recv>
+
+  <send retrans="500">
+    <![CDATA[
+
+      INFO sip:test2@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: dtmf <sip:dtmf@[local_ip]:[local_port]>;tag=[call_number]
+      To: test2 <sip:test2@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 11 INFO
+      Contact: sip:test2@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Content-Type: application/dtmf-relay
+      Content-Length: [len]
+
+      Signal=9
+      Duration=150
+
+    ]]>
+  </send>
+
+  <recv response="200" crlf="true">
+  </recv>
+
+  <send retrans="500">
+    <![CDATA[
+
+      INFO sip:test2@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: dtmf <sip:dtmf@[local_ip]:[local_port]>;tag=[call_number]
+      To: test2 <sip:test2@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 12 INFO
+      Contact: sip:test2@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Content-Type: application/dtmf-relay
+      Content-Length: [len]
+
+      Signal=10
+      Duration=150
+
+    ]]>
+  </send>
+
+  <recv response="200" crlf="true">
+  </recv>
+
+  <send retrans="500">
+    <![CDATA[
+
+      INFO sip:test2@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: dtmf <sip:dtmf@[local_ip]:[local_port]>;tag=[call_number]
+      To: test2 <sip:test2@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 13 INFO
+      Contact: sip:test2@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Content-Type: application/dtmf-relay
+      Content-Length: [len]
+
+      Signal=11
+      Duration=150
+
+    ]]>
+  </send>
+
+  <recv response="200" crlf="true">
+  </recv>
+
+  <send retrans="500">
+    <![CDATA[
+
+      INFO sip:test2@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: dtmf <sip:dtmf@[local_ip]:[local_port]>;tag=[call_number]
+      To: test2 <sip:test2@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 14 INFO
+      Contact: sip:test2@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Content-Type: application/dtmf-relay
+      Content-Length: [len]
+
+      Signal=12
+      Duration=150
+
+    ]]>
+  </send>
+
+  <recv response="200" crlf="true">
+  </recv>
+
+  <send retrans="500">
+    <![CDATA[
+
+      INFO sip:test2@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: dtmf <sip:dtmf@[local_ip]:[local_port]>;tag=[call_number]
+      To: test2 <sip:test2@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 15 INFO
+      Contact: sip:test2@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Content-Type: application/dtmf-relay
+      Content-Length: [len]
+
+      Signal=13
+      Duration=150
+
+    ]]>
+  </send>
+
+  <recv response="200" crlf="true">
+  </recv>
+
+  <send retrans="500">
+    <![CDATA[
+
+      INFO sip:test2@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: dtmf <sip:dtmf@[local_ip]:[local_port]>;tag=[call_number]
+      To: test2 <sip:test2@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 16 INFO
+      Contact: sip:test2@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Content-Type: application/dtmf-relay
+      Content-Length: [len]
+
+      Signal=14
+      Duration=150
+
+    ]]>
+  </send>
+
+  <recv response="200" crlf="true">
+  </recv>
+
+  <send retrans="500">
+    <![CDATA[
+
+      INFO sip:test2@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: dtmf <sip:dtmf@[local_ip]:[local_port]>;tag=[call_number]
+      To: test2 <sip:test2@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 17 INFO
+      Contact: sip:test2@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Content-Type: application/dtmf-relay
+      Content-Length: [len]
+
+      Signal=15
+      Duration=150
+
+    ]]>
+  </send>
+
+  <recv response="200" crlf="true">
+  </recv>
+
+  <pause/>
+
+  <send retrans="500">
+    <![CDATA[
+
+      BYE sip:test2@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test2 <sip:test2@[local_ip]:[local_port]>;tag=[call_number]
+      To: dtmf <sip:dtmf@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 18 BYE
+      Contact: sip:test2@[local_ip][local_port]
+      Max-Forwards: 70
+      Subject: INFO Test
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <recv response="200" crlf="true">
+  </recv>
+
+</scenario>

Propchange: asterisk/trunk/tests/channels/pjsip/info_dtmf/sipp/dtmf-duration.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/channels/pjsip/info_dtmf/sipp/dtmf-duration.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/channels/pjsip/info_dtmf/sipp/dtmf-duration.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/channels/pjsip/info_dtmf/sipp/dtmf.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/info_dtmf/sipp/dtmf.xml?view=auto&rev=4970
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/info_dtmf/sipp/dtmf.xml (added)
+++ asterisk/trunk/tests/channels/pjsip/info_dtmf/sipp/dtmf.xml Thu Apr 17 16:05:43 2014
@@ -1,0 +1,428 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="INFO Test no duration">
+  <send retrans="500">
+    <![CDATA[
+
+      INVITE sip:dtmf@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test <sip:test@[local_ip]:[local_port]>;tag=[call_number]
+      To: dtmf <sip:dtmf@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: 1 INVITE
+      Contact: sip:test@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Subject: INFO Test
+      Content-Length: [len]
+
+      v=0
+      o=phoneA 53655765 2353687637 IN IP[local_ip_type] [local_ip]
+      s=-
+      c=IN IP[media_ip_type] [media_ip]
+      t=0 0
+      m=audio 6000 RTP/AVP 0
+      a=rtpmap:0 PCMU/8000
+
+    ]]>
+  </send>
+
+  <recv response="100" optional="true">
+  </recv>
+
+  <recv response="200" rtd="true">
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      ACK sip:dtmf@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test <sip:test@[local_ip]:[local_port]>;tag=[call_number]
+      To: dtmf <sip:dtmf@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 1 ACK
+      Contact: sip:test@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Subject: INFO Test
+      Content-Type: application/sdp
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <send retrans="500">
+    <![CDATA[
+
+      INFO sip:test@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: dtmf <sip:dtmf@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 2 INFO
+      Contact: sip:test@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Content-Type: application/dtmf
+      Content-Length: [len]
+
+      0
+
+    ]]>
+  </send>
+
+  <recv response="200" crlf="true">
+  </recv>
+
+  <send retrans="500">
+    <![CDATA[
+
+      INFO sip:test@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: dtmf <sip:dtmf@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 3 INFO
+      Contact: sip:test@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Content-Type: application/dtmf
+      Content-Length: [len]
+
+      1
+
+    ]]>
+  </send>
+
+  <recv response="200" crlf="true">
+  </recv>
+
+  <send retrans="500">
+    <![CDATA[
+
+      INFO sip:test@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: dtmf <sip:dtmf@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 4 INFO
+      Contact: sip:test@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Content-Type: application/dtmf
+      Content-Length: [len]
+
+      2
+
+    ]]>
+  </send>
+
+  <recv response="200" crlf="true">
+  </recv>
+
+  <send retrans="500">
+    <![CDATA[
+
+      INFO sip:test@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: dtmf <sip:dtmf@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 5 INFO
+      Contact: sip:test@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Content-Type: application/dtmf
+      Content-Length: [len]
+
+      3
+
+    ]]>
+  </send>
+
+  <recv response="200" crlf="true">
+  </recv>
+
+  <send retrans="500">
+    <![CDATA[
+
+      INFO sip:test@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: dtmf <sip:dtmf@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 6 INFO
+      Contact: sip:test@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Content-Type: application/dtmf
+      Content-Length: [len]
+
+      4
+
+    ]]>
+  </send>
+
+  <recv response="200" crlf="true">
+  </recv>
+
+  <send retrans="500">
+    <![CDATA[
+
+      INFO sip:test@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: dtmf <sip:dtmf@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 7 INFO
+      Contact: sip:test@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Content-Type: application/dtmf
+      Content-Length: [len]
+
+      5
+
+    ]]>
+  </send>
+
+  <recv response="200" crlf="true">
+  </recv>
+
+  <send retrans="500">
+    <![CDATA[
+
+      INFO sip:test@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: dtmf <sip:dtmf@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 8 INFO
+      Contact: sip:test@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Content-Type: application/dtmf
+      Content-Length: [len]
+
+      6
+
+    ]]>
+  </send>
+
+  <recv response="200" crlf="true">
+  </recv>
+
+  <send retrans="500">
+    <![CDATA[
+
+      INFO sip:test@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: dtmf <sip:dtmf@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 9 INFO
+      Contact: sip:test@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Content-Type: application/dtmf
+      Content-Length: [len]
+
+      7
+
+    ]]>
+  </send>
+
+  <recv response="200" crlf="true">
+  </recv>
+
+  <send retrans="500">
+    <![CDATA[
+
+      INFO sip:test@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: dtmf <sip:dtmf@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 10 INFO
+      Contact: sip:test@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Content-Type: application/dtmf
+      Content-Length: [len]
+
+      8
+
+    ]]>
+  </send>
+
+  <recv response="200" crlf="true">
+  </recv>
+
+  <send retrans="500">
+    <![CDATA[
+
+      INFO sip:test@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: dtmf <sip:dtmf@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 11 INFO
+      Contact: sip:test@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Content-Type: application/dtmf
+      Content-Length: [len]
+
+      9
+
+    ]]>
+  </send>
+
+  <recv response="200" crlf="true">
+  </recv>
+
+  <send retrans="500">
+    <![CDATA[
+
+      INFO sip:test@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: dtmf <sip:dtmf@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 12 INFO
+      Contact: sip:test@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Content-Type: application/dtmf
+      Content-Length: [len]
+
+      10
+
+    ]]>
+  </send>
+
+  <recv response="200" crlf="true">
+  </recv>
+
+  <send retrans="500">
+    <![CDATA[
+
+      INFO sip:test@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: dtmf <sip:dtmf@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 13 INFO
+      Contact: sip:test@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Content-Type: application/dtmf
+      Content-Length: [len]
+
+      11
+
+    ]]>
+  </send>
+
+  <recv response="200" crlf="true">
+  </recv>
+
+  <send retrans="500">
+    <![CDATA[
+
+      INFO sip:test@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: dtmf <sip:dtmf@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 14 INFO
+      Contact: sip:test@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Content-Type: application/dtmf
+      Content-Length: [len]
+
+      12
+
+    ]]>
+  </send>
+
+  <recv response="200" crlf="true">
+  </recv>
+
+  <send retrans="500">
+    <![CDATA[
+
+      INFO sip:test@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: dtmf <sip:dtmf@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 15 INFO
+      Contact: sip:test@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Content-Type: application/dtmf
+      Content-Length: [len]
+
+      13
+
+    ]]>
+  </send>
+
+  <recv response="200" crlf="true">
+  </recv>
+
+  <send retrans="500">
+    <![CDATA[
+
+      INFO sip:test@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: dtmf <sip:dtmf@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 16 INFO
+      Contact: sip:test@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Content-Type: application/dtmf
+      Content-Length: [len]
+
+      14
+
+    ]]>
+  </send>
+
+  <recv response="200" crlf="true">
+  </recv>
+
+  <send retrans="500">
+    <![CDATA[
+
+      INFO sip:test@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: dtmf <sip:dtmf@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 17 INFO
+      Contact: sip:test@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Content-Type: application/dtmf
+      Content-Length: [len]
+
+      15
+
+    ]]>
+  </send>
+
+  <recv response="200" crlf="true">
+  </recv>
+
+  <pause/>
+
+  <send retrans="500">
+    <![CDATA[
+
+      BYE sip:dtmf@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test <sip:test@[local_ip]:[local_port]>;tag=[call_number]
+      To: dtmf <sip:dtmf@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 18 BYE
+      Contact: sip:test@[local_ip][local_port]
+      Max-Forwards: 70
+      Subject: INFO Test
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <recv response="200" crlf="true">
+  </recv>
+
+</scenario>

Propchange: asterisk/trunk/tests/channels/pjsip/info_dtmf/sipp/dtmf.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/channels/pjsip/info_dtmf/sipp/dtmf.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/channels/pjsip/info_dtmf/sipp/dtmf.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/channels/pjsip/info_dtmf/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/info_dtmf/test-config.yaml?view=auto&rev=4970
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/info_dtmf/test-config.yaml (added)
+++ asterisk/trunk/tests/channels/pjsip/info_dtmf/test-config.yaml Thu Apr 17 16:05:43 2014
@@ -1,0 +1,48 @@
+testinfo:
+    summary: 'Test that asterisk correctly handles DTMF in SIP packets when using PJSIP.'
+    description:
+        Tests all DMTF characters (0-9 A-D # * !) with and without duration.
+        #Due to a bug (ASTERISK-23537), ignoring "!" and blank DTMF characters.
+
+test-modules:
+    test-object:
+        config-section: test-object-config
+        typename: 'sipp.SIPpTestCase'
+    modules:
+        -
+            config-section: 'ami-config'
+            typename: 'ami.AMIEventModule'
+
+test-object-config:
+    test-iterations:
+        -
+            scenarios:
+                - { 'key-args': {'scenario': 'dtmf.xml', '-i': '127.0.0.1', '-p': '5061', '-d': '3000'} }
+                - { 'key-args': {'scenario': 'dtmf-duration.xml', '-i': '127.0.0.1', '-p': '5062', '-d': '3000'} }
+
+ami-config:
+    -
+        type: 'headermatch'
+        conditions:
+            match:
+                Event: 'DTMFEnd'
+                Direction: 'Received'
+                DurationMs: '100'
+        count: 16
+    -
+        type: 'headermatch'
+        conditions:
+            match:
+                Event: 'DTMFEnd'
+                Direction: 'Received'
+                DurationMs: '150'
+        count: 16
+
+properties:
+    minversion: '12.0.0'
+    dependencies:
+        - app : 'sipp'
+        - asterisk : 'res_pjsip'
+    tags:
+        - pjsip
+        - DTMF

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

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

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

Modified: asterisk/trunk/tests/channels/pjsip/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/tests.yaml?view=diff&rev=4970&r1=4969&r2=4970
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/tests.yaml (original)
+++ asterisk/trunk/tests/channels/pjsip/tests.yaml Thu Apr 17 16:05:43 2014
@@ -20,4 +20,5 @@
     - test: 'qualify'
     - test: 'headers'
     - dir: 'transfers'
+    - test: 'info_dtmf'
 




More information about the asterisk-commits mailing list