<p>Jenkins2 <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/9564">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Benjamin Keith Ford: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
Jenkins2: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">testsuite: add tests to ensure ice in ANSWER only if offered<br><br>Test that ICE is in the answer when endpoint is has ice enabled and<br>candidates are present in the offer, also test that if ice is<br>enabled and not offered, it is not present in the answer<br><br>ASTERISK-27957 #close<br><br>Change-Id: Ic4744c062e17862bf60eaa76f46af2ba2743e650<br>---<br>A tests/channels/pjsip/ice/ice_not_offered/configs/ast1/extensions.conf<br>A tests/channels/pjsip/ice/ice_not_offered/configs/ast1/pjsip.conf<br>A tests/channels/pjsip/ice/ice_not_offered/sipp/A_PARTY.xml<br>A tests/channels/pjsip/ice/ice_not_offered/test-config.yaml<br>A tests/channels/pjsip/ice/ice_offered/configs/ast1/extensions.conf<br>A tests/channels/pjsip/ice/ice_offered/configs/ast1/pjsip.conf<br>A tests/channels/pjsip/ice/ice_offered/sipp/A_PARTY.xml<br>A tests/channels/pjsip/ice/ice_offered/test-config.yaml<br>A tests/channels/pjsip/ice/tests.yaml<br>M tests/channels/pjsip/tests.yaml<br>10 files changed, 425 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/tests/channels/pjsip/ice/ice_not_offered/configs/ast1/extensions.conf b/tests/channels/pjsip/ice/ice_not_offered/configs/ast1/extensions.conf</span><br><span>new file mode 100644</span><br><span>index 0000000..704532f</span><br><span>--- /dev/null</span><br><span>+++ b/tests/channels/pjsip/ice/ice_not_offered/configs/ast1/extensions.conf</span><br><span>@@ -0,0 +1,13 @@</span><br><span style="color: hsl(120, 100%, 40%);">+[general]</span><br><span style="color: hsl(120, 100%, 40%);">+static=yes</span><br><span style="color: hsl(120, 100%, 40%);">+writeprotect=yes</span><br><span style="color: hsl(120, 100%, 40%);">+autofallthrough=yes</span><br><span style="color: hsl(120, 100%, 40%);">+clearglobalvars=no</span><br><span style="color: hsl(120, 100%, 40%);">+priorityjumping=yes</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+[globals]</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+[default]</span><br><span style="color: hsl(120, 100%, 40%);">+exten => _X.,1,Answer()</span><br><span style="color: hsl(120, 100%, 40%);">+exten => _X.,2,Echo()</span><br><span style="color: hsl(120, 100%, 40%);">+exten => h,1,Hangup()</span><br><span>diff --git a/tests/channels/pjsip/ice/ice_not_offered/configs/ast1/pjsip.conf b/tests/channels/pjsip/ice/ice_not_offered/configs/ast1/pjsip.conf</span><br><span>new file mode 100644</span><br><span>index 0000000..3dce37a</span><br><span>--- /dev/null</span><br><span>+++ b/tests/channels/pjsip/ice/ice_not_offered/configs/ast1/pjsip.conf</span><br><span>@@ -0,0 +1,57 @@</span><br><span style="color: hsl(120, 100%, 40%);">+;--</span><br><span style="color: hsl(120, 100%, 40%);">+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</span><br><span style="color: hsl(120, 100%, 40%);">+Non mapped elements start</span><br><span style="color: hsl(120, 100%, 40%);">+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+[general]</span><br><span style="color: hsl(120, 100%, 40%);">+sipdebug = yes</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+[PEER_A]</span><br><span style="color: hsl(120, 100%, 40%);">+port = 5061</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+[sbc]</span><br><span style="color: hsl(120, 100%, 40%);">+port = 5700</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</span><br><span style="color: hsl(120, 100%, 40%);">+Non mapped elements end</span><br><span style="color: hsl(120, 100%, 40%);">+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</span><br><span style="color: hsl(120, 100%, 40%);">+--;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+[global]</span><br><span style="color: hsl(120, 100%, 40%);">+type = global</span><br><span style="color: hsl(120, 100%, 40%);">+debug = yes</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+[transport-udp]</span><br><span style="color: hsl(120, 100%, 40%);">+type = transport</span><br><span style="color: hsl(120, 100%, 40%);">+protocol = udp</span><br><span style="color: hsl(120, 100%, 40%);">+bind = 0.0.0.0:5060</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+[PEER_A]</span><br><span style="color: hsl(120, 100%, 40%);">+type = aor</span><br><span style="color: hsl(120, 100%, 40%);">+contact = sip:127.0.0.1:5061</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+[PEER_A]</span><br><span style="color: hsl(120, 100%, 40%);">+type = identify</span><br><span style="color: hsl(120, 100%, 40%);">+endpoint = PEER_A</span><br><span style="color: hsl(120, 100%, 40%);">+match = 127.0.0.1</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+[PEER_A]</span><br><span style="color: hsl(120, 100%, 40%);">+type = endpoint</span><br><span style="color: hsl(120, 100%, 40%);">+context = default</span><br><span style="color: hsl(120, 100%, 40%);">+allow = ulaw</span><br><span style="color: hsl(120, 100%, 40%);">+direct_media = no</span><br><span style="color: hsl(120, 100%, 40%);">+ice_support = yes</span><br><span style="color: hsl(120, 100%, 40%);">+aors = PEER_A</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+[sbc]</span><br><span style="color: hsl(120, 100%, 40%);">+type = aor</span><br><span style="color: hsl(120, 100%, 40%);">+contact = sip:127.0.0.1:5700</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+[sbc]</span><br><span style="color: hsl(120, 100%, 40%);">+type = endpoint</span><br><span style="color: hsl(120, 100%, 40%);">+context = callcontrol</span><br><span style="color: hsl(120, 100%, 40%);">+allow = ulaw</span><br><span style="color: hsl(120, 100%, 40%);">+direct_media = no</span><br><span style="color: hsl(120, 100%, 40%);">+aors = sbc</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>diff --git a/tests/channels/pjsip/ice/ice_not_offered/sipp/A_PARTY.xml b/tests/channels/pjsip/ice/ice_not_offered/sipp/A_PARTY.xml</span><br><span>new file mode 100644</span><br><span>index 0000000..660e342</span><br><span>--- /dev/null</span><br><span>+++ b/tests/channels/pjsip/ice/ice_not_offered/sipp/A_PARTY.xml</span><br><span>@@ -0,0 +1,110 @@</span><br><span style="color: hsl(120, 100%, 40%);">+<?xml version="1.0" encoding="ISO-8859-1"?></span><br><span style="color: hsl(120, 100%, 40%);">+<!DOCTYPE scenario SYSTEM "sipp.dtd"></span><br><span style="color: hsl(120, 100%, 40%);">+<!-- This program is free software; you can redistribute it and/or --></span><br><span style="color: hsl(120, 100%, 40%);">+<!-- modify it under the terms of the GNU General Public License as --></span><br><span style="color: hsl(120, 100%, 40%);">+<!-- published by the Free Software Foundation; either version 2 of the --></span><br><span style="color: hsl(120, 100%, 40%);">+<!-- License, or (at your option) any later version. --></span><br><span style="color: hsl(120, 100%, 40%);">+<!-- --></span><br><span style="color: hsl(120, 100%, 40%);">+<!-- This program is distributed in the hope that it will be useful, --></span><br><span style="color: hsl(120, 100%, 40%);">+<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of --></span><br><span style="color: hsl(120, 100%, 40%);">+<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --></span><br><span style="color: hsl(120, 100%, 40%);">+<!-- GNU General Public License for more details. --></span><br><span style="color: hsl(120, 100%, 40%);">+<!-- --></span><br><span style="color: hsl(120, 100%, 40%);">+<!-- You should have received a copy of the GNU General Public License --></span><br><span style="color: hsl(120, 100%, 40%);">+<!-- along with this program; if not, write to the --></span><br><span style="color: hsl(120, 100%, 40%);">+<!-- Free Software Foundation, Inc., --></span><br><span style="color: hsl(120, 100%, 40%);">+<!-- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --></span><br><span style="color: hsl(120, 100%, 40%);">+<!-- --></span><br><span style="color: hsl(120, 100%, 40%);">+<!-- Sipp 'uac' scenario with pcap (rtp) play --></span><br><span style="color: hsl(120, 100%, 40%);">+<!-- --></span><br><span style="color: hsl(120, 100%, 40%);">+<scenario name="CONTENT_TYPE_PARAMS"></span><br><span style="color: hsl(120, 100%, 40%);">+ <!-- In client mode (sipp placing calls), the Call-ID MUST be --></span><br><span style="color: hsl(120, 100%, 40%);">+ <!-- generated by sipp. To do so, use [call_id] keyword. --></span><br><span style="color: hsl(120, 100%, 40%);">+ <send retrans="500"></span><br><span style="color: hsl(120, 100%, 40%);">+ <![CDATA[</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ INVITE sip:[service]@voxbone.com SIP/2.0</span><br><span style="color: hsl(120, 100%, 40%);">+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]</span><br><span style="color: hsl(120, 100%, 40%);">+ From: sipp <sip:test@voxbone.com>;tag=[call_number]</span><br><span style="color: hsl(120, 100%, 40%);">+ To: sut <sip:[service]@voxbone.com:[remote_port]></span><br><span style="color: hsl(120, 100%, 40%);">+ Call-ID: [call_id]</span><br><span style="color: hsl(120, 100%, 40%);">+ CSeq: 1 INVITE</span><br><span style="color: hsl(120, 100%, 40%);">+ Contact: sip:sipp@[local_ip]:[local_port]</span><br><span style="color: hsl(120, 100%, 40%);">+ Max-Forwards: 70</span><br><span style="color: hsl(120, 100%, 40%);">+ Subject: Performance Test</span><br><span style="color: hsl(120, 100%, 40%);">+ Content-Type: application/sdp</span><br><span style="color: hsl(120, 100%, 40%);">+ Content-Length: [len]</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ v=0</span><br><span style="color: hsl(120, 100%, 40%);">+ o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]</span><br><span style="color: hsl(120, 100%, 40%);">+ s=-</span><br><span style="color: hsl(120, 100%, 40%);">+ c=IN IP[local_ip_type] [local_ip]</span><br><span style="color: hsl(120, 100%, 40%);">+ t=0 0</span><br><span style="color: hsl(120, 100%, 40%);">+ m=audio 9000 RTP/AVP 0</span><br><span style="color: hsl(120, 100%, 40%);">+ a=rtpmap:0 PCMU/8000</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ ]]></span><br><span style="color: hsl(120, 100%, 40%);">+ </send></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ <recv response="100" optional="true"></span><br><span style="color: hsl(120, 100%, 40%);">+ </recv></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ <recv response="180" optional="true"></span><br><span style="color: hsl(120, 100%, 40%);">+ </recv></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ <!-- By adding rrs="true" (Record Route Sets), the route sets --></span><br><span style="color: hsl(120, 100%, 40%);">+ <!-- are saved and used for following messages sent. Useful to test --></span><br><span style="color: hsl(120, 100%, 40%);">+ <!-- against stateful SIP proxies/B2BUAs. --></span><br><span style="color: hsl(120, 100%, 40%);">+ <recv response="200" rtd="true" crlf="true"></span><br><span style="color: hsl(120, 100%, 40%);">+ <action></span><br><span style="color: hsl(120, 100%, 40%);">+ <ereg regexp="a=ice-ufrag" search_in="body" check_it_inverse="true" assign_to="dummy" /></span><br><span style="color: hsl(120, 100%, 40%);">+ </action></span><br><span style="color: hsl(120, 100%, 40%);">+ </recv></span><br><span style="color: hsl(120, 100%, 40%);">+ <Reference variables="dummy" /></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ <!-- Packet lost can be simulated in any send/recv message by --></span><br><span style="color: hsl(120, 100%, 40%);">+ <!-- by adding the 'lost = "10"'. Value can be [1-100] percent. --></span><br><span style="color: hsl(120, 100%, 40%);">+ <send></span><br><span style="color: hsl(120, 100%, 40%);">+ <![CDATA[</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ ACK sip:[service]@voxbone.com SIP/2.0</span><br><span style="color: hsl(120, 100%, 40%);">+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]</span><br><span style="color: hsl(120, 100%, 40%);">+ From: sipp <sip:test@[local_ip]:[local_port]>;tag=[call_number]</span><br><span style="color: hsl(120, 100%, 40%);">+ To: sut <sip:[service]@voxbone.com>[peer_tag_param]</span><br><span style="color: hsl(120, 100%, 40%);">+ Call-ID: [call_id]</span><br><span style="color: hsl(120, 100%, 40%);">+ CSeq: 1 ACK</span><br><span style="color: hsl(120, 100%, 40%);">+ Contact: sip:sipp@[local_ip]:[local_port]</span><br><span style="color: hsl(120, 100%, 40%);">+ Max-Forwards: 70</span><br><span style="color: hsl(120, 100%, 40%);">+ Subject: Performance Test</span><br><span style="color: hsl(120, 100%, 40%);">+ Content-Length: 0</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ ]]></span><br><span style="color: hsl(120, 100%, 40%);">+ </send></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ <pause milliseconds="1000"/></span><br><span style="color: hsl(120, 100%, 40%);">+ <!-- The 'crlf' option inserts a blank line in the statistics report. --></span><br><span style="color: hsl(120, 100%, 40%);">+ <send retrans="500"></span><br><span style="color: hsl(120, 100%, 40%);">+ <![CDATA[</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ BYE sip:[service]@voxbone.com SIP/2.0</span><br><span style="color: hsl(120, 100%, 40%);">+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]</span><br><span style="color: hsl(120, 100%, 40%);">+ From: sipp <sip:test@[local_ip]:[local_port]>;tag=[call_number]</span><br><span style="color: hsl(120, 100%, 40%);">+ To: sut <sip:[service]@voxbone.com>[peer_tag_param]</span><br><span style="color: hsl(120, 100%, 40%);">+ Call-ID: [call_id]</span><br><span style="color: hsl(120, 100%, 40%);">+ CSeq: 2 BYE</span><br><span style="color: hsl(120, 100%, 40%);">+ Contact: sip:sipp@[local_ip]:[local_port]</span><br><span style="color: hsl(120, 100%, 40%);">+ Max-Forwards: 70</span><br><span style="color: hsl(120, 100%, 40%);">+ Subject: Performance Test</span><br><span style="color: hsl(120, 100%, 40%);">+ Content-Length: 0</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ ]]></span><br><span style="color: hsl(120, 100%, 40%);">+ </send></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ <recv response="200" crlf="true"></span><br><span style="color: hsl(120, 100%, 40%);">+ </recv></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</scenario></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>diff --git a/tests/channels/pjsip/ice/ice_not_offered/test-config.yaml b/tests/channels/pjsip/ice/ice_not_offered/test-config.yaml</span><br><span>new file mode 100644</span><br><span>index 0000000..c9f66cc</span><br><span>--- /dev/null</span><br><span>+++ b/tests/channels/pjsip/ice/ice_not_offered/test-config.yaml</span><br><span>@@ -0,0 +1,27 @@</span><br><span style="color: hsl(120, 100%, 40%);">+testinfo:</span><br><span style="color: hsl(120, 100%, 40%);">+ summary: 'Test that if Asterisk does not put ice in the response if it is not requested'</span><br><span style="color: hsl(120, 100%, 40%);">+ description: |</span><br><span style="color: hsl(120, 100%, 40%);">+ 'Endpôint A has ice enabled and sends an invite w/o ICE candidates in the SDP. The</span><br><span style="color: hsl(120, 100%, 40%);">+ ANSWER from asterisk should not contain any ICE candidates'</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+test-modules:</span><br><span style="color: hsl(120, 100%, 40%);">+ test-object:</span><br><span style="color: hsl(120, 100%, 40%);">+ config-section: test-object-config</span><br><span style="color: hsl(120, 100%, 40%);">+ typename: 'sipp.SIPpTestCase'</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+test-object-config:</span><br><span style="color: hsl(120, 100%, 40%);">+ memcheck-delay-stop: 7</span><br><span style="color: hsl(120, 100%, 40%);">+ fail-on-any: False</span><br><span style="color: hsl(120, 100%, 40%);">+ test-iterations:</span><br><span style="color: hsl(120, 100%, 40%);">+ -</span><br><span style="color: hsl(120, 100%, 40%);">+ scenarios:</span><br><span style="color: hsl(120, 100%, 40%);">+ - { 'key-args': {'scenario': 'A_PARTY.xml', '-i': '127.0.0.1', '-p': '5061', '-s': '3200000000'} }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+properties:</span><br><span style="color: hsl(120, 100%, 40%);">+ dependencies:</span><br><span style="color: hsl(120, 100%, 40%);">+ - sipp :</span><br><span style="color: hsl(120, 100%, 40%);">+ version : 'v3.0'</span><br><span style="color: hsl(120, 100%, 40%);">+ - asterisk : 'res_pjsip'</span><br><span style="color: hsl(120, 100%, 40%);">+ tags:</span><br><span style="color: hsl(120, 100%, 40%);">+ - pjsip</span><br><span>diff --git a/tests/channels/pjsip/ice/ice_offered/configs/ast1/extensions.conf b/tests/channels/pjsip/ice/ice_offered/configs/ast1/extensions.conf</span><br><span>new file mode 100644</span><br><span>index 0000000..704532f</span><br><span>--- /dev/null</span><br><span>+++ b/tests/channels/pjsip/ice/ice_offered/configs/ast1/extensions.conf</span><br><span>@@ -0,0 +1,13 @@</span><br><span style="color: hsl(120, 100%, 40%);">+[general]</span><br><span style="color: hsl(120, 100%, 40%);">+static=yes</span><br><span style="color: hsl(120, 100%, 40%);">+writeprotect=yes</span><br><span style="color: hsl(120, 100%, 40%);">+autofallthrough=yes</span><br><span style="color: hsl(120, 100%, 40%);">+clearglobalvars=no</span><br><span style="color: hsl(120, 100%, 40%);">+priorityjumping=yes</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+[globals]</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+[default]</span><br><span style="color: hsl(120, 100%, 40%);">+exten => _X.,1,Answer()</span><br><span style="color: hsl(120, 100%, 40%);">+exten => _X.,2,Echo()</span><br><span style="color: hsl(120, 100%, 40%);">+exten => h,1,Hangup()</span><br><span>diff --git a/tests/channels/pjsip/ice/ice_offered/configs/ast1/pjsip.conf b/tests/channels/pjsip/ice/ice_offered/configs/ast1/pjsip.conf</span><br><span>new file mode 100644</span><br><span>index 0000000..3dce37a</span><br><span>--- /dev/null</span><br><span>+++ b/tests/channels/pjsip/ice/ice_offered/configs/ast1/pjsip.conf</span><br><span>@@ -0,0 +1,57 @@</span><br><span style="color: hsl(120, 100%, 40%);">+;--</span><br><span style="color: hsl(120, 100%, 40%);">+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</span><br><span style="color: hsl(120, 100%, 40%);">+Non mapped elements start</span><br><span style="color: hsl(120, 100%, 40%);">+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+[general]</span><br><span style="color: hsl(120, 100%, 40%);">+sipdebug = yes</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+[PEER_A]</span><br><span style="color: hsl(120, 100%, 40%);">+port = 5061</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+[sbc]</span><br><span style="color: hsl(120, 100%, 40%);">+port = 5700</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</span><br><span style="color: hsl(120, 100%, 40%);">+Non mapped elements end</span><br><span style="color: hsl(120, 100%, 40%);">+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</span><br><span style="color: hsl(120, 100%, 40%);">+--;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+[global]</span><br><span style="color: hsl(120, 100%, 40%);">+type = global</span><br><span style="color: hsl(120, 100%, 40%);">+debug = yes</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+[transport-udp]</span><br><span style="color: hsl(120, 100%, 40%);">+type = transport</span><br><span style="color: hsl(120, 100%, 40%);">+protocol = udp</span><br><span style="color: hsl(120, 100%, 40%);">+bind = 0.0.0.0:5060</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+[PEER_A]</span><br><span style="color: hsl(120, 100%, 40%);">+type = aor</span><br><span style="color: hsl(120, 100%, 40%);">+contact = sip:127.0.0.1:5061</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+[PEER_A]</span><br><span style="color: hsl(120, 100%, 40%);">+type = identify</span><br><span style="color: hsl(120, 100%, 40%);">+endpoint = PEER_A</span><br><span style="color: hsl(120, 100%, 40%);">+match = 127.0.0.1</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+[PEER_A]</span><br><span style="color: hsl(120, 100%, 40%);">+type = endpoint</span><br><span style="color: hsl(120, 100%, 40%);">+context = default</span><br><span style="color: hsl(120, 100%, 40%);">+allow = ulaw</span><br><span style="color: hsl(120, 100%, 40%);">+direct_media = no</span><br><span style="color: hsl(120, 100%, 40%);">+ice_support = yes</span><br><span style="color: hsl(120, 100%, 40%);">+aors = PEER_A</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+[sbc]</span><br><span style="color: hsl(120, 100%, 40%);">+type = aor</span><br><span style="color: hsl(120, 100%, 40%);">+contact = sip:127.0.0.1:5700</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+[sbc]</span><br><span style="color: hsl(120, 100%, 40%);">+type = endpoint</span><br><span style="color: hsl(120, 100%, 40%);">+context = callcontrol</span><br><span style="color: hsl(120, 100%, 40%);">+allow = ulaw</span><br><span style="color: hsl(120, 100%, 40%);">+direct_media = no</span><br><span style="color: hsl(120, 100%, 40%);">+aors = sbc</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>diff --git a/tests/channels/pjsip/ice/ice_offered/sipp/A_PARTY.xml b/tests/channels/pjsip/ice/ice_offered/sipp/A_PARTY.xml</span><br><span>new file mode 100644</span><br><span>index 0000000..976b592</span><br><span>--- /dev/null</span><br><span>+++ b/tests/channels/pjsip/ice/ice_offered/sipp/A_PARTY.xml</span><br><span>@@ -0,0 +1,117 @@</span><br><span style="color: hsl(120, 100%, 40%);">+<?xml version="1.0" encoding="ISO-8859-1"?></span><br><span style="color: hsl(120, 100%, 40%);">+<!DOCTYPE scenario SYSTEM "sipp.dtd"></span><br><span style="color: hsl(120, 100%, 40%);">+<!-- This program is free software; you can redistribute it and/or --></span><br><span style="color: hsl(120, 100%, 40%);">+<!-- modify it under the terms of the GNU General Public License as --></span><br><span style="color: hsl(120, 100%, 40%);">+<!-- published by the Free Software Foundation; either version 2 of the --></span><br><span style="color: hsl(120, 100%, 40%);">+<!-- License, or (at your option) any later version. --></span><br><span style="color: hsl(120, 100%, 40%);">+<!-- --></span><br><span style="color: hsl(120, 100%, 40%);">+<!-- This program is distributed in the hope that it will be useful, --></span><br><span style="color: hsl(120, 100%, 40%);">+<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of --></span><br><span style="color: hsl(120, 100%, 40%);">+<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --></span><br><span style="color: hsl(120, 100%, 40%);">+<!-- GNU General Public License for more details. --></span><br><span style="color: hsl(120, 100%, 40%);">+<!-- --></span><br><span style="color: hsl(120, 100%, 40%);">+<!-- You should have received a copy of the GNU General Public License --></span><br><span style="color: hsl(120, 100%, 40%);">+<!-- along with this program; if not, write to the --></span><br><span style="color: hsl(120, 100%, 40%);">+<!-- Free Software Foundation, Inc., --></span><br><span style="color: hsl(120, 100%, 40%);">+<!-- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --></span><br><span style="color: hsl(120, 100%, 40%);">+<!-- --></span><br><span style="color: hsl(120, 100%, 40%);">+<!-- Sipp 'uac' scenario with pcap (rtp) play --></span><br><span style="color: hsl(120, 100%, 40%);">+<!-- --></span><br><span style="color: hsl(120, 100%, 40%);">+<scenario name="CONTENT_TYPE_PARAMS"></span><br><span style="color: hsl(120, 100%, 40%);">+ <!-- In client mode (sipp placing calls), the Call-ID MUST be --></span><br><span style="color: hsl(120, 100%, 40%);">+ <!-- generated by sipp. To do so, use [call_id] keyword. --></span><br><span style="color: hsl(120, 100%, 40%);">+ <send retrans="500"></span><br><span style="color: hsl(120, 100%, 40%);">+ <![CDATA[</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ INVITE sip:[service]@voxbone.com SIP/2.0</span><br><span style="color: hsl(120, 100%, 40%);">+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]</span><br><span style="color: hsl(120, 100%, 40%);">+ From: sipp <sip:test@voxbone.com>;tag=[call_number]</span><br><span style="color: hsl(120, 100%, 40%);">+ To: sut <sip:[service]@voxbone.com:[remote_port]></span><br><span style="color: hsl(120, 100%, 40%);">+ Call-ID: [call_id]</span><br><span style="color: hsl(120, 100%, 40%);">+ CSeq: 1 INVITE</span><br><span style="color: hsl(120, 100%, 40%);">+ Contact: sip:sipp@[local_ip]:[local_port]</span><br><span style="color: hsl(120, 100%, 40%);">+ Max-Forwards: 70</span><br><span style="color: hsl(120, 100%, 40%);">+ Subject: Performance Test</span><br><span style="color: hsl(120, 100%, 40%);">+ Content-Type: application/sdp</span><br><span style="color: hsl(120, 100%, 40%);">+ Content-Length: [len]</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ v=0</span><br><span style="color: hsl(120, 100%, 40%);">+ o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]</span><br><span style="color: hsl(120, 100%, 40%);">+ s=-</span><br><span style="color: hsl(120, 100%, 40%);">+ c=IN IP[local_ip_type] [local_ip]</span><br><span style="color: hsl(120, 100%, 40%);">+ t=0 0</span><br><span style="color: hsl(120, 100%, 40%);">+ m=audio 9000 RTP/AVP 0</span><br><span style="color: hsl(120, 100%, 40%);">+ a=ice-ufrag:2c8cc7c729d0eaf44b6870147d7610de</span><br><span style="color: hsl(120, 100%, 40%);">+ a=ice-pwd:5ae44e9b6894542d4d851a065892f095</span><br><span style="color: hsl(120, 100%, 40%);">+ a=candidate:H59b7e24f 1 UDP 2130706431 fe80::2ad2:44ff:fe7d:ca0d 18860 typ host</span><br><span style="color: hsl(120, 100%, 40%);">+ a=candidate:H1ceb7798 1 UDP 2130706431 fe80::7e7a:91ff:fed3:849d 18860 typ host</span><br><span style="color: hsl(120, 100%, 40%);">+ a=candidate:Ha010527 1 UDP 2130706431 10.1.5.39 18860 typ host</span><br><span style="color: hsl(120, 100%, 40%);">+ a=candidate:Ha01417f 1 UDP 2130706431 10.1.65.127 18860 typ host</span><br><span style="color: hsl(120, 100%, 40%);">+ a=candidate:Hac112a01 1 UDP 2130706431 172.17.42.1 18860 typ host</span><br><span style="color: hsl(120, 100%, 40%);">+ a=rtpmap:0 PCMU/8000</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ ]]></span><br><span style="color: hsl(120, 100%, 40%);">+ </send></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ <recv response="100" optional="true"></span><br><span style="color: hsl(120, 100%, 40%);">+ </recv></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ <recv response="180" optional="true"></span><br><span style="color: hsl(120, 100%, 40%);">+ </recv></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ <!-- By adding rrs="true" (Record Route Sets), the route sets --></span><br><span style="color: hsl(120, 100%, 40%);">+ <!-- are saved and used for following messages sent. Useful to test --></span><br><span style="color: hsl(120, 100%, 40%);">+ <!-- against stateful SIP proxies/B2BUAs. --></span><br><span style="color: hsl(120, 100%, 40%);">+ <recv response="200" rtd="true" crlf="true"></span><br><span style="color: hsl(120, 100%, 40%);">+ <action></span><br><span style="color: hsl(120, 100%, 40%);">+ <ereg regexp="a=ice-ufrag" search_in="body" check_it="true" assign_to="dummy" /></span><br><span style="color: hsl(120, 100%, 40%);">+ </action></span><br><span style="color: hsl(120, 100%, 40%);">+ </recv></span><br><span style="color: hsl(120, 100%, 40%);">+ <Reference variables="dummy" /></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ <!-- Packet lost can be simulated in any send/recv message by --></span><br><span style="color: hsl(120, 100%, 40%);">+ <!-- by adding the 'lost = "10"'. Value can be [1-100] percent. --></span><br><span style="color: hsl(120, 100%, 40%);">+ <send></span><br><span style="color: hsl(120, 100%, 40%);">+ <![CDATA[</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ ACK sip:[service]@voxbone.com SIP/2.0</span><br><span style="color: hsl(120, 100%, 40%);">+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]</span><br><span style="color: hsl(120, 100%, 40%);">+ From: sipp <sip:test@[local_ip]:[local_port]>;tag=[call_number]</span><br><span style="color: hsl(120, 100%, 40%);">+ To: sut <sip:[service]@voxbone.com>[peer_tag_param]</span><br><span style="color: hsl(120, 100%, 40%);">+ Call-ID: [call_id]</span><br><span style="color: hsl(120, 100%, 40%);">+ CSeq: 1 ACK</span><br><span style="color: hsl(120, 100%, 40%);">+ Contact: sip:sipp@[local_ip]:[local_port]</span><br><span style="color: hsl(120, 100%, 40%);">+ Max-Forwards: 70</span><br><span style="color: hsl(120, 100%, 40%);">+ Subject: Performance Test</span><br><span style="color: hsl(120, 100%, 40%);">+ Content-Length: 0</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ ]]></span><br><span style="color: hsl(120, 100%, 40%);">+ </send></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ <pause milliseconds="1000"/></span><br><span style="color: hsl(120, 100%, 40%);">+ <!-- The 'crlf' option inserts a blank line in the statistics report. --></span><br><span style="color: hsl(120, 100%, 40%);">+ <send retrans="500"></span><br><span style="color: hsl(120, 100%, 40%);">+ <![CDATA[</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ BYE sip:[service]@voxbone.com SIP/2.0</span><br><span style="color: hsl(120, 100%, 40%);">+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]</span><br><span style="color: hsl(120, 100%, 40%);">+ From: sipp <sip:test@[local_ip]:[local_port]>;tag=[call_number]</span><br><span style="color: hsl(120, 100%, 40%);">+ To: sut <sip:[service]@voxbone.com>[peer_tag_param]</span><br><span style="color: hsl(120, 100%, 40%);">+ Call-ID: [call_id]</span><br><span style="color: hsl(120, 100%, 40%);">+ CSeq: 2 BYE</span><br><span style="color: hsl(120, 100%, 40%);">+ Contact: sip:sipp@[local_ip]:[local_port]</span><br><span style="color: hsl(120, 100%, 40%);">+ Max-Forwards: 70</span><br><span style="color: hsl(120, 100%, 40%);">+ Subject: Performance Test</span><br><span style="color: hsl(120, 100%, 40%);">+ Content-Length: 0</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ ]]></span><br><span style="color: hsl(120, 100%, 40%);">+ </send></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ <recv response="200" crlf="true"></span><br><span style="color: hsl(120, 100%, 40%);">+ </recv></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</scenario></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>diff --git a/tests/channels/pjsip/ice/ice_offered/test-config.yaml b/tests/channels/pjsip/ice/ice_offered/test-config.yaml</span><br><span>new file mode 100644</span><br><span>index 0000000..3833442</span><br><span>--- /dev/null</span><br><span>+++ b/tests/channels/pjsip/ice/ice_offered/test-config.yaml</span><br><span>@@ -0,0 +1,27 @@</span><br><span style="color: hsl(120, 100%, 40%);">+testinfo:</span><br><span style="color: hsl(120, 100%, 40%);">+ summary: 'Test that if Asterisk does put ice in the response if it is requested'</span><br><span style="color: hsl(120, 100%, 40%);">+ description: |</span><br><span style="color: hsl(120, 100%, 40%);">+ 'Endpôint A has ice enabled and sends an invite with ICE candidates in the SDP. The</span><br><span style="color: hsl(120, 100%, 40%);">+ ANSWER from asterisk should contain ICE candidates'</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+test-modules:</span><br><span style="color: hsl(120, 100%, 40%);">+ test-object:</span><br><span style="color: hsl(120, 100%, 40%);">+ config-section: test-object-config</span><br><span style="color: hsl(120, 100%, 40%);">+ typename: 'sipp.SIPpTestCase'</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+test-object-config:</span><br><span style="color: hsl(120, 100%, 40%);">+ memcheck-delay-stop: 7</span><br><span style="color: hsl(120, 100%, 40%);">+ fail-on-any: False</span><br><span style="color: hsl(120, 100%, 40%);">+ test-iterations:</span><br><span style="color: hsl(120, 100%, 40%);">+ -</span><br><span style="color: hsl(120, 100%, 40%);">+ scenarios:</span><br><span style="color: hsl(120, 100%, 40%);">+ - { 'key-args': {'scenario': 'A_PARTY.xml', '-i': '127.0.0.1', '-p': '5061', '-s': '3200000000'} }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+properties:</span><br><span style="color: hsl(120, 100%, 40%);">+ dependencies:</span><br><span style="color: hsl(120, 100%, 40%);">+ - sipp :</span><br><span style="color: hsl(120, 100%, 40%);">+ version : 'v3.0'</span><br><span style="color: hsl(120, 100%, 40%);">+ - asterisk : 'res_pjsip'</span><br><span style="color: hsl(120, 100%, 40%);">+ tags:</span><br><span style="color: hsl(120, 100%, 40%);">+ - pjsip</span><br><span>diff --git a/tests/channels/pjsip/ice/tests.yaml b/tests/channels/pjsip/ice/tests.yaml</span><br><span>new file mode 100644</span><br><span>index 0000000..9ba4765</span><br><span>--- /dev/null</span><br><span>+++ b/tests/channels/pjsip/ice/tests.yaml</span><br><span>@@ -0,0 +1,3 @@</span><br><span style="color: hsl(120, 100%, 40%);">+tests:</span><br><span style="color: hsl(120, 100%, 40%);">+ - test: 'ice_not_offered'</span><br><span style="color: hsl(120, 100%, 40%);">+ - test: 'ice_offered'</span><br><span>diff --git a/tests/channels/pjsip/tests.yaml b/tests/channels/pjsip/tests.yaml</span><br><span>index 681bda2..34ecab7 100644</span><br><span>--- a/tests/channels/pjsip/tests.yaml</span><br><span>+++ b/tests/channels/pjsip/tests.yaml</span><br><span>@@ -24,6 +24,7 @@</span><br><span> - dir: 'transfers'</span><br><span> - dir: 'transport'</span><br><span> - dir: 'video_calls'</span><br><span style="color: hsl(120, 100%, 40%);">+ - dir: 'ice'</span><br><span> - test: 'accountcode'</span><br><span> - test: 'acl_call'</span><br><span> - test: 'allow_overlap'</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/9564">change 9564</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/9564"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: testsuite </div>
<div style="display:none"> Gerrit-Branch: 16 </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: Ic4744c062e17862bf60eaa76f46af2ba2743e650 </div>
<div style="display:none"> Gerrit-Change-Number: 9564 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Torrey Searle <tsearle@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Benjamin Keith Ford <bford@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>