Author: mjordan Date: Thu Feb 12 14:47:44 2015 New Revision: 6397 URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=6397 Log: channels/pjsip/transfers: Add 'Asterisk' transfers (Transfer app initiated)
This patch adds tests for the following: - asterisk/endpoint/redirect: Test transferring an unanswered channel to a PJSIP endpoint, which responds to the initial INVITE request with a 302. - asterisk/endpoint/refer: Test transferring an answered channel to a PJSIP endpoint, which sends a REFER request to the target. - asterisk/uri/redirect: Test transferring an unanswered channel to a SIP URI via PJSIP, which responds to the initial INVITE request with a 302. - asterisk/uri/refer: Test transferring an answered channel to a SIP URI via PJSIP, which sends a REFER request to the target. Review: https://reviewboard.asterisk.org/r/4352/ ASTERISK-24015 Added: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/ asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/ asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/redirect/ asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/redirect/configs/ asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/redirect/configs/ast1/ asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/redirect/configs/ast1/extensions.conf (with props) asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/redirect/configs/ast1/pjsip.conf (with props) asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/redirect/sipp/ asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/redirect/sipp/alice.xml (with props) asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/redirect/test-config.yaml (with props) asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/refer/ asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/refer/configs/ asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/refer/configs/ast1/ asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/refer/configs/ast1/extensions.conf (with props) asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/refer/configs/ast1/pjsip.conf (with props) asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/refer/sipp/ asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/refer/sipp/alice.xml (with props) asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/refer/test-config.yaml (with props) asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/tests.yaml (with props) asterisk/trunk/tests/channels/pjsip/transfers/asterisk/tests.yaml (with props) asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/ asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/redirect/ asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/redirect/configs/ asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/redirect/configs/ast1/ asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/redirect/configs/ast1/extensions.conf (with props) asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/redirect/configs/ast1/pjsip.conf (with props) asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/redirect/sipp/ asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/redirect/sipp/alice.xml (with props) asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/redirect/test-config.yaml (with props) asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/refer/ asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/refer/configs/ asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/refer/configs/ast1/ asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/refer/configs/ast1/extensions.conf (with props) asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/refer/configs/ast1/pjsip.conf (with props) asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/refer/sipp/ asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/refer/sipp/alice.xml (with props) asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/refer/test-config.yaml (with props) asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/tests.yaml (with props) Modified: asterisk/trunk/tests/channels/pjsip/transfers/tests.yaml Added: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/redirect/configs/ast1/extensions.conf URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/redirect/configs/ast1/extensions.conf?view=auto&rev=6397 ============================================================================== --- asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/redirect/configs/ast1/extensions.conf (added) +++ asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/redirect/configs/ast1/extensions.conf Thu Feb 12 14:47:44 2015 @@ -1,0 +1,5 @@ +[default] + +exten => s,1,NoOp() + same => n,Transfer(PJSIP/bob) + same => n,Hangup() Propchange: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/redirect/configs/ast1/extensions.conf ------------------------------------------------------------------------------ svn:eol-style = native Propchange: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/redirect/configs/ast1/extensions.conf ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Propchange: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/redirect/configs/ast1/extensions.conf ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/redirect/configs/ast1/pjsip.conf URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/redirect/configs/ast1/pjsip.conf?view=auto&rev=6397 ============================================================================== --- asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/redirect/configs/ast1/pjsip.conf (added) +++ asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/redirect/configs/ast1/pjsip.conf Thu Feb 12 14:47:44 2015 @@ -1,0 +1,28 @@ +[local-transport] +type=transport +protocol=udp +bind=127.0.0.1 + +[endpoint-template](!) +type=endpoint +context=default +allow=!all,ulaw,g722 + +[aor-template](!) +type=aor +max_contacts=1 + +[alice-aors](aor-template) +contact=sip:alice@127.0.0.1:5061 + +[alice](endpoint-template) +transport=local-transport +aors=alice-aors + +[bob-aors](aor-template) +contact=sip:bob@127.0.0.1:5062 + +[bob](endpoint-template) +transport=local-transport +aors=bob-aors + Propchange: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/redirect/configs/ast1/pjsip.conf ------------------------------------------------------------------------------ svn:eol-style = native Propchange: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/redirect/configs/ast1/pjsip.conf ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Propchange: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/redirect/configs/ast1/pjsip.conf ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/redirect/sipp/alice.xml URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/redirect/sipp/alice.xml?view=auto&rev=6397 ============================================================================== --- asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/redirect/sipp/alice.xml (added) +++ asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/redirect/sipp/alice.xml Thu Feb 12 14:47:44 2015 @@ -1,0 +1,68 @@ +<?xml version="1.0" encoding="ISO-8859-1" ?> +<!DOCTYPE scenario SYSTEM "sipp.dtd"> + +<scenario name="INVITE to echo with SDP in initial INVITE"> + <send retrans="500"> + <![CDATA[ + + INVITE sip:s@[remote_ip]:[remote_port] SIP/2.0 + Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch] + From: alice <sip:[service]@[local_ip]:[local_port]>;tag=[call_number] + To: s <sip:s@[remote_ip]:[remote_port]> + Call-ID: [call_id] + CSeq: 1 INVITE + Contact: <sip:alice@[local_ip]:[local_port];transport=[transport]> + Max-Forwards: 70 + Subject: Test + User-Agent: Test + Content-Type: application/sdp + 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="302" rtd="true"> + <action> + <ereg regexp="Contact: <sip:bob@127.0.0.1:5062>" + check_it="true" assign_to="1"/> + <test assign_to="1" variable="1" compare="equal" value=""/> + </action> + </recv> + + <send> + <![CDATA[ + + ACK sip:s@[remote_ip]:[remote_port] SIP/2.0 + Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch] + From: alice <sip:[service]@[local_ip]:[local_port]>;tag=[call_number] + To: s <sip:s@[remote_ip]:[remote_port]>[peer_tag_param] + Call-ID: [call_id] + CSeq: 1 ACK + Contact: <sip:alice@[local_ip]:[local_port];transport=[transport]> + Max-Forwards: 70 + Subject: Test + Content-Length: 0 + + ]]> + </send> + + <!-- 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/channels/pjsip/transfers/asterisk/endpoint/redirect/sipp/alice.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/redirect/sipp/alice.xml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Propchange: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/redirect/sipp/alice.xml ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/redirect/test-config.yaml URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/redirect/test-config.yaml?view=auto&rev=6397 ============================================================================== --- asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/redirect/test-config.yaml (added) +++ asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/redirect/test-config.yaml Thu Feb 12 14:47:44 2015 @@ -1,0 +1,35 @@ +testinfo: + summary: 'Test sending a 302 to another PJSIP endpoint via Transfer' + description: | + 'This test takes an inbound channel from PJSIP/Alice and sends + it over to PJSIP endpoint Bob using the Transfer dialplan + application. Because Alice isn't yet answered, this is achieved + using a 302 response to the INVITE request from Alice. + + The test verifies the alice scenario receives a properly + formatted 302 from Asterisk with the expected URI in the + Contact header.' + +test-modules: + test-object: + config-section: test-object-config + typename: 'sipp.SIPpTestCase' + +test-object-config: + fail-on-any: False + test-iterations: + - + scenarios: + # IPv4 & UDP + - { 'key-args': {'scenario': 'alice.xml', '-i': '127.0.0.1', '-p': '5061', '-s': 'alice'} } + +properties: + minversion: '13.3.0' + dependencies: + - sipp : + version : 'v3.0' + - asterisk : 'res_pjsip' + - asterisk : 'chan_pjsip' + - asterisk : 'app_transfer' + tags: + - pjsip Propchange: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/redirect/test-config.yaml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/redirect/test-config.yaml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Propchange: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/redirect/test-config.yaml ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/refer/configs/ast1/extensions.conf URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/refer/configs/ast1/extensions.conf?view=auto&rev=6397 ============================================================================== --- asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/refer/configs/ast1/extensions.conf (added) +++ asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/refer/configs/ast1/extensions.conf Thu Feb 12 14:47:44 2015 @@ -1,0 +1,6 @@ +[default] + +exten => s,1,NoOp() + same => n,Answer() + same => n,Transfer(PJSIP/bob) + same => n,Hangup() Propchange: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/refer/configs/ast1/extensions.conf ------------------------------------------------------------------------------ svn:eol-style = native Propchange: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/refer/configs/ast1/extensions.conf ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Propchange: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/refer/configs/ast1/extensions.conf ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/refer/configs/ast1/pjsip.conf URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/refer/configs/ast1/pjsip.conf?view=auto&rev=6397 ============================================================================== --- asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/refer/configs/ast1/pjsip.conf (added) +++ asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/refer/configs/ast1/pjsip.conf Thu Feb 12 14:47:44 2015 @@ -1,0 +1,28 @@ +[local-transport] +type=transport +protocol=udp +bind=127.0.0.1 + +[endpoint-template](!) +type=endpoint +context=default +allow=!all,ulaw,g722 + +[aor-template](!) +type=aor +max_contacts=1 + +[alice-aors](aor-template) +contact=sip:alice@127.0.0.1:5061 + +[alice](endpoint-template) +transport=local-transport +aors=alice-aors + +[bob-aors](aor-template) +contact=sip:bob@127.0.0.1:5062 + +[bob](endpoint-template) +transport=local-transport +aors=bob-aors + Propchange: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/refer/configs/ast1/pjsip.conf ------------------------------------------------------------------------------ svn:eol-style = native Propchange: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/refer/configs/ast1/pjsip.conf ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Propchange: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/refer/configs/ast1/pjsip.conf ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/refer/sipp/alice.xml URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/refer/sipp/alice.xml?view=auto&rev=6397 ============================================================================== --- asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/refer/sipp/alice.xml (added) +++ asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/refer/sipp/alice.xml Thu Feb 12 14:47:44 2015 @@ -1,0 +1,108 @@ +<?xml version="1.0" encoding="ISO-8859-1" ?> +<!DOCTYPE scenario SYSTEM "sipp.dtd"> + +<scenario name="INVITE to echo with SDP in initial INVITE"> + <send retrans="500"> + <![CDATA[ + + INVITE sip:s@[remote_ip]:[remote_port] SIP/2.0 + Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch] + From: alice <sip:[service]@[local_ip]:[local_port]>;tag=[call_number] + To: s <sip:s@[remote_ip]:[remote_port]> + Call-ID: [call_id] + CSeq: 1 INVITE + Contact: <sip:alice@[local_ip]:[local_port];transport=[transport]> + Max-Forwards: 70 + Subject: Test + User-Agent: Test + Content-Type: application/sdp + 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" /> + + <send> + <![CDATA[ + + ACK sip:s@[remote_ip]:[remote_port] SIP/2.0 + Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch] + From: alice <sip:[service]@[local_ip]:[local_port]>;tag=[call_number] + To: s <sip:s@[remote_ip]:[remote_port]>[peer_tag_param] + Call-ID: [call_id] + CSeq: 1 ACK + Contact: <sip:alice@[local_ip]:[local_port];transport=[transport]> + Max-Forwards: 70 + Subject: Test + Content-Length: 0 + + ]]> + </send> + + <recv request="REFER"> + <action> + <ereg regexp="Refer-To: sip:bob@127.0.0.1:5062" + check_it="true" assign_to="1"/> + <test assign_to="1" variable="1" compare="equal" value=""/> + </action> + </recv> + + <send retrans="500"> + <![CDATA[ + SIP/2.0 200 OK + [last_Via:] + [last_From:] + [last_To:] + [last_Call-ID:] + [last_CSeq:] + Contact: <sip:alice@[local_ip]:[local_port];transport=[transport]> + Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE, NOTIFY, PRACK, UPDATE, REFER + Supported: 100rel,replaces + User-Agent: Test + Accept-Language: en + Content-Type: application/sdp + Content-Length: 0 + ]]> + </send> + + <recv request="BYE"/> + + <send retrans="500"> + <![CDATA[ + SIP/2.0 200 OK + [last_Via:] + [last_From:] + [last_To:] + [last_Call-ID:] + [last_CSeq:] + Contact: <sip:alice@[local_ip]:[local_port];transport=[transport]> + Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE, NOTIFY, PRACK, UPDATE, REFER + Supported: 100rel,replaces + User-Agent: Test + Accept-Language: en + Content-Type: application/sdp + Content-Length: 0 + ]]> + </send> + + <!-- 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/channels/pjsip/transfers/asterisk/endpoint/refer/sipp/alice.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/refer/sipp/alice.xml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Propchange: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/refer/sipp/alice.xml ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/refer/test-config.yaml URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/refer/test-config.yaml?view=auto&rev=6397 ============================================================================== --- asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/refer/test-config.yaml (added) +++ asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/refer/test-config.yaml Thu Feb 12 14:47:44 2015 @@ -1,0 +1,36 @@ +testinfo: + summary: 'Test sending a REFER to another PJSIP endpoint via Transfer' + description: | + 'This test takes an inbound channel from PJSIP/Alice and sends + it over to PJSIP endpoint Bob using the Transfer dialplan + application. Because Alice is answered, this is achieved using + a REFER request with a Refer-To header that specifies Bob's URI + as the destination. + + The test verifies the alice scenario receives a properly + formatted REFER request from Asterisk with the expected URI in + the Refer-To header.' + +test-modules: + test-object: + config-section: test-object-config + typename: 'sipp.SIPpTestCase' + +test-object-config: + fail-on-any: False + test-iterations: + - + scenarios: + # IPv4 & UDP + - { 'key-args': {'scenario': 'alice.xml', '-i': '127.0.0.1', '-p': '5061', '-s': 'alice'} } + +properties: + minversion: '13.3.0' + dependencies: + - sipp : + version : 'v3.0' + - asterisk : 'res_pjsip' + - asterisk : 'chan_pjsip' + - asterisk : 'app_transfer' + tags: + - pjsip Propchange: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/refer/test-config.yaml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/refer/test-config.yaml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Propchange: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/refer/test-config.yaml ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/tests.yaml URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/tests.yaml?view=auto&rev=6397 ============================================================================== --- asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/tests.yaml (added) +++ asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/tests.yaml Thu Feb 12 14:47:44 2015 @@ -1,0 +1,4 @@ +# Enter tests here in the order they should be considered for execution: +tests: + - test: 'redirect' + - test: 'refer' Propchange: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/tests.yaml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/tests.yaml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Propchange: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/tests.yaml ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/tests.yaml URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/transfers/asterisk/tests.yaml?view=auto&rev=6397 ============================================================================== --- asterisk/trunk/tests/channels/pjsip/transfers/asterisk/tests.yaml (added) +++ asterisk/trunk/tests/channels/pjsip/transfers/asterisk/tests.yaml Thu Feb 12 14:47:44 2015 @@ -1,0 +1,4 @@ +# Enter tests here in the order they should be considered for execution: +tests: + - dir: 'endpoint' + - dir: 'uri' Propchange: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/tests.yaml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/tests.yaml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Propchange: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/tests.yaml ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/redirect/configs/ast1/extensions.conf URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/redirect/configs/ast1/extensions.conf?view=auto&rev=6397 ============================================================================== --- asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/redirect/configs/ast1/extensions.conf (added) +++ asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/redirect/configs/ast1/extensions.conf Thu Feb 12 14:47:44 2015 @@ -1,0 +1,5 @@ +[default] + +exten => s,1,NoOp() + same => n,Transfer(PJSIP/sip:asterisk@127.0.0.1:5063) + same => n,Hangup() Propchange: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/redirect/configs/ast1/extensions.conf ------------------------------------------------------------------------------ svn:eol-style = native Propchange: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/redirect/configs/ast1/extensions.conf ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Propchange: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/redirect/configs/ast1/extensions.conf ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/redirect/configs/ast1/pjsip.conf URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/redirect/configs/ast1/pjsip.conf?view=auto&rev=6397 ============================================================================== --- asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/redirect/configs/ast1/pjsip.conf (added) +++ asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/redirect/configs/ast1/pjsip.conf Thu Feb 12 14:47:44 2015 @@ -1,0 +1,21 @@ +[local-transport] +type=transport +protocol=udp +bind=127.0.0.1 + +[endpoint-template](!) +type=endpoint +context=default +allow=!all,ulaw,g722 + +[aor-template](!) +type=aor +max_contacts=1 + +[alice-aors](aor-template) +contact=sip:alice@127.0.0.1:5061 + +[alice](endpoint-template) +transport=local-transport +aors=alice-aors + Propchange: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/redirect/configs/ast1/pjsip.conf ------------------------------------------------------------------------------ svn:eol-style = native Propchange: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/redirect/configs/ast1/pjsip.conf ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Propchange: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/redirect/configs/ast1/pjsip.conf ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/redirect/sipp/alice.xml URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/redirect/sipp/alice.xml?view=auto&rev=6397 ============================================================================== --- asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/redirect/sipp/alice.xml (added) +++ asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/redirect/sipp/alice.xml Thu Feb 12 14:47:44 2015 @@ -1,0 +1,68 @@ +<?xml version="1.0" encoding="ISO-8859-1" ?> +<!DOCTYPE scenario SYSTEM "sipp.dtd"> + +<scenario name="INVITE to echo with SDP in initial INVITE"> + <send retrans="500"> + <![CDATA[ + + INVITE sip:s@[remote_ip]:[remote_port] SIP/2.0 + Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch] + From: alice <sip:[service]@[local_ip]:[local_port]>;tag=[call_number] + To: s <sip:s@[remote_ip]:[remote_port]> + Call-ID: [call_id] + CSeq: 1 INVITE + Contact: <sip:alice@[local_ip]:[local_port];transport=[transport]> + Max-Forwards: 70 + Subject: Test + User-Agent: Test + Content-Type: application/sdp + 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="302" rtd="true"> + <action> + <ereg regexp="Contact: <sip:asterisk@127.0.0.1:5063>" + check_it="true" assign_to="1"/> + <test assign_to="1" variable="1" compare="equal" value=""/> + </action> + </recv> + + <send> + <![CDATA[ + + ACK sip:s@[remote_ip]:[remote_port] SIP/2.0 + Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch] + From: alice <sip:[service]@[local_ip]:[local_port]>;tag=[call_number] + To: s <sip:s@[remote_ip]:[remote_port]>[peer_tag_param] + Call-ID: [call_id] + CSeq: 1 ACK + Contact: <sip:alice@[local_ip]:[local_port];transport=[transport]> + Max-Forwards: 70 + Subject: Test + Content-Length: 0 + + ]]> + </send> + + <!-- 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/channels/pjsip/transfers/asterisk/uri/redirect/sipp/alice.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/redirect/sipp/alice.xml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Propchange: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/redirect/sipp/alice.xml ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/redirect/test-config.yaml URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/redirect/test-config.yaml?view=auto&rev=6397 ============================================================================== --- asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/redirect/test-config.yaml (added) +++ asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/redirect/test-config.yaml Thu Feb 12 14:47:44 2015 @@ -1,0 +1,35 @@ +testinfo: + summary: 'Test sending a 302 to a SIP URI via Transfer' + description: | + 'This test takes an inbound channel from PJSIP/Alice and sends + it over to sip:asterisk@127.0.0.1 using the Transfer dialplan + application. Because Alice isn't yet answered, this is achieved + using a 302 response to the INVITE request from Alice. + + The test verifies the alice scenario receives a properly + formatted 302 from Asterisk with the expected URI in the + Contact header.' + +test-modules: + test-object: + config-section: test-object-config + typename: 'sipp.SIPpTestCase' + +test-object-config: + fail-on-any: False + test-iterations: + - + scenarios: + # IPv4 & UDP + - { 'key-args': {'scenario': 'alice.xml', '-i': '127.0.0.1', '-p': '5061', '-s': 'alice'} } + +properties: + minversion: '13.3.0' + dependencies: + - sipp : + version : 'v3.0' + - asterisk : 'res_pjsip' + - asterisk : 'chan_pjsip' + - asterisk : 'app_transfer' + tags: + - pjsip Propchange: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/redirect/test-config.yaml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/redirect/test-config.yaml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Propchange: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/redirect/test-config.yaml ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/refer/configs/ast1/extensions.conf URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/refer/configs/ast1/extensions.conf?view=auto&rev=6397 ============================================================================== --- asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/refer/configs/ast1/extensions.conf (added) +++ asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/refer/configs/ast1/extensions.conf Thu Feb 12 14:47:44 2015 @@ -1,0 +1,6 @@ +[default] + +exten => s,1,NoOp() + same => n,Answer() + same => n,Transfer(PJSIP/sip:asterisk@127.0.0.2) + same => n,Hangup() Propchange: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/refer/configs/ast1/extensions.conf ------------------------------------------------------------------------------ svn:eol-style = native Propchange: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/refer/configs/ast1/extensions.conf ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Propchange: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/refer/configs/ast1/extensions.conf ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/refer/configs/ast1/pjsip.conf URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/refer/configs/ast1/pjsip.conf?view=auto&rev=6397 ============================================================================== --- asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/refer/configs/ast1/pjsip.conf (added) +++ asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/refer/configs/ast1/pjsip.conf Thu Feb 12 14:47:44 2015 @@ -1,0 +1,21 @@ +[local-transport] +type=transport +protocol=udp +bind=127.0.0.1 + +[endpoint-template](!) +type=endpoint +context=default +allow=!all,ulaw,g722 + +[aor-template](!) +type=aor +max_contacts=1 + +[alice-aors](aor-template) +contact=sip:alice@127.0.0.1:5061 + +[alice](endpoint-template) +transport=local-transport +aors=alice-aors + Propchange: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/refer/configs/ast1/pjsip.conf ------------------------------------------------------------------------------ svn:eol-style = native Propchange: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/refer/configs/ast1/pjsip.conf ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Propchange: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/refer/configs/ast1/pjsip.conf ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/refer/sipp/alice.xml URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/refer/sipp/alice.xml?view=auto&rev=6397 ============================================================================== --- asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/refer/sipp/alice.xml (added) +++ asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/refer/sipp/alice.xml Thu Feb 12 14:47:44 2015 @@ -1,0 +1,108 @@ +<?xml version="1.0" encoding="ISO-8859-1" ?> +<!DOCTYPE scenario SYSTEM "sipp.dtd"> + +<scenario name="INVITE to echo with SDP in initial INVITE"> + <send retrans="500"> + <![CDATA[ + + INVITE sip:s@[remote_ip]:[remote_port] SIP/2.0 + Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch] + From: alice <sip:[service]@[local_ip]:[local_port]>;tag=[call_number] + To: s <sip:s@[remote_ip]:[remote_port]> + Call-ID: [call_id] + CSeq: 1 INVITE + Contact: <sip:alice@[local_ip]:[local_port];transport=[transport]> + Max-Forwards: 70 + Subject: Test + User-Agent: Test + Content-Type: application/sdp + 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" /> + + <send> + <![CDATA[ + + ACK sip:s@[remote_ip]:[remote_port] SIP/2.0 + Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch] + From: alice <sip:[service]@[local_ip]:[local_port]>;tag=[call_number] + To: s <sip:s@[remote_ip]:[remote_port]>[peer_tag_param] + Call-ID: [call_id] + CSeq: 1 ACK + Contact: <sip:alice@[local_ip]:[local_port];transport=[transport]> + Max-Forwards: 70 + Subject: Test + Content-Length: 0 + + ]]> + </send> + + <recv request="REFER"> + <action> + <ereg regexp="Refer-To: sip:asterisk@127.0.0.2" + check_it="true" assign_to="1"/> + <test assign_to="1" variable="1" compare="equal" value=""/> + </action> + </recv> + + <send retrans="500"> + <![CDATA[ + SIP/2.0 200 OK + [last_Via:] + [last_From:] + [last_To:] + [last_Call-ID:] + [last_CSeq:] + Contact: <sip:alice@[local_ip]:[local_port];transport=[transport]> + Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE, NOTIFY, PRACK, UPDATE, REFER + Supported: 100rel,replaces + User-Agent: Test + Accept-Language: en + Content-Type: application/sdp + Content-Length: 0 + ]]> + </send> + + <recv request="BYE"/> + + <send retrans="500"> + <![CDATA[ + SIP/2.0 200 OK + [last_Via:] + [last_From:] + [last_To:] + [last_Call-ID:] + [last_CSeq:] [... 122 lines stripped ...] -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- svn-commits mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/svn-commits