[asterisk-commits] kharwell: testsuite/asterisk/trunk r6120 - in /asterisk/trunk/tests/channels/...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Dec 18 09:55:14 CST 2014


Author: kharwell
Date: Thu Dec 18 09:55:10 2014
New Revision: 6120

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=6120
Log:
res_pjsip_sdp_rtp: Incompatible DTMF mode test

Checks to make sure that if two pjsip endpoints with incompatible DTMF modes
are connected the appropriate bridge type is chosen.

ASTERISK-24459
Reported by: Yaniv Simhi
Review: https://reviewboard.asterisk.org/r/4266/

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

Added: asterisk/trunk/tests/channels/pjsip/dtmf_incompatible/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/dtmf_incompatible/configs/ast1/extensions.conf?view=auto&rev=6120
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/dtmf_incompatible/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/channels/pjsip/dtmf_incompatible/configs/ast1/extensions.conf Thu Dec 18 09:55:10 2014
@@ -1,0 +1,3 @@
+[default]
+exten => bob,1,Dial(PJSIP/${EXTEN})
+      same => n,Hangup()

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

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

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

Added: asterisk/trunk/tests/channels/pjsip/dtmf_incompatible/configs/ast1/pjsip.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/dtmf_incompatible/configs/ast1/pjsip.conf?view=auto&rev=6120
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/dtmf_incompatible/configs/ast1/pjsip.conf (added)
+++ asterisk/trunk/tests/channels/pjsip/dtmf_incompatible/configs/ast1/pjsip.conf Thu Dec 18 09:55:10 2014
@@ -1,0 +1,39 @@
+[local]
+type=transport
+bind=0.0.0.0
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+[endpoint_t](!)
+type=endpoint
+context=default
+transport=local
+direct_media=no
+disallow=all
+allow=ulaw
+
+[aor_t](!)
+type=aor
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; alice
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+[alice](aor_t)
+contact=sip:alice at localhost:5061
+
+[alice](endpoint_t)
+aors=alice
+dtmf_mode=inband
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; bob
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+[bob](aor_t)
+contact=sip:bob at localhost:5062
+
+[bob](endpoint_t)
+aors=bob
+dtmf_mode=rfc4733
+

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

Propchange: asterisk/trunk/tests/channels/pjsip/dtmf_incompatible/configs/ast1/pjsip.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Rev URL

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

Added: asterisk/trunk/tests/channels/pjsip/dtmf_incompatible/sipp/invite.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/dtmf_incompatible/sipp/invite.xml?view=auto&rev=6120
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/dtmf_incompatible/sipp/invite.xml (added)
+++ asterisk/trunk/tests/channels/pjsip/dtmf_incompatible/sipp/invite.xml Thu Dec 18 09:55:10 2014
@@ -1,0 +1,71 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="Invite with variables">
+	<send retrans="500">
+		<![CDATA[
+                        INVITE sip:bob@[remote_ip]:[remote_port] SIP/2.0
+                        Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+                        From: "alice" <sip:alice@[local_ip]:[local_port]>;tag=[call_number]
+                        To: "bob" <sip:bob@[remote_ip]:[remote_port]>
+                        Call-ID: [call_id]
+                        CSeq: [cseq] INVITE
+                        Contact: sip:alice@[local_ip]:[local_port]
+                        Max-Forwards: 70
+                        Content-Type: application/sdp
+                        Content-Length: [len]
+
+			v=0
+			o=- 1324901698 1324901698 IN IP4 [local_ip]
+			s=-
+			c=IN IP4 [local_ip]
+			t=0 0
+			m=audio 2226 RTP/AVP 0 101
+			a=sendrecv
+			a=rtpmap:0 PCMU/8000
+			a=rtpmap:101 telephone-event/8000
+
+		]]>
+	</send>
+
+	<recv response="100" optional="true" />
+
+	<recv response="180" optional="true" />
+
+	<recv response="200" />
+
+	<send>
+		<![CDATA[
+			ACK sip:bob@[remote_ip]:[remote_port] SIP/2.0
+			Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+			From: <sip:alice@[local_ip]>;tag=[call_number]
+			To: <sip:bob@[remote_ip]:[remote_port]>[peer_tag_param]
+			CSeq: [cseq] ACK
+			Call-ID: [call_id]
+			Contact: <sip:alice@[local_ip]>
+                        Allow: INVITE, ACK, MESSAGE, BYE
+			Max-Forwards: 70
+			Content-Length: 0
+
+		]]>
+	</send>
+
+	<recv request="BYE" crlf="true" />
+
+	<send retrans="500">
+		<![CDATA[
+			SIP/2.0 200 OK
+			[last_Via:]
+			[last_From:]
+			[last_To:];tag=[call_number]
+			[last_Call-ID:]
+			[last_CSeq:]
+			Contact: <sip:alice@[local_ip]:[local_port];transport=[transport]>
+                        Allow: INVITE, ACK, MESSAGE, BYE
+			Content-Type: application/sdp
+			Content-Length: 0
+
+		]]>
+	</send>
+
+</scenario>

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

Propchange: asterisk/trunk/tests/channels/pjsip/dtmf_incompatible/sipp/invite.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Rev URL

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

Added: asterisk/trunk/tests/channels/pjsip/dtmf_incompatible/sipp/invite_recv.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/dtmf_incompatible/sipp/invite_recv.xml?view=auto&rev=6120
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/dtmf_incompatible/sipp/invite_recv.xml (added)
+++ asterisk/trunk/tests/channels/pjsip/dtmf_incompatible/sipp/invite_recv.xml Thu Dec 18 09:55:10 2014
@@ -1,0 +1,77 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="Invite with variables">
+  <Global variables="remote_tag" />
+  <recv request="INVITE" crlf="true">
+      <!-- Save the from tag. We'll need it when we send our BYE -->
+      <action>
+          <ereg regexp=".*(;tag=.*)"
+              header="From:"
+              search_in="hdr"
+              check_it="true"
+              assign_to="remote_tag"/>
+	  </action>
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      SIP/2.0 180 Ringing
+      [last_Via:]
+      [last_From:]
+      [last_To:];tag=[pid]SIPpTag01[call_number]
+      [last_Call-ID:]
+      [last_CSeq:]
+      Contact: <sip:[local_ip]:[local_port];transport=[transport]>
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <send retrans="500">
+    <![CDATA[
+
+      SIP/2.0 200 OK
+      [last_Via:]
+      [last_From:]
+      [last_To:];tag=[pid]SIPpTag01[call_number]
+      [last_Call-ID:]
+      [last_CSeq:]
+      Contact: <sip:[local_ip]:[local_port];transport=[transport]>
+      Content-Type: application/sdp
+      Content-Length: [len]
+
+      v=0
+      o=- 1324901698 1324901698 IN IP4 [local_ip]
+      s=-
+      c=IN IP4 [local_ip]
+      t=0 0
+      m=audio 2226 RTP/AVP 0 101
+      a=sendrecv
+      a=rtpmap:0 PCMU/8000
+      a=rtpmap:101 telephone-event/8000
+    ]]>
+  </send>
+
+  <recv request="ACK" rtd="true" crlf="true" />
+
+  <send retrans="500">
+    <![CDATA[
+
+      BYE sip:alice@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: <sip:bob@[local_ip]:[local_port]>;tag=[pid]SIPpTag01[call_number]
+      To: [$remote_tag]
+      [last_Call-ID:]
+      CSeq: [cseq] BYE
+      Contact: sip:bob@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Subject: Test
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <recv response="200" />
+</scenario>

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

Propchange: asterisk/trunk/tests/channels/pjsip/dtmf_incompatible/sipp/invite_recv.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Rev URL

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

Added: asterisk/trunk/tests/channels/pjsip/dtmf_incompatible/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/dtmf_incompatible/test-config.yaml?view=auto&rev=6120
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/dtmf_incompatible/test-config.yaml (added)
+++ asterisk/trunk/tests/channels/pjsip/dtmf_incompatible/test-config.yaml Thu Dec 18 09:55:10 2014
@@ -1,0 +1,46 @@
+testinfo:
+    summary: 'Test incompatible DTMF modes.'
+    description: |
+        'Checks to make sure that if two endpoints with incompatible DTMF modes
+         are connected the appropriate bridge type is chosen.'
+
+properties:
+    minversion: '13.2.0'
+    dependencies:
+        - app : 'sipp'
+        - asterisk : 'res_pjsip'
+    tags:
+        - pjsip
+
+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':'invite_recv.xml', '-p':'5062' } }
+                - { 'key-args': { 'scenario':'invite.xml', '-p':'5061' } }
+
+ami-config:
+        -
+            type: 'headermatch'
+            conditions:
+                match:
+                    Event: 'BridgeLeave'
+                    BridgeTechnology: 'simple_bridge'
+            count: 2 # two channels in, two out
+        -
+            type: 'headermatch'
+            conditions:
+                match:
+                    Event: 'BridgeLeave'
+                    BridgeTechnology: 'native_bridge'
+            count: 0 # should never bridge natively
+

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

Propchange: asterisk/trunk/tests/channels/pjsip/dtmf_incompatible/test-config.yaml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Rev URL

Propchange: asterisk/trunk/tests/channels/pjsip/dtmf_incompatible/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=6120&r1=6119&r2=6120
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/tests.yaml (original)
+++ asterisk/trunk/tests/channels/pjsip/tests.yaml Thu Dec 18 09:55:10 2014
@@ -29,3 +29,4 @@
     - dir: 'config_wizard'
     - dir: 'optimistic_srtp'
     - test: 'in_dialog_invite_replaces'
+    - test: 'dtmf_incompatible'




More information about the asterisk-commits mailing list