[asterisk-commits] kharwell: testsuite/asterisk/trunk r3664 - in /asterisk/trunk/tests/channels/...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Mar 11 10:35:24 CDT 2013
Author: kharwell
Date: Mon Mar 11 10:35:18 2013
New Revision: 3664
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=3664
Log:
Tests for the option to disallow music on hold
Tests to make sure that if 'discard_remote_hold_retrieval' flag is set to 'yes'
then asterisk stops telling the peer to start music on hold. In this test a
SIP hold is where one SIP phone puts another SIP phone on hold by sending a
re-INVITE with a modified SDP containing a restricted audio direction. This
is tested both for a local RTP bridge, and a non-bridged scenario.
(issue ABE-2899)
Reported by: Denis Alberto Martinez
Review: https://reviewboard.asterisk.org/r/2337/
Added:
asterisk/trunk/tests/channels/SIP/sip_hold_no_moh/
asterisk/trunk/tests/channels/SIP/sip_hold_no_moh/configs/
asterisk/trunk/tests/channels/SIP/sip_hold_no_moh/configs/ast1/
asterisk/trunk/tests/channels/SIP/sip_hold_no_moh/configs/ast1/extensions.conf (with props)
asterisk/trunk/tests/channels/SIP/sip_hold_no_moh/configs/ast1/sip.conf (with props)
asterisk/trunk/tests/channels/SIP/sip_hold_no_moh/sipp/
asterisk/trunk/tests/channels/SIP/sip_hold_no_moh/sipp/phone_A.xml (with props)
asterisk/trunk/tests/channels/SIP/sip_hold_no_moh/sipp/phone_B.xml (with props)
asterisk/trunk/tests/channels/SIP/sip_hold_no_moh/test-config.yaml (with props)
Modified:
asterisk/trunk/tests/channels/SIP/tests.yaml
Added: asterisk/trunk/tests/channels/SIP/sip_hold_no_moh/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/sip_hold_no_moh/configs/ast1/extensions.conf?view=auto&rev=3664
==============================================================================
--- asterisk/trunk/tests/channels/SIP/sip_hold_no_moh/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/channels/SIP/sip_hold_no_moh/configs/ast1/extensions.conf Mon Mar 11 10:35:18 2013
@@ -1,0 +1,13 @@
+[general]
+
+[default]
+; Dial with t/T options (force a bypass of remote and local RTP bridges),
+; even though we won't use any features for this test
+exten => bypassbridge,1,NoOp()
+ same => n,Dial(SIP/phone_B,,tTg)
+ same => n,Hangup()
+
+; Dial with no options; use bridge set up based on peer definitions
+exten => basicdial,1,NoOp()
+ same => n,Dial(SIP/phone_B,,g)
+ same => n,Hangup()
Propchange: asterisk/trunk/tests/channels/SIP/sip_hold_no_moh/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/SIP/sip_hold_no_moh/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/channels/SIP/sip_hold_no_moh/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/channels/SIP/sip_hold_no_moh/configs/ast1/sip.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/sip_hold_no_moh/configs/ast1/sip.conf?view=auto&rev=3664
==============================================================================
--- asterisk/trunk/tests/channels/SIP/sip_hold_no_moh/configs/ast1/sip.conf (added)
+++ asterisk/trunk/tests/channels/SIP/sip_hold_no_moh/configs/ast1/sip.conf Mon Mar 11 10:35:18 2013
@@ -1,0 +1,22 @@
+[general]
+allowguest=no
+bindaddr=127.0.0.1
+sipdebug=yes
+directmedia=no
+
+[telsip](!)
+type=friend
+context=default
+disallow=all
+allow=ulaw
+qualify=no
+insecure=invite
+nat=no
+
+[phone_A](telsip)
+host=127.0.0.2
+
+[phone_B](telsip)
+host=127.0.0.3
+discard_remote_hold_retrieval=yes
+
Propchange: asterisk/trunk/tests/channels/SIP/sip_hold_no_moh/configs/ast1/sip.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/SIP/sip_hold_no_moh/configs/ast1/sip.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/channels/SIP/sip_hold_no_moh/configs/ast1/sip.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/channels/SIP/sip_hold_no_moh/sipp/phone_A.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/sip_hold_no_moh/sipp/phone_A.xml?view=auto&rev=3664
==============================================================================
--- asterisk/trunk/tests/channels/SIP/sip_hold_no_moh/sipp/phone_A.xml (added)
+++ asterisk/trunk/tests/channels/SIP/sip_hold_no_moh/sipp/phone_A.xml Mon Mar 11 10:35:18 2013
@@ -1,0 +1,81 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="Phone A Hold with IP and Media Restrictions">
+ <!-- note - "call" is assigned from '-set' command line option" /> -->
+ <!-- <Global variables="call"/> -->
+
+ <send retrans="500">
+ <![CDATA[
+ INVITE sip:[service]@[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ From: phone_A <sip:phone_A@[local_ip]:[local_port]>;tag=[call_number]
+ To: <sip:[service]@[remote_ip]:[remote_port];user=phone>
+ CSeq: 1 INVITE
+ Call-ID: [call_id]
+ Contact: <sip:phone_A@[local_ip]:[local_port]>
+ Allow: INVITE, ACK, BYE
+ User-Agent: PolycomSoundPointIP-SPIP_430-UA/3.2.3.1734
+ Accept-Language: en
+ Allow-Events: talk,hold
+ Max-Forwards: 70
+ Content-Type: application/sdp
+ Content-Length: [len]
+
+ v=0
+ o=- 1324901698 1324901698 IN IP4 [local_ip]
+ s=Polycom IP Phone
+ 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="183" optional="true" />
+
+ <recv response="200" />
+
+ <send>
+ <![CDATA[
+ ACK sip:phone_B@[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ From: phone_A <sip:phone_A@[remote_ip]>;tag=[call_number]
+ To: <sip:phone_B@[remote_ip];user=phone>[peer_tag_param]
+ CSeq: 1 ACK
+ Call-ID: [call_id]
+ Contact: <sip:phone_A@[local_ip]:[local_port]>
+ Allow: INVITE, ACK, BYE
+ User-Agent: PolycomSoundPointIP-SPIP_430-UA/3.2.3.1734
+ Accept-Language: en
+ Max-Forwards: 70
+ Content-Length: 0
+ ]]>
+ </send>
+
+ <recv request="BYE"/>
+
+ <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:phone_A@[local_ip]:[local_port];transport=[transport]>
+ Allow: INVITE, ACK, BYE
+ Supported: 100rel,replaces
+ User-Agent: PolycomSoundPointIP-SPIP_430-UA/3.2.3.1734
+ Accept-Language: en
+ Content-Type: application/sdp
+ Content-Length: 0
+ ]]>
+ </send>
+</scenario>
Propchange: asterisk/trunk/tests/channels/SIP/sip_hold_no_moh/sipp/phone_A.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/SIP/sip_hold_no_moh/sipp/phone_A.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/channels/SIP/sip_hold_no_moh/sipp/phone_A.xml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/channels/SIP/sip_hold_no_moh/sipp/phone_B.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/sip_hold_no_moh/sipp/phone_B.xml?view=auto&rev=3664
==============================================================================
--- asterisk/trunk/tests/channels/SIP/sip_hold_no_moh/sipp/phone_B.xml (added)
+++ asterisk/trunk/tests/channels/SIP/sip_hold_no_moh/sipp/phone_B.xml Mon Mar 11 10:35:18 2013
@@ -1,0 +1,149 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="Phone B Hold with IP and Media Restrictions">
+ <recv request="INVITE" crlf="true" />
+
+ <send>
+ <![CDATA[
+ SIP/2.0 100 Trying
+ [last_Via:]
+ [last_From:]
+ [last_To:];tag=[call_number]
+ [last_Call-ID:]
+ [last_CSeq:]
+ Contact: <sip:phone_B@[local_ip]:[local_port];transport=[transport]>
+ User-Agent: PolycomSoundPointIP-SPIP_430-UA/3.2.3.1734
+ Accept-Language: en
+ 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:phone_B@[local_ip]:[local_port];transport=[transport]>
+ User-Agent: PolycomSoundPointIP-SPIP_430-UA/3.2.3.1734
+ Allow-Events: talk,hold
+ Accept-Language: en
+ Content-Length: 0
+ ]]>
+ </send>
+
+ <pause milliseconds="200"/>
+
+ <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:phone_B@[local_ip]:[local_port];transport=[transport]>
+ Allow: INVITE, ACK, BYE
+ Supported: 100rel,replaces
+ User-Agent: PolycomSoundPointIP-SPIP_430-UA/3.2.3.1734
+ Accept-Language: en
+ Content-Type: application/sdp
+ Content-Length: [len]
+
+ v=0
+ o=- 1324901698 1324901698 IN IP4 [local_ip]
+ s=Polycom IP Phone
+ 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 ACK -->
+ <recv request="ACK"/>
+
+ <!-- Wait some period of time -->
+ <pause milliseconds="3000"/>
+
+ <!-- Modify RTP session to be send only -->
+ <send retrans="500">
+ <![CDATA[
+ INVITE sip:phone_A@[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ From: phone_B <sip:phone_B@[local_ip]:[local_port]>;tag=[call_number]
+ To: phone_A <sip:phone_A@[remote_ip]>[peer_tag_param]
+ CSeq: [cseq] INVITE
+ [last_Call-ID:]
+ Contact: <sip:phone_B@[local_ip]:[local_port]>
+ Allow: INVITE, ACK, BYE
+ User-Agent: PolycomSoundPointIP-SPIP_430-UA/3.2.3.1734
+ Accept-Language: en
+ Supported: 100rel,replaces
+ Allow-Events: talk,hold
+ Max-Forwards: 70
+ Content-Type: application/sdp
+ Content-Length: [len]
+
+ v=0
+ o=- 1325003603 1325003604 IN IP4 [local_ip]
+ s=Polycom IP Phone
+ c=IN IP4 [local_ip]
+ t=0 0
+ m=audio 2226 RTP/AVP 0 101
+ a=sendonly
+ a=rtpmap:0 PCMU/8000
+ a=rtpmap:101 telephone-event/8000
+ ]]>
+ </send>
+
+ <recv response="100" optional="true" />
+
+ <recv response="200" />
+
+ <pause milliseconds="200"/>
+
+ <send>
+ <![CDATA[
+ ACK sip:phone_B@[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ From: phone_B <sip:phone_B@[local_ip]>;tag=[call_number]
+ To: <sip:phone_A@[remote_ip];user=phone_A>[peer_tag_param]
+ CSeq: [cseq] ACK
+ [last_Call-ID:]
+ Contact: <sip:phone_B@[local_ip]:[local_port]>
+ Allow: INVITE, ACK, BYE
+ User-Agent: PolycomSoundPointIP-SPIP_430-UA/3.2.3.1734
+ Accept-Language: en
+ Max-Forwards: 70
+ Content-Length: 0
+
+ ]]>
+ </send>
+
+ <!-- Wait some period of time -->
+ <pause milliseconds="3000"/>
+
+ <send>
+ <![CDATA[
+ BYE sip:phone_B@[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/UDP [local_ip]:[local_port];branch=[branch]
+ From: phone_B <sip:phone_B@[local_ip]:[local_port]>;tag=[call_number]
+ To: phone_A <sip:phone_B@[remote_ip]>[peer_tag_param]
+ CSeq: [cseq] BYE
+ [last_Call-ID:]
+ Contact: <sip:phone_B@[local_ip]:[local_port]>
+ User-Agent: PolycomSoundPointIP-SPIP_430-UA/3.2.3.1734
+ Accept-Language: en
+ Max-Forwards: 70
+ Content-Length: 0
+ ]]>
+ </send>
+
+ <recv response="200" />
+</scenario>
Propchange: asterisk/trunk/tests/channels/SIP/sip_hold_no_moh/sipp/phone_B.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/SIP/sip_hold_no_moh/sipp/phone_B.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/channels/SIP/sip_hold_no_moh/sipp/phone_B.xml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/channels/SIP/sip_hold_no_moh/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/sip_hold_no_moh/test-config.yaml?view=auto&rev=3664
==============================================================================
--- asterisk/trunk/tests/channels/SIP/sip_hold_no_moh/test-config.yaml (added)
+++ asterisk/trunk/tests/channels/SIP/sip_hold_no_moh/test-config.yaml Mon Mar 11 10:35:18 2013
@@ -1,0 +1,48 @@
+testinfo:
+ summary: 'Test SIP no music on hold scenarios'
+ description: |
+ This tests makes sure that if 'discard_remote_hold_retrieval' flag is
+ set to 'yes' then asterisk stops telling the peer to start music on
+ hold. In this test a SIP hold is where one SIP phone puts another SIP
+ phone on hold by sending a re-INVITE with a modified SDP containing
+ a restricted audio direction. This is tested both for a local RTP
+ bridge, and a non-bridged scenario.
+
+properties:
+ minversion: '12'
+ dependencies:
+ - python: 'starpy'
+ - sipp:
+ version : 'v3.1'
+ tags:
+ - SIP
+
+test-modules:
+ test-object:
+ config-section: test-object-config
+ typename: 'sipp.SIPpTestCase'
+ modules:
+ -
+ config-section: ami-config
+ typename: 'ami.AMIEventModule'
+
+test-object-config:
+ fail-on-any: True
+ test-iterations:
+ -
+ scenarios:
+ - { 'key-args': { 'scenario':'phone_B.xml', '-i':'127.0.0.3', '-p':'5060' } }
+ - { 'key-args': { 'scenario':'phone_A.xml', '-i':'127.0.0.2', '-p':'5060', '-s':'bypassbridge' } }
+ -
+ scenarios:
+ - { 'key-args': { 'scenario':'phone_B.xml', '-i':'127.0.0.3', '-p':'5060' } }
+ - { 'key-args': { 'scenario':'phone_A.xml', '-i':'127.0.0.2', '-p':'5060', '-s':'basicdial' } }
+
+
+ami-config:
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'MusicOnHold'
+ count: '0'
Propchange: asterisk/trunk/tests/channels/SIP/sip_hold_no_moh/test-config.yaml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/SIP/sip_hold_no_moh/test-config.yaml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/channels/SIP/sip_hold_no_moh/test-config.yaml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: asterisk/trunk/tests/channels/SIP/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/tests.yaml?view=diff&rev=3664&r1=3663&r2=3664
==============================================================================
--- asterisk/trunk/tests/channels/SIP/tests.yaml (original)
+++ asterisk/trunk/tests/channels/SIP/tests.yaml Mon Mar 11 10:35:18 2013
@@ -40,6 +40,7 @@
- test: 'nat_supertest'
- test: 'pcap_demo'
- test: 'sip_hold'
+ - test: 'sip_hold_no_moh'
- test: 'header_parsing'
- test: 'use_contact_from_200'
- test: 'generic_ccss'
More information about the asterisk-commits
mailing list