Author: file Date: Mon Jan 19 07:19:19 2015 New Revision: 6303 URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=6303 Log: res_pjsip / res_pjsip_multihomed: Add test for checking of Contact on UAS session.
This test confirms that the Contact received in the 200 OK when sending a call into PJSIP contains the correct address information when PJSIP is configured with multiple transports. ASTERISK-24615 Reported by: David Justl Review: https://reviewboard.asterisk.org/r/4335/ Added: asterisk/trunk/tests/channels/pjsip/incoming_call_on_second_transport/ asterisk/trunk/tests/channels/pjsip/incoming_call_on_second_transport/configs/ asterisk/trunk/tests/channels/pjsip/incoming_call_on_second_transport/configs/ast1/ asterisk/trunk/tests/channels/pjsip/incoming_call_on_second_transport/configs/ast1/extensions.conf (with props) asterisk/trunk/tests/channels/pjsip/incoming_call_on_second_transport/configs/ast1/pjsip.conf (with props) asterisk/trunk/tests/channels/pjsip/incoming_call_on_second_transport/sipp/ asterisk/trunk/tests/channels/pjsip/incoming_call_on_second_transport/sipp/answer.xml (with props) asterisk/trunk/tests/channels/pjsip/incoming_call_on_second_transport/test-config.yaml (with props) Modified: asterisk/trunk/tests/channels/pjsip/tests.yaml Added: asterisk/trunk/tests/channels/pjsip/incoming_call_on_second_transport/configs/ast1/extensions.conf URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/incoming_call_on_second_transport/configs/ast1/extensions.conf?view=auto&rev=6303 ============================================================================== --- asterisk/trunk/tests/channels/pjsip/incoming_call_on_second_transport/configs/ast1/extensions.conf (added) +++ asterisk/trunk/tests/channels/pjsip/incoming_call_on_second_transport/configs/ast1/extensions.conf Mon Jan 19 07:19:19 2015 @@ -1,0 +1,4 @@ +[default] +exten => echo,1,Answer() +same => n,Echo() +same => n,Hangup() Propchange: asterisk/trunk/tests/channels/pjsip/incoming_call_on_second_transport/configs/ast1/extensions.conf ------------------------------------------------------------------------------ svn:eol-style = native Propchange: asterisk/trunk/tests/channels/pjsip/incoming_call_on_second_transport/configs/ast1/extensions.conf ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Propchange: asterisk/trunk/tests/channels/pjsip/incoming_call_on_second_transport/configs/ast1/extensions.conf ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: asterisk/trunk/tests/channels/pjsip/incoming_call_on_second_transport/configs/ast1/pjsip.conf URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/incoming_call_on_second_transport/configs/ast1/pjsip.conf?view=auto&rev=6303 ============================================================================== --- asterisk/trunk/tests/channels/pjsip/incoming_call_on_second_transport/configs/ast1/pjsip.conf (added) +++ asterisk/trunk/tests/channels/pjsip/incoming_call_on_second_transport/configs/ast1/pjsip.conf Mon Jan 19 07:19:19 2015 @@ -1,0 +1,20 @@ +[local-transport-1] +type=transport +bind=127.0.0.1 +protocol=udp + +[local-transport-2] +type=transport +bind=127.0.0.1:5070 +protocol=udp + +[local-transport-3] +type=transport +bind=127.0.0.1:5080 +protocol=udp + +[alice] +type=endpoint +context=default +allow=!all,ulaw,alaw +media_address=127.0.0.1 Propchange: asterisk/trunk/tests/channels/pjsip/incoming_call_on_second_transport/configs/ast1/pjsip.conf ------------------------------------------------------------------------------ svn:eol-style = native Propchange: asterisk/trunk/tests/channels/pjsip/incoming_call_on_second_transport/configs/ast1/pjsip.conf ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Propchange: asterisk/trunk/tests/channels/pjsip/incoming_call_on_second_transport/configs/ast1/pjsip.conf ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: asterisk/trunk/tests/channels/pjsip/incoming_call_on_second_transport/sipp/answer.xml URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/incoming_call_on_second_transport/sipp/answer.xml?view=auto&rev=6303 ============================================================================== --- asterisk/trunk/tests/channels/pjsip/incoming_call_on_second_transport/sipp/answer.xml (added) +++ asterisk/trunk/tests/channels/pjsip/incoming_call_on_second_transport/sipp/answer.xml Mon Jan 19 07:19:19 2015 @@ -1,0 +1,95 @@ +<?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:echo@[remote_ip]:[remote_port] SIP/2.0 + Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch] + From: test1 <sip:[service]@[local_ip]:[local_port]>;tag=[call_number] + To: test <sip:test@[remote_ip]:[remote_port]> + Call-ID: [call_id] + CSeq: 1 INVITE + Contact: sip:test@[local_ip]:[local_port] + 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"> + <action> + <!-- Check the Contact header. --> + <ereg regexp="sip:127.0.0.1:5070" + header="Contact" + search_in="hdr" + check_it="true" + assign_to="contact"/> + </action> + </recv> + + <send> + <![CDATA[ + + ACK sip:echo@[remote_ip]:[remote_port] SIP/2.0 + Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch] + From: test1 <sip:[service]@[local_ip]:[local_port]>;tag=[call_number] + To: test <sip:test@[remote_ip]:[remote_port]>[peer_tag_param] + Call-ID: [call_id] + CSeq: 1 ACK + Contact: sip:test@[local_ip]:[local_port] + Max-Forwards: 70 + Subject: Test + Content-Length: 0 + + ]]> + </send> + + <pause/> + + <send retrans="500"> + <![CDATA[ + + BYE sip:echo@[remote_ip]:[remote_port] SIP/2.0 + Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch] + From: test1 <sip:[service]@[local_ip]:[local_port]>;tag=[call_number] + To: test <sip:test@[remote_ip]:[remote_port]>[peer_tag_param] + Call-ID: [call_id] + CSeq: 2 BYE + Contact: sip:test@[local_ip]:[local_port] + Max-Forwards: 70 + Subject: Test + Content-Length: 0 + + ]]> + </send> + + <recv response="200" crlf="true"> + </recv> + + <!-- definition of the response time repartition table (unit is ms) --> + <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/> + + <!-- definition of the call length repartition table (unit is ms) --> + <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/> + + <Reference variables="contact" /> + +</scenario> + Propchange: asterisk/trunk/tests/channels/pjsip/incoming_call_on_second_transport/sipp/answer.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: asterisk/trunk/tests/channels/pjsip/incoming_call_on_second_transport/sipp/answer.xml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Propchange: asterisk/trunk/tests/channels/pjsip/incoming_call_on_second_transport/sipp/answer.xml ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: asterisk/trunk/tests/channels/pjsip/incoming_call_on_second_transport/test-config.yaml URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/incoming_call_on_second_transport/test-config.yaml?view=auto&rev=6303 ============================================================================== --- asterisk/trunk/tests/channels/pjsip/incoming_call_on_second_transport/test-config.yaml (added) +++ asterisk/trunk/tests/channels/pjsip/incoming_call_on_second_transport/test-config.yaml Mon Jan 19 07:19:19 2015 @@ -1,0 +1,29 @@ +testinfo: + summary: 'Tests an incoming call on a second configured transport' + description: | + 'Run a SIPp scenario that sends a call into chan_pjsip. Confirms that the 200 OK received back + contains the port that the request was sent to.' + +test-modules: + test-object: + config-section: test-object-config + typename: 'sipp.SIPpTestCase' + +test-object-config: + fail-on-any: False + test-iterations: + - + scenarios: + - { 'key-args': {'scenario': 'answer.xml', '-i': '127.0.0.1', '-p': '5061', '-d': '5000', '-s': 'alice', '-rsa': '127.0.0.1:5070'} } + +properties: + minversion: '13.3.0' + dependencies: + - sipp : + version : 'v3.3' + - asterisk : 'res_pjsip' + - asterisk : 'chan_pjsip' + - asterisk : 'res_pjsip_session' + - asterisk : 'res_pjsip_multihomed' + tags: + - pjsip Propchange: asterisk/trunk/tests/channels/pjsip/incoming_call_on_second_transport/test-config.yaml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: asterisk/trunk/tests/channels/pjsip/incoming_call_on_second_transport/test-config.yaml ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Propchange: asterisk/trunk/tests/channels/pjsip/incoming_call_on_second_transport/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=6303&r1=6302&r2=6303 ============================================================================== --- asterisk/trunk/tests/channels/pjsip/tests.yaml (original) +++ asterisk/trunk/tests/channels/pjsip/tests.yaml Mon Jan 19 07:19:19 2015 @@ -2,6 +2,7 @@ tests: - test: 'handle_options_request' - test: 'incoming_calls_without_auth' + - test: 'incoming_call_on_second_transport' - dir: 'basic_calls' - dir: 'sdp_offer_answer' - test: 'srtp_negotiation' -- _____________________________________________________________________ -- 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