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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Sep 18 09:27:11 CDT 2013


Author: kharwell
Date: Wed Sep 18 09:27:02 2013
New Revision: 4204

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=4204
Log:
Testsuite: pjsip call forwarding tests

Call forwarding testsuite tests for the new sip channel driver.  Various
tests to make sure the diversion header gets appropriately added during
call forwarding.

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

Added:
    asterisk/trunk/tests/channels/pjsip/diversion/
    asterisk/trunk/tests/channels/pjsip/diversion/diversion_basic/
    asterisk/trunk/tests/channels/pjsip/diversion/diversion_basic/configs/
    asterisk/trunk/tests/channels/pjsip/diversion/diversion_basic/configs/ast1/
    asterisk/trunk/tests/channels/pjsip/diversion/diversion_basic/configs/ast1/extensions.conf   (with props)
    asterisk/trunk/tests/channels/pjsip/diversion/diversion_basic/configs/ast1/pjsip.conf   (with props)
    asterisk/trunk/tests/channels/pjsip/diversion/diversion_basic/sipp/
    asterisk/trunk/tests/channels/pjsip/diversion/diversion_basic/sipp/user1.xml   (with props)
    asterisk/trunk/tests/channels/pjsip/diversion/diversion_basic/sipp/user2.xml   (with props)
    asterisk/trunk/tests/channels/pjsip/diversion/diversion_basic/sipp/user3.xml   (with props)
    asterisk/trunk/tests/channels/pjsip/diversion/diversion_basic/test-config.yaml   (with props)
    asterisk/trunk/tests/channels/pjsip/diversion/diversion_caller_id/
    asterisk/trunk/tests/channels/pjsip/diversion/diversion_caller_id/configs/
    asterisk/trunk/tests/channels/pjsip/diversion/diversion_caller_id/configs/ast1/
    asterisk/trunk/tests/channels/pjsip/diversion/diversion_caller_id/configs/ast1/extensions.conf   (with props)
    asterisk/trunk/tests/channels/pjsip/diversion/diversion_caller_id/configs/ast1/pjsip.conf   (with props)
    asterisk/trunk/tests/channels/pjsip/diversion/diversion_caller_id/sipp/
    asterisk/trunk/tests/channels/pjsip/diversion/diversion_caller_id/sipp/user1.xml   (with props)
    asterisk/trunk/tests/channels/pjsip/diversion/diversion_caller_id/sipp/user2.xml   (with props)
    asterisk/trunk/tests/channels/pjsip/diversion/diversion_caller_id/sipp/user3.xml   (with props)
    asterisk/trunk/tests/channels/pjsip/diversion/diversion_caller_id/test-config.yaml   (with props)
    asterisk/trunk/tests/channels/pjsip/diversion/diversion_request/
    asterisk/trunk/tests/channels/pjsip/diversion/diversion_request/configs/
    asterisk/trunk/tests/channels/pjsip/diversion/diversion_request/configs/ast1/
    asterisk/trunk/tests/channels/pjsip/diversion/diversion_request/configs/ast1/extensions.conf   (with props)
    asterisk/trunk/tests/channels/pjsip/diversion/diversion_request/configs/ast1/pjsip.conf   (with props)
    asterisk/trunk/tests/channels/pjsip/diversion/diversion_request/sipp/
    asterisk/trunk/tests/channels/pjsip/diversion/diversion_request/sipp/user1.xml   (with props)
    asterisk/trunk/tests/channels/pjsip/diversion/diversion_request/sipp/user2.xml   (with props)
    asterisk/trunk/tests/channels/pjsip/diversion/diversion_request/test-config.yaml   (with props)
    asterisk/trunk/tests/channels/pjsip/diversion/diversion_response/
    asterisk/trunk/tests/channels/pjsip/diversion/diversion_response/configs/
    asterisk/trunk/tests/channels/pjsip/diversion/diversion_response/configs/ast1/
    asterisk/trunk/tests/channels/pjsip/diversion/diversion_response/configs/ast1/extensions.conf   (with props)
    asterisk/trunk/tests/channels/pjsip/diversion/diversion_response/configs/ast1/pjsip.conf   (with props)
    asterisk/trunk/tests/channels/pjsip/diversion/diversion_response/sipp/
    asterisk/trunk/tests/channels/pjsip/diversion/diversion_response/sipp/user1.xml   (with props)
    asterisk/trunk/tests/channels/pjsip/diversion/diversion_response/sipp/user2.xml   (with props)
    asterisk/trunk/tests/channels/pjsip/diversion/diversion_response/sipp/user3.xml   (with props)
    asterisk/trunk/tests/channels/pjsip/diversion/diversion_response/test-config.yaml   (with props)
    asterisk/trunk/tests/channels/pjsip/diversion/tests.yaml   (with props)
Modified:
    asterisk/trunk/tests/channels/pjsip/tests.yaml

Added: asterisk/trunk/tests/channels/pjsip/diversion/diversion_basic/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/diversion/diversion_basic/configs/ast1/extensions.conf?view=auto&rev=4204
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/diversion/diversion_basic/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/channels/pjsip/diversion/diversion_basic/configs/ast1/extensions.conf Wed Sep 18 09:27:02 2013
@@ -1,0 +1,7 @@
+[general]
+
+[default]
+
+exten => user1,1,Dial(PJSIP/user1)
+exten => user2,1,Dial(PJSIP/user2)
+exten => user3,1,Dial(PJSIP/user3)

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

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

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

Added: asterisk/trunk/tests/channels/pjsip/diversion/diversion_basic/configs/ast1/pjsip.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/diversion/diversion_basic/configs/ast1/pjsip.conf?view=auto&rev=4204
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/diversion/diversion_basic/configs/ast1/pjsip.conf (added)
+++ asterisk/trunk/tests/channels/pjsip/diversion/diversion_basic/configs/ast1/pjsip.conf Wed Sep 18 09:27:02 2013
@@ -1,0 +1,40 @@
+[local]
+type=transport
+protocol=udp
+bind=0.0.0.0
+
+[user1-aors]
+type=aor
+contact=sip:user1 at 127.0.0.1:5061
+
+[user1]
+type=endpoint
+context=default
+aors=user1-aors
+direct_media=no
+disallow=all
+allow=ulaw
+
+[user2-aors]
+type=aor
+contact=sip:user2 at 127.0.0.1:5062
+
+[user2]
+type=endpoint
+context=default
+aors=user2-aors
+direct_media=no
+disallow=all
+allow=ulaw
+
+[user3-aors]
+type=aor
+contact=sip:user3 at 127.0.0.1:5063
+
+[user3]
+type=endpoint
+context=default
+aors=user3-aors
+direct_media=no
+disallow=all
+allow=ulaw

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

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

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

Added: asterisk/trunk/tests/channels/pjsip/diversion/diversion_basic/sipp/user1.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/diversion/diversion_basic/sipp/user1.xml?view=auto&rev=4204
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/diversion/diversion_basic/sipp/user1.xml (added)
+++ asterisk/trunk/tests/channels/pjsip/diversion/diversion_basic/sipp/user1.xml Wed Sep 18 09:27:02 2013
@@ -1,0 +1,68 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<scenario name="send an invite to user2">
+	<send retrans="500">
+		<![CDATA[
+                        INVITE sip:user2@[remote_ip]:[remote_port] SIP/2.0
+                        Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+                        From: user1 <sip:user1@[local_ip]:[local_port]>;tag=[call_number]
+                        To: user2 <sip:user2@[remote_ip]:[remote_port]>
+                        Call-ID: [call_id]
+                        CSeq: [cseq] INVITE
+                        Contact: sip:user1@[local_ip]:[local_port]
+                        Max-Forwards: 70
+                        Content-Type: application/sdp
+                        Content-Length: [len]
+
+			v=0
+			o=- 1324901698 1324901698 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=sendrecv
+			a=rtpmap:0 PCMU/8000
+			a=rtpmap:101 telephone-event/8000
+
+		]]>
+	</send>
+
+	<recv response="100" optional="true" />
+
+	<recv response="181" optional="true" />
+
+	<recv response="180" optional="true" />
+
+	<recv response="183" optional="true" />
+
+	<recv response="200" />
+
+	<send>
+		<![CDATA[
+			ACK sip:user3@[remote_ip]:[remote_port] SIP/2.0
+			Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+			From: <sip:user1@[local_ip]>;tag=[call_number]
+			To: <sip:user3@[remote_ip]:[remote_port]>[peer_tag_param]
+			CSeq: [cseq] ACK
+			Call-ID: [call_id]
+			Max-Forwards: 70
+			Content-Length: 0
+
+		]]>
+	</send>
+	<pause milliseconds="3000"/>
+	<send retrans="500">
+		<![CDATA[
+			BYE sip:user3@[remote_ip]:[remote_port] SIP/2.0
+			Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+			From: <sip:user1@[local_ip]>;tag=[call_number]
+			To: <sip:user3@[remote_ip]:[remote_port]>[peer_tag_param]
+			CSeq: [cseq] BYE
+			Call-ID: [call_id]
+			Max-Forwards: 70
+			Content-Length: 0
+		]]>
+	</send>
+
+	<recv response="200" crlf="true" />
+</scenario>

Propchange: asterisk/trunk/tests/channels/pjsip/diversion/diversion_basic/sipp/user1.xml
------------------------------------------------------------------------------
    svn:eol-style = native

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

Propchange: asterisk/trunk/tests/channels/pjsip/diversion/diversion_basic/sipp/user1.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/channels/pjsip/diversion/diversion_basic/sipp/user2.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/diversion/diversion_basic/sipp/user2.xml?view=auto&rev=4204
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/diversion/diversion_basic/sipp/user2.xml (added)
+++ asterisk/trunk/tests/channels/pjsip/diversion/diversion_basic/sipp/user2.xml Wed Sep 18 09:27:02 2013
@@ -1,0 +1,20 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<scenario name="send forwarding response back">
+	<recv request="INVITE" crlf="true" />
+
+	<send>
+		<![CDATA[
+			SIP/2.0 302 Moved Temporarily
+			[last_Via:]
+			[last_From:]
+			[last_To:];tag=[call_number]
+			[last_Call-ID:]
+			[last_CSeq:]
+			Contact: <sip:user3@[local_ip]>
+			Content-Length: 0
+		]]>
+	</send>
+
+	<recv request="ACK"/>
+</scenario>

Propchange: asterisk/trunk/tests/channels/pjsip/diversion/diversion_basic/sipp/user2.xml
------------------------------------------------------------------------------
    svn:eol-style = native

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

Propchange: asterisk/trunk/tests/channels/pjsip/diversion/diversion_basic/sipp/user2.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/channels/pjsip/diversion/diversion_basic/sipp/user3.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/diversion/diversion_basic/sipp/user3.xml?view=auto&rev=4204
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/diversion/diversion_basic/sipp/user3.xml (added)
+++ asterisk/trunk/tests/channels/pjsip/diversion/diversion_basic/sipp/user3.xml Wed Sep 18 09:27:02 2013
@@ -1,0 +1,80 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<scenario name="receives forwarded call from user2">
+	<recv request="INVITE" crlf="true">
+                <action>
+                        <!-- Check that the Diversion header is present. -->
+	        	<ereg regexp=".*" search_in="hdr" header="Diversion:" check_it="true" assign_to="1" />
+		        <log message="Received INVITE with Diversion header: [$1]." />
+		</action>
+        </recv>
+
+	<send>
+		<![CDATA[
+			SIP/2.0 100 Trying
+			[last_Via:]
+			[last_From:]
+			[last_To:];tag=[call_number]
+			[last_Call-ID:]
+			[last_CSeq:]
+			Contact: <sip:user3@[local_ip]:[local_port];transport=[transport]>
+			Content-Length: 0
+		]]>
+	</send>
+
+	<send>
+		<![CDATA[
+			SIP/2.0 180 Ringing
+			[last_Via:]
+			[last_From:]
+			[last_To:];tag=[call_number]
+			[last_Call-ID:]
+			[last_CSeq:]
+			Contact: <sip:user3@[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=[call_number]
+			[last_Call-ID:]
+			[last_CSeq:]
+			Contact: <sip:user3@[local_ip]:[local_port];transport=[transport]>
+			Content-Type: application/sdp
+			Content-Length: [len]
+
+			v=0
+			o=- 1324901698 1324901698 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=sendrecv
+			a=rtpmap:0 PCMU/8000
+			a=rtpmap:101 telephone-event/8000
+
+		]]>
+	</send>
+
+	<recv request="ACK"/>
+
+	<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:]
+			Content-Type: application/sdp
+			Content-Length: 0
+
+		]]>
+	</send>
+</scenario>

Propchange: asterisk/trunk/tests/channels/pjsip/diversion/diversion_basic/sipp/user3.xml
------------------------------------------------------------------------------
    svn:eol-style = native

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

Propchange: asterisk/trunk/tests/channels/pjsip/diversion/diversion_basic/sipp/user3.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/channels/pjsip/diversion/diversion_basic/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/diversion/diversion_basic/test-config.yaml?view=auto&rev=4204
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/diversion/diversion_basic/test-config.yaml (added)
+++ asterisk/trunk/tests/channels/pjsip/diversion/diversion_basic/test-config.yaml Wed Sep 18 09:27:02 2013
@@ -1,0 +1,25 @@
+testinfo:
+    summary: 'Test to make sure an appropriate diversion header gets added when
+              a call is forwarded.'
+    description: |
+        'user1 calls user2 which is set to forward calls to user3.'
+
+properties:
+    minversion: '12'
+    dependencies:
+         - app : 'sipp'
+    tags:
+        - SIP
+
+test-modules:
+    test-object:
+        config-section: test-object-config
+        typename: 'sipp.SIPpTestCase'
+
+test-object-config:
+    test-iterations:
+        -
+             scenarios:
+                - { 'key-args': { 'scenario':'user3.xml', '-p':'5063' } }
+                - { 'key-args': { 'scenario':'user2.xml', '-p':'5062' } }
+                - { 'key-args': { 'scenario':'user1.xml', '-p':'5061' } }

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

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

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

Added: asterisk/trunk/tests/channels/pjsip/diversion/diversion_caller_id/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/diversion/diversion_caller_id/configs/ast1/extensions.conf?view=auto&rev=4204
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/diversion/diversion_caller_id/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/channels/pjsip/diversion/diversion_caller_id/configs/ast1/extensions.conf Wed Sep 18 09:27:02 2013
@@ -1,0 +1,7 @@
+[general]
+
+[default]
+
+exten => user1,1,Dial(PJSIP/user1)
+exten => user2,1,Dial(PJSIP/user2)
+exten => user3,1,Dial(PJSIP/user3)

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

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

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

Added: asterisk/trunk/tests/channels/pjsip/diversion/diversion_caller_id/configs/ast1/pjsip.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/diversion/diversion_caller_id/configs/ast1/pjsip.conf?view=auto&rev=4204
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/diversion/diversion_caller_id/configs/ast1/pjsip.conf (added)
+++ asterisk/trunk/tests/channels/pjsip/diversion/diversion_caller_id/configs/ast1/pjsip.conf Wed Sep 18 09:27:02 2013
@@ -1,0 +1,46 @@
+[local]
+type=transport
+protocol=udp
+bind=0.0.0.0
+
+[user1-aors]
+type=aor
+contact=sip:user1 at 127.0.0.1:5061
+
+[user1]
+type=endpoint
+context=default
+aors=user1-aors
+direct_media=no
+disallow=all
+allow=ulaw
+callerid=khufu <4444>
+send_pai=yes
+
+[user2-aors]
+type=aor
+contact=sip:user2 at 127.0.0.1:5062
+
+[user2]
+type=endpoint
+context=default
+aors=user2-aors
+direct_media=no
+disallow=all
+allow=ulaw
+callerid=amenhotep <1234>
+send_pai=yes
+trust_id_outbound=yes
+
+[user3-aors]
+type=aor
+contact=sip:user3 at 127.0.0.1:5063
+
+[user3]
+type=endpoint
+context=default
+aors=user3-aors
+direct_media=no
+disallow=all
+allow=ulaw
+send_pai=yes

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

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

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

Added: asterisk/trunk/tests/channels/pjsip/diversion/diversion_caller_id/sipp/user1.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/diversion/diversion_caller_id/sipp/user1.xml?view=auto&rev=4204
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/diversion/diversion_caller_id/sipp/user1.xml (added)
+++ asterisk/trunk/tests/channels/pjsip/diversion/diversion_caller_id/sipp/user1.xml Wed Sep 18 09:27:02 2013
@@ -1,0 +1,68 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<scenario name="send an invite to user2">
+	<send retrans="500">
+		<![CDATA[
+                        INVITE sip:user2@[remote_ip]:[remote_port] SIP/2.0
+                        Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+                        From: user1 <sip:user1@[local_ip]:[local_port]>;tag=[call_number]
+                        To: user2 <sip:user2@[remote_ip]:[remote_port]>
+                        Call-ID: [call_id]
+                        CSeq: [cseq] INVITE
+                        Contact: sip:user1@[local_ip]:[local_port]
+                        Max-Forwards: 70
+                        Content-Type: application/sdp
+                        Content-Length: [len]
+
+			v=0
+			o=- 1324901698 1324901698 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=sendrecv
+			a=rtpmap:0 PCMU/8000
+			a=rtpmap:101 telephone-event/8000
+
+		]]>
+	</send>
+
+	<recv response="100" optional="true" />
+
+	<recv response="181" optional="true" />
+
+	<recv response="180" optional="true" />
+
+	<recv response="183" optional="true" />
+
+	<recv response="200" />
+
+	<send>
+		<![CDATA[
+			ACK sip:user3@[remote_ip]:[remote_port] SIP/2.0
+			Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+			From: <sip:user1@[local_ip]>;tag=[call_number]
+			To: <sip:user3@[remote_ip]:[remote_port]>[peer_tag_param]
+			CSeq: [cseq] ACK
+			Call-ID: [call_id]
+			Max-Forwards: 70
+			Content-Length: 0
+
+		]]>
+	</send>
+
+	<send retrans="500">
+		<![CDATA[
+			BYE sip:user3@[remote_ip]:[remote_port] SIP/2.0
+			Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+			From: <sip:user1@[local_ip]>;tag=[call_number]
+			To: <sip:user3@[remote_ip]:[remote_port]>[peer_tag_param]
+			CSeq: [cseq] BYE
+			Call-ID: [call_id]
+			Max-Forwards: 70
+			Content-Length: 0
+		]]>
+	</send>
+
+	<recv response="200" crlf="true" />
+</scenario>

Propchange: asterisk/trunk/tests/channels/pjsip/diversion/diversion_caller_id/sipp/user1.xml
------------------------------------------------------------------------------
    svn:eol-style = native

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

Propchange: asterisk/trunk/tests/channels/pjsip/diversion/diversion_caller_id/sipp/user1.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/channels/pjsip/diversion/diversion_caller_id/sipp/user2.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/diversion/diversion_caller_id/sipp/user2.xml?view=auto&rev=4204
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/diversion/diversion_caller_id/sipp/user2.xml (added)
+++ asterisk/trunk/tests/channels/pjsip/diversion/diversion_caller_id/sipp/user2.xml Wed Sep 18 09:27:02 2013
@@ -1,0 +1,20 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<scenario name="send forwarding response back">
+	<recv request="INVITE" crlf="true" />
+
+	<send>
+		<![CDATA[
+			SIP/2.0 302 Moved Temporarily
+			[last_Via:]
+			[last_From:]
+			[last_To:];tag=[call_number]
+			[last_Call-ID:]
+			[last_CSeq:]
+			Contact: <sip:user3@[local_ip]>
+			Content-Length: 0
+		]]>
+	</send>
+
+	<recv request="ACK"/>
+</scenario>

Propchange: asterisk/trunk/tests/channels/pjsip/diversion/diversion_caller_id/sipp/user2.xml
------------------------------------------------------------------------------
    svn:eol-style = native

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

Propchange: asterisk/trunk/tests/channels/pjsip/diversion/diversion_caller_id/sipp/user2.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/channels/pjsip/diversion/diversion_caller_id/sipp/user3.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/diversion/diversion_caller_id/sipp/user3.xml?view=auto&rev=4204
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/diversion/diversion_caller_id/sipp/user3.xml (added)
+++ asterisk/trunk/tests/channels/pjsip/diversion/diversion_caller_id/sipp/user3.xml Wed Sep 18 09:27:02 2013
@@ -1,0 +1,80 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<scenario name="receives forwarded call from user2">
+	<recv request="INVITE" crlf="true">
+                <action>
+                        <!-- Check that the Diversion header is present and contains the correct caller id. -->
+	        	<ereg regexp="user2" search_in="hdr" header="Diversion:" check_it="true" assign_to="1" />
+		        <log message="Received INVITE with Diversion header: [$1]." />
+		</action>
+        </recv>
+
+	<send>
+		<![CDATA[
+			SIP/2.0 100 Trying
+			[last_Via:]
+			[last_From:]
+			[last_To:];tag=[call_number]
+			[last_Call-ID:]
+			[last_CSeq:]
+			Contact: <sip:user3@[local_ip]:[local_port];transport=[transport]>
+			Content-Length: 0
+		]]>
+	</send>
+
+	<send>
+		<![CDATA[
+			SIP/2.0 180 Ringing
+			[last_Via:]
+			[last_From:]
+			[last_To:];tag=[call_number]
+			[last_Call-ID:]
+			[last_CSeq:]
+			Contact: <sip:user3@[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=[call_number]
+			[last_Call-ID:]
+			[last_CSeq:]
+			Contact: <sip:user3@[local_ip]:[local_port];transport=[transport]>
+			Content-Type: application/sdp
+			Content-Length: [len]
+
+			v=0
+			o=- 1324901698 1324901698 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=sendrecv
+			a=rtpmap:0 PCMU/8000
+			a=rtpmap:101 telephone-event/8000
+
+		]]>
+	</send>
+
+	<recv request="ACK"/>
+
+	<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:]
+			Content-Type: application/sdp
+			Content-Length: 0
+
+		]]>
+	</send>
+</scenario>

Propchange: asterisk/trunk/tests/channels/pjsip/diversion/diversion_caller_id/sipp/user3.xml
------------------------------------------------------------------------------
    svn:eol-style = native

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

Propchange: asterisk/trunk/tests/channels/pjsip/diversion/diversion_caller_id/sipp/user3.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/channels/pjsip/diversion/diversion_caller_id/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/diversion/diversion_caller_id/test-config.yaml?view=auto&rev=4204
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/diversion/diversion_caller_id/test-config.yaml (added)
+++ asterisk/trunk/tests/channels/pjsip/diversion/diversion_caller_id/test-config.yaml Wed Sep 18 09:27:02 2013
@@ -1,0 +1,25 @@
+testinfo:
+    summary: 'Test to make sure an appropriate diversion header gets added when
+              a call is forwarded.'
+    description: |
+        'user1 calls user2 which is set to forward calls to user3.'
+
+properties:
+    minversion: '12'
+    dependencies:
+         - app : 'sipp'
+    tags:
+        - SIP
+
+test-modules:
+    test-object:
+        config-section: test-object-config
+        typename: 'sipp.SIPpTestCase'
+
+test-object-config:
+    test-iterations:
+        -
+             scenarios:
+                - { 'key-args': { 'scenario':'user3.xml', '-p':'5063' } }
+                - { 'key-args': { 'scenario':'user2.xml', '-p':'5062' } }
+                - { 'key-args': { 'scenario':'user1.xml', '-p':'5061' } }

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

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

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

Added: asterisk/trunk/tests/channels/pjsip/diversion/diversion_request/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/diversion/diversion_request/configs/ast1/extensions.conf?view=auto&rev=4204
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/diversion/diversion_request/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/channels/pjsip/diversion/diversion_request/configs/ast1/extensions.conf Wed Sep 18 09:27:02 2013
@@ -1,0 +1,7 @@
+[general]
+
+[default]
+
+exten => user1,1,Dial(PJSIP/user1)
+exten => user2,1,Dial(PJSIP/user2)
+exten => user3,1,Dial(PJSIP/user3)

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

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

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

Added: asterisk/trunk/tests/channels/pjsip/diversion/diversion_request/configs/ast1/pjsip.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/diversion/diversion_request/configs/ast1/pjsip.conf?view=auto&rev=4204
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/diversion/diversion_request/configs/ast1/pjsip.conf (added)
+++ asterisk/trunk/tests/channels/pjsip/diversion/diversion_request/configs/ast1/pjsip.conf Wed Sep 18 09:27:02 2013
@@ -1,0 +1,40 @@
+[local]
+type=transport
+protocol=udp
+bind=0.0.0.0
+
+[user1-aors]
+type=aor
+contact=sip:user1 at 127.0.0.1:5061
+
+[user1]
+type=endpoint
+context=default
+aors=user1-aors
+direct_media=no
+disallow=all
+allow=ulaw
+
+[user2-aors]
+type=aor
+contact=sip:user2 at 127.0.0.1:5062
+
+[user2]
+type=endpoint
+context=default
+aors=user2-aors
+direct_media=no
+disallow=all
+allow=ulaw
+
+[user3-aors]
+type=aor
+contact=sip:user3 at 127.0.0.1:5063
+
+[user3]
+type=endpoint
+context=default
+aors=user3-aors
+direct_media=no
+disallow=all
+allow=ulaw

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

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

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

Added: asterisk/trunk/tests/channels/pjsip/diversion/diversion_request/sipp/user1.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/diversion/diversion_request/sipp/user1.xml?view=auto&rev=4204
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/diversion/diversion_request/sipp/user1.xml (added)
+++ asterisk/trunk/tests/channels/pjsip/diversion/diversion_request/sipp/user1.xml Wed Sep 18 09:27:02 2013
@@ -1,0 +1,69 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<scenario name="send an invite to user2">
+	<send retrans="500">
+		<![CDATA[
+                        INVITE sip:user2@[remote_ip]:[remote_port] SIP/2.0
+                        Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+                        From: user1 <sip:user1@[local_ip]:[local_port]>;tag=[call_number]
+                        To: user2 <sip:user2@[remote_ip]:[remote_port]>
+                        Call-ID: [call_id]
+                        CSeq: [cseq] INVITE
+                        Contact: sip:user1@[local_ip]:[local_port]
+                        Max-Forwards: 70
+			Diversion: <sip:amenhotep at 127.0.0.1>;reason=unconditional
+                        Content-Type: application/sdp
+                        Content-Length: [len]
+
+			v=0
+			o=- 1324901698 1324901698 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=sendrecv
+			a=rtpmap:0 PCMU/8000
+			a=rtpmap:101 telephone-event/8000
+
+		]]>
+	</send>
+
+	<recv response="100" optional="true" />
+
+	<recv response="181" optional="true" />
+
+	<recv response="180" optional="true" />
+
+	<recv response="183" optional="true" />
+
+	<recv response="200" />
+
+	<send>
+		<![CDATA[
+			ACK sip:user2@[remote_ip]:[remote_port] SIP/2.0
+			Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+			From: <sip:user1@[local_ip]>;tag=[call_number]
+			To: <sip:user2@[remote_ip]:[remote_port]>[peer_tag_param]
+			CSeq: [cseq] ACK
+			Call-ID: [call_id]
+			Max-Forwards: 70
+			Content-Length: 0
+
+		]]>
+	</send>
+
+	<send retrans="500">
+		<![CDATA[
+			BYE sip:user2@[remote_ip]:[remote_port] SIP/2.0
+			Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+			From: <sip:user1@[local_ip]>;tag=[call_number]
+			To: <sip:user2@[remote_ip]:[remote_port]>[peer_tag_param]
+			CSeq: [cseq] BYE
+			Call-ID: [call_id]
+			Max-Forwards: 70
+			Content-Length: 0
+		]]>
+	</send>
+
+	<recv response="200" crlf="true" />
+</scenario>

Propchange: asterisk/trunk/tests/channels/pjsip/diversion/diversion_request/sipp/user1.xml
------------------------------------------------------------------------------
    svn:eol-style = native

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

Propchange: asterisk/trunk/tests/channels/pjsip/diversion/diversion_request/sipp/user1.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/channels/pjsip/diversion/diversion_request/sipp/user2.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/diversion/diversion_request/sipp/user2.xml?view=auto&rev=4204
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/diversion/diversion_request/sipp/user2.xml (added)
+++ asterisk/trunk/tests/channels/pjsip/diversion/diversion_request/sipp/user2.xml Wed Sep 18 09:27:02 2013
@@ -1,0 +1,80 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<scenario name="receives invite with diversion info">
+	<recv request="INVITE" crlf="true">
+                <action>
+                        <!-- Check that the Diversion header is present and contains the correct name. -->
+	        	<ereg regexp="amenhotep" search_in="hdr" header="Diversion:" check_it="true" assign_to="1" />
+		        <log message="Received INVITE with Diversion header: [$1]." />
+		</action>
+        </recv>
+
+	<send>
+		<![CDATA[
+			SIP/2.0 100 Trying
+			[last_Via:]
+			[last_From:]
+			[last_To:];tag=[call_number]
+			[last_Call-ID:]
+			[last_CSeq:]
+			Contact: <sip:user2@[local_ip]:[local_port];transport=[transport]>
+			Content-Length: 0
+		]]>
+	</send>
+
+	<send>
+		<![CDATA[
+			SIP/2.0 180 Ringing
+			[last_Via:]
+			[last_From:]
+			[last_To:];tag=[call_number]
+			[last_Call-ID:]
+			[last_CSeq:]
+			Contact: <sip:user2@[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=[call_number]
+			[last_Call-ID:]
+			[last_CSeq:]
+			Contact: <sip:user2@[local_ip]:[local_port];transport=[transport]>
+			Content-Type: application/sdp
+			Content-Length: [len]
+
+			v=0
+			o=- 1324901698 1324901698 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=sendrecv
+			a=rtpmap:0 PCMU/8000
+			a=rtpmap:101 telephone-event/8000
+
+		]]>
+	</send>
+
+	<recv request="ACK"/>
+
+	<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:]
+			Content-Type: application/sdp
+			Content-Length: 0
+
+		]]>
+	</send>
+</scenario>

Propchange: asterisk/trunk/tests/channels/pjsip/diversion/diversion_request/sipp/user2.xml
------------------------------------------------------------------------------
    svn:eol-style = native

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

Propchange: asterisk/trunk/tests/channels/pjsip/diversion/diversion_request/sipp/user2.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/channels/pjsip/diversion/diversion_request/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/diversion/diversion_request/test-config.yaml?view=auto&rev=4204
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/diversion/diversion_request/test-config.yaml (added)
+++ asterisk/trunk/tests/channels/pjsip/diversion/diversion_request/test-config.yaml Wed Sep 18 09:27:02 2013
@@ -1,0 +1,24 @@
+testinfo:
+    summary: 'Test to make sure the diversion header on an invite gets
+              propagated correctly.'
+    description: |
+        'user1 calls user2 with an invite containing a diversion header.'
+
+properties:
+    minversion: '12'
+    dependencies:
+         - app : 'sipp'
+    tags:
+        - SIP
+
+test-modules:
+    test-object:

[... 415 lines stripped ...]



More information about the asterisk-commits mailing list