[Asterisk-code-review] testsuite: add tests to ensure ice in ANSWER only if offered (testsuite[master])
Torrey Searle
asteriskteam at digium.com
Fri Jul 13 01:38:44 CDT 2018
Torrey Searle has uploaded this change for review. ( https://gerrit.asterisk.org/9428
Change subject: testsuite: add tests to ensure ice in ANSWER only if offered
......................................................................
testsuite: add tests to ensure ice in ANSWER only if offered
Test that ICE is in the answer when endpoint is has ice enabled and
candidates are present in the offer, also test that if ice is
enabled and not offered, it is not present in the answer
ASTERISK-27957 #close
Change-Id: Ic4744c062e17862bf60eaa76f46af2ba2743e650
---
A tests/channels/pjsip/ice/ice_not_offered/configs/ast1/extensions.conf
A tests/channels/pjsip/ice/ice_not_offered/configs/ast1/pjsip.conf
A tests/channels/pjsip/ice/ice_not_offered/run-test
A tests/channels/pjsip/ice/ice_not_offered/sipp/A_PARTY.xml
A tests/channels/pjsip/ice/ice_not_offered/sipp/B_PARTY.xml
A tests/channels/pjsip/ice/ice_not_offered/test-config.yaml
A tests/channels/pjsip/ice/ice_offered/configs/ast1/extensions.conf
A tests/channels/pjsip/ice/ice_offered/configs/ast1/pjsip.conf
A tests/channels/pjsip/ice/ice_offered/run-test
A tests/channels/pjsip/ice/ice_offered/sipp/A_PARTY.xml
A tests/channels/pjsip/ice/ice_offered/sipp/B_PARTY.xml
A tests/channels/pjsip/ice/ice_offered/test-config.yaml
A tests/channels/pjsip/ice/tests.yaml
M tests/channels/pjsip/tests.yaml
14 files changed, 692 insertions(+), 0 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/28/9428/1
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
new file mode 100644
index 0000000..ad7b155
--- /dev/null
+++ b/tests/channels/pjsip/ice/ice_not_offered/configs/ast1/extensions.conf
@@ -0,0 +1,11 @@
+[general]
+static=yes
+writeprotect=yes
+autofallthrough=yes
+clearglobalvars=no
+priorityjumping=yes
+
+[globals]
+
+[default]
+exten => _X.,1,Dial(pjsip/sbc,180)
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
new file mode 100644
index 0000000..3dce37a
--- /dev/null
+++ b/tests/channels/pjsip/ice/ice_not_offered/configs/ast1/pjsip.conf
@@ -0,0 +1,57 @@
+;--
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+Non mapped elements start
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+[general]
+sipdebug = yes
+
+[PEER_A]
+port = 5061
+
+[sbc]
+port = 5700
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+Non mapped elements end
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+--;
+
+
+[global]
+type = global
+debug = yes
+
+[transport-udp]
+type = transport
+protocol = udp
+bind = 0.0.0.0:5060
+
+[PEER_A]
+type = aor
+contact = sip:127.0.0.1:5061
+
+[PEER_A]
+type = identify
+endpoint = PEER_A
+match = 127.0.0.1
+
+[PEER_A]
+type = endpoint
+context = default
+allow = ulaw
+direct_media = no
+ice_support = yes
+aors = PEER_A
+
+[sbc]
+type = aor
+contact = sip:127.0.0.1:5700
+
+[sbc]
+type = endpoint
+context = callcontrol
+allow = ulaw
+direct_media = no
+aors = sbc
+
diff --git a/tests/channels/pjsip/ice/ice_not_offered/run-test b/tests/channels/pjsip/ice/ice_not_offered/run-test
new file mode 100755
index 0000000..0808861
--- /dev/null
+++ b/tests/channels/pjsip/ice/ice_not_offered/run-test
@@ -0,0 +1,68 @@
+#!/usr/bin/env python
+'''
+Copyright (C) 2010, Digium, Inc.
+Russell Bryant <russell at digium.com>
+
+This program is free software, distributed under the terms of
+the GNU General Public License Version 2.
+'''
+
+import sys
+import os
+import logging
+import signal
+import subprocess
+import time
+
+sys.path.append("lib/python")
+sys.path.append("utils")
+
+from twisted.internet import reactor
+from asterisk.sipp import SIPpTest
+
+WORKING_DIR = os.path.abspath(os.path.dirname(__file__))
+TEST_DIR = os.path.dirname(os.path.realpath(__file__))
+
+logger = logging.getLogger(__name__)
+e164 = "3200000000"
+sippA_logfile = WORKING_DIR + "/A_PARTY.log"
+sippA_errfile = WORKING_DIR + "/A_PARTY_ERR.log"
+sippB_logfile = WORKING_DIR + "/B_PARTY.log"
+sippB_errfile = WORKING_DIR + "/B_PARTY_ERR.log"
+
+SIPP_SCENARIOS = [
+ {
+ 'scenario' : 'B_PARTY.xml',
+ '-i' : '127.0.0.1',
+ '-p' : '5700',
+ '-message_file' : sippB_logfile,
+ '-error_file' : sippB_errfile,
+ '-trace_msg' : '-trace_err',
+ },
+ {
+ 'scenario' : 'A_PARTY.xml',
+ '-i' : '127.0.0.1',
+ '-p' : '5061',
+ '-s' : e164,
+ '-message_file' : sippA_logfile,
+ '-error_file' : sippA_errfile,
+ '-trace_msg' : '-trace_err',
+ }
+]
+
+def main():
+ test = SIPpTest(WORKING_DIR, TEST_DIR, SIPP_SCENARIOS)
+ test.reactor_timeout = 65;
+
+ reactor.run()
+
+
+ if not test.passed:
+ return 1
+
+ return 0
+
+
+if __name__ == "__main__":
+ sys.exit(main())
+
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
new file mode 100644
index 0000000..0d6d923
--- /dev/null
+++ b/tests/channels/pjsip/ice/ice_not_offered/sipp/A_PARTY.xml
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+<!-- This program is free software; you can redistribute it and/or -->
+<!-- modify it under the terms of the GNU General Public License as -->
+<!-- published by the Free Software Foundation; either version 2 of the -->
+<!-- License, or (at your option) any later version. -->
+<!-- -->
+<!-- This program is distributed in the hope that it will be useful, -->
+<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of -->
+<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -->
+<!-- GNU General Public License for more details. -->
+<!-- -->
+<!-- You should have received a copy of the GNU General Public License -->
+<!-- along with this program; if not, write to the -->
+<!-- Free Software Foundation, Inc., -->
+<!-- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -->
+<!-- -->
+<!-- Sipp 'uac' scenario with pcap (rtp) play -->
+<!-- -->
+<scenario name="CONTENT_TYPE_PARAMS">
+ <!-- In client mode (sipp placing calls), the Call-ID MUST be -->
+ <!-- generated by sipp. To do so, use [call_id] keyword. -->
+ <send retrans="500">
+ <![CDATA[
+
+ INVITE sip:[service]@voxbone.com SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ From: sipp <sip:test at voxbone.com>;tag=[call_number]
+ To: sut <sip:[service]@voxbone.com:[remote_port]>
+ Call-ID: [call_id]
+ CSeq: 1 INVITE
+ Contact: sip:sipp@[local_ip]:[local_port]
+ Max-Forwards: 70
+ Subject: Performance Test
+ Content-Type: application/sdp
+ Content-Length: [len]
+
+ v=0
+ o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]
+ s=-
+ c=IN IP[local_ip_type] [local_ip]
+ t=0 0
+ m=audio 9000 RTP/AVP 0
+ a=rtpmap:0 PCMU/8000
+
+
+ ]]>
+ </send>
+
+ <recv response="100" optional="true">
+ </recv>
+
+ <recv response="180" optional="true">
+ </recv>
+
+ <!-- By adding rrs="true" (Record Route Sets), the route sets -->
+ <!-- are saved and used for following messages sent. Useful to test -->
+ <!-- against stateful SIP proxies/B2BUAs. -->
+ <recv response="200" rtd="true" crlf="true">
+ <action>
+ <ereg regexp="a=ice-ufrag" search_in="body" check_it_inverse="true" assign_to="1" />
+ <log message="Log to avoid the problem of not using $1 [$1]"/>
+ </action>
+ </recv>
+
+
+ <!-- Packet lost can be simulated in any send/recv message by -->
+ <!-- by adding the 'lost = "10"'. Value can be [1-100] percent. -->
+ <send>
+ <![CDATA[
+
+ ACK sip:[service]@voxbone.com SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ From: sipp <sip:test@[local_ip]:[local_port]>;tag=[call_number]
+ To: sut <sip:[service]@voxbone.com>[peer_tag_param]
+ Call-ID: [call_id]
+ CSeq: 1 ACK
+ Contact: sip:sipp@[local_ip]:[local_port]
+ Max-Forwards: 70
+ Subject: Performance Test
+ Content-Length: 0
+
+ ]]>
+ </send>
+
+ <pause milliseconds="1000"/>
+ <!-- The 'crlf' option inserts a blank line in the statistics report. -->
+ <send retrans="500">
+ <![CDATA[
+
+ BYE sip:[service]@voxbone.com SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ From: sipp <sip:test@[local_ip]:[local_port]>;tag=[call_number]
+ To: sut <sip:[service]@voxbone.com>[peer_tag_param]
+ Call-ID: [call_id]
+ CSeq: 2 BYE
+ Contact: sip:sipp@[local_ip]:[local_port]
+ Max-Forwards: 70
+ Subject: Performance Test
+ Content-Length: 0
+
+ ]]>
+ </send>
+
+ <recv response="200" crlf="true">
+ </recv>
+
+</scenario>
+
+
diff --git a/tests/channels/pjsip/ice/ice_not_offered/sipp/B_PARTY.xml b/tests/channels/pjsip/ice/ice_not_offered/sipp/B_PARTY.xml
new file mode 100644
index 0000000..f9bf3ba
--- /dev/null
+++ b/tests/channels/pjsip/ice/ice_not_offered/sipp/B_PARTY.xml
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="CONTENT_TYPE_PARAMS">
+
+<recv request="INVITE" crlf="true" rrs="true">
+</recv>
+
+
+
+<send>
+<![CDATA[
+
+SIP/2.0 100 Trying
+[last_Via:]
+[last_Call-ID:]
+[last_From:]
+[last_To:]
+[last_CSeq:]
+Content-Length: 0
+
+]]>
+</send>
+
+<send>
+<![CDATA[
+
+SIP/2.0 180 Ringing
+[last_Via:]
+[last_Call-ID:]
+[last_From:]
+[last_To:]
+[last_CSeq:]
+Content-Length: 0
+
+]]>
+</send>
+
+<send retrans="500">
+<![CDATA[
+
+SIP/2.0 200 OK
+[last_Via:]
+[last_Call-ID:]
+[last_From:]
+[last_To:];tag=[call_number]
+[last_CSeq:]
+Contact: <sip:736596371553211257@[local_ip]:[local_port];user=phone>
+Content-Type: application/sdp
+Content-Length: [len]
+
+v=0
+o=HuaweiSoftX3000 6644052 6644052 IN IP[local_ip_type] [local_ip]
+s=Sip Call
+c=IN IP[local_ip_type] [local_ip]
+t=0 0
+m=audio 8000 RTP/AVP 0
+a=rtpmap:0 PCMU/8000
+
+]]>
+</send>
+
+
+<recv request="ACK" rtd="true" crlf="true">
+</recv>
+
+<recv request="BYE">
+</recv>
+
+<send>
+<![CDATA[
+
+SIP/2.0 200 OK
+[last_Via:]
+[last_From:]
+[last_To:]
+[last_Call-ID:]
+[last_CSeq:]
+Content-Length: 0
+
+]]>
+</send>
+</scenario>
diff --git a/tests/channels/pjsip/ice/ice_not_offered/test-config.yaml b/tests/channels/pjsip/ice/ice_not_offered/test-config.yaml
new file mode 100644
index 0000000..c98b299
--- /dev/null
+++ b/tests/channels/pjsip/ice/ice_not_offered/test-config.yaml
@@ -0,0 +1,12 @@
+testinfo:
+ summary: 'Test that if Asterisk does not put ice in the response if it is not requested'
+ description: |
+ 'Endpôint A has ice enabled and sends an invite w/o ICE candidates in the SDP. The
+ ANSWER from asterisk should not contain any ICE candidates'
+
+properties:
+ minversion: '1.4'
+ dependencies:
+ - app : 'sipp'
+ tags:
+ - SIP
diff --git a/tests/channels/pjsip/ice/ice_offered/configs/ast1/extensions.conf b/tests/channels/pjsip/ice/ice_offered/configs/ast1/extensions.conf
new file mode 100644
index 0000000..ad7b155
--- /dev/null
+++ b/tests/channels/pjsip/ice/ice_offered/configs/ast1/extensions.conf
@@ -0,0 +1,11 @@
+[general]
+static=yes
+writeprotect=yes
+autofallthrough=yes
+clearglobalvars=no
+priorityjumping=yes
+
+[globals]
+
+[default]
+exten => _X.,1,Dial(pjsip/sbc,180)
diff --git a/tests/channels/pjsip/ice/ice_offered/configs/ast1/pjsip.conf b/tests/channels/pjsip/ice/ice_offered/configs/ast1/pjsip.conf
new file mode 100644
index 0000000..3dce37a
--- /dev/null
+++ b/tests/channels/pjsip/ice/ice_offered/configs/ast1/pjsip.conf
@@ -0,0 +1,57 @@
+;--
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+Non mapped elements start
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+[general]
+sipdebug = yes
+
+[PEER_A]
+port = 5061
+
+[sbc]
+port = 5700
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+Non mapped elements end
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+--;
+
+
+[global]
+type = global
+debug = yes
+
+[transport-udp]
+type = transport
+protocol = udp
+bind = 0.0.0.0:5060
+
+[PEER_A]
+type = aor
+contact = sip:127.0.0.1:5061
+
+[PEER_A]
+type = identify
+endpoint = PEER_A
+match = 127.0.0.1
+
+[PEER_A]
+type = endpoint
+context = default
+allow = ulaw
+direct_media = no
+ice_support = yes
+aors = PEER_A
+
+[sbc]
+type = aor
+contact = sip:127.0.0.1:5700
+
+[sbc]
+type = endpoint
+context = callcontrol
+allow = ulaw
+direct_media = no
+aors = sbc
+
diff --git a/tests/channels/pjsip/ice/ice_offered/run-test b/tests/channels/pjsip/ice/ice_offered/run-test
new file mode 100755
index 0000000..c081100
--- /dev/null
+++ b/tests/channels/pjsip/ice/ice_offered/run-test
@@ -0,0 +1,67 @@
+#!/usr/bin/env python
+'''
+Copyright (C) 2010, Digium, Inc.
+Russell Bryant <russell at digium.com>
+
+This program is free software, distributed under the terms of
+the GNU General Public License Version 2.
+'''
+
+import sys
+import os
+import logging
+import signal
+import subprocess
+import time
+
+sys.path.append("lib/python")
+sys.path.append("utils")
+
+from twisted.internet import reactor
+from asterisk.sipp import SIPpTest
+
+WORKING_DIR = os.path.abspath(os.path.dirname(__file__))
+TEST_DIR = os.path.dirname(os.path.realpath(__file__))
+
+logger = logging.getLogger(__name__)
+e164 = "3200000000"
+sippA_logfile = WORKING_DIR + "/A_PARTY.log"
+sippA_errfile = WORKING_DIR + "/A_PARTY_ERR.log"
+sippB_logfile = WORKING_DIR + "/B_PARTY.log"
+sippB_errfile = WORKING_DIR + "/B_PARTY_ERR.log"
+
+SIPP_SCENARIOS = [
+ {
+ 'scenario' : 'B_PARTY.xml',
+ '-i' : '127.0.0.1',
+ '-p' : '5700',
+ '-message_file' : sippB_logfile,
+ '-error_file' : sippB_errfile,
+ '-trace_msg' : '-trace_err',
+ },
+ {
+ 'scenario' : 'A_PARTY.xml',
+ '-i' : '127.0.0.1',
+ '-p' : '5061',
+ '-s' : e164,
+ '-message_file' : sippA_logfile,
+ '-error_file' : sippA_errfile,
+ '-trace_msg' : '-trace_err',
+ }
+]
+
+def main():
+ test = SIPpTest(WORKING_DIR, TEST_DIR, SIPP_SCENARIOS)
+ test.reactor_timeout = 65;
+
+ reactor.run()
+
+ if not test.passed:
+ return 1
+
+ return 0
+
+
+if __name__ == "__main__":
+ sys.exit(main())
+
diff --git a/tests/channels/pjsip/ice/ice_offered/sipp/A_PARTY.xml b/tests/channels/pjsip/ice/ice_offered/sipp/A_PARTY.xml
new file mode 100644
index 0000000..6ef6918
--- /dev/null
+++ b/tests/channels/pjsip/ice/ice_offered/sipp/A_PARTY.xml
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+<!-- This program is free software; you can redistribute it and/or -->
+<!-- modify it under the terms of the GNU General Public License as -->
+<!-- published by the Free Software Foundation; either version 2 of the -->
+<!-- License, or (at your option) any later version. -->
+<!-- -->
+<!-- This program is distributed in the hope that it will be useful, -->
+<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of -->
+<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -->
+<!-- GNU General Public License for more details. -->
+<!-- -->
+<!-- You should have received a copy of the GNU General Public License -->
+<!-- along with this program; if not, write to the -->
+<!-- Free Software Foundation, Inc., -->
+<!-- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -->
+<!-- -->
+<!-- Sipp 'uac' scenario with pcap (rtp) play -->
+<!-- -->
+<scenario name="CONTENT_TYPE_PARAMS">
+ <!-- In client mode (sipp placing calls), the Call-ID MUST be -->
+ <!-- generated by sipp. To do so, use [call_id] keyword. -->
+ <send retrans="500">
+ <![CDATA[
+
+ INVITE sip:[service]@voxbone.com SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ From: sipp <sip:test at voxbone.com>;tag=[call_number]
+ To: sut <sip:[service]@voxbone.com:[remote_port]>
+ Call-ID: [call_id]
+ CSeq: 1 INVITE
+ Contact: sip:sipp@[local_ip]:[local_port]
+ Max-Forwards: 70
+ Subject: Performance Test
+ Content-Type: application/sdp
+ Content-Length: [len]
+
+ v=0
+ o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]
+ s=-
+ c=IN IP[local_ip_type] [local_ip]
+ t=0 0
+ m=audio 9000 RTP/AVP 0
+ a=ice-ufrag:2c8cc7c729d0eaf44b6870147d7610de
+ a=ice-pwd:5ae44e9b6894542d4d851a065892f095
+ a=candidate:H59b7e24f 1 UDP 2130706431 fe80::2ad2:44ff:fe7d:ca0d 18860 typ host
+ a=candidate:H1ceb7798 1 UDP 2130706431 fe80::7e7a:91ff:fed3:849d 18860 typ host
+ a=candidate:Ha010527 1 UDP 2130706431 10.1.5.39 18860 typ host
+ a=candidate:Ha01417f 1 UDP 2130706431 10.1.65.127 18860 typ host
+ a=candidate:Hac112a01 1 UDP 2130706431 172.17.42.1 18860 typ host
+ a=rtpmap:0 PCMU/8000
+
+
+ ]]>
+ </send>
+
+ <recv response="100" optional="true">
+ </recv>
+
+ <recv response="180" optional="true">
+ </recv>
+
+ <!-- By adding rrs="true" (Record Route Sets), the route sets -->
+ <!-- are saved and used for following messages sent. Useful to test -->
+ <!-- against stateful SIP proxies/B2BUAs. -->
+ <recv response="200" rtd="true" crlf="true">
+ <action>
+ <ereg regexp="a=ice-ufrag" search_in="body" check_it="true" assign_to="1" />
+ <log message="Log to avoid the problem of not using $1 [$1]"/>
+ </action>
+ </recv>
+
+
+ <!-- Packet lost can be simulated in any send/recv message by -->
+ <!-- by adding the 'lost = "10"'. Value can be [1-100] percent. -->
+ <send>
+ <![CDATA[
+
+ ACK sip:[service]@voxbone.com SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ From: sipp <sip:test@[local_ip]:[local_port]>;tag=[call_number]
+ To: sut <sip:[service]@voxbone.com>[peer_tag_param]
+ Call-ID: [call_id]
+ CSeq: 1 ACK
+ Contact: sip:sipp@[local_ip]:[local_port]
+ Max-Forwards: 70
+ Subject: Performance Test
+ Content-Length: 0
+
+ ]]>
+ </send>
+
+ <pause milliseconds="1000"/>
+ <!-- The 'crlf' option inserts a blank line in the statistics report. -->
+ <send retrans="500">
+ <![CDATA[
+
+ BYE sip:[service]@voxbone.com SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ From: sipp <sip:test@[local_ip]:[local_port]>;tag=[call_number]
+ To: sut <sip:[service]@voxbone.com>[peer_tag_param]
+ Call-ID: [call_id]
+ CSeq: 2 BYE
+ Contact: sip:sipp@[local_ip]:[local_port]
+ Max-Forwards: 70
+ Subject: Performance Test
+ Content-Length: 0
+
+ ]]>
+ </send>
+
+ <recv response="200" crlf="true">
+ </recv>
+
+</scenario>
+
+
diff --git a/tests/channels/pjsip/ice/ice_offered/sipp/B_PARTY.xml b/tests/channels/pjsip/ice/ice_offered/sipp/B_PARTY.xml
new file mode 100644
index 0000000..f9bf3ba
--- /dev/null
+++ b/tests/channels/pjsip/ice/ice_offered/sipp/B_PARTY.xml
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="CONTENT_TYPE_PARAMS">
+
+<recv request="INVITE" crlf="true" rrs="true">
+</recv>
+
+
+
+<send>
+<![CDATA[
+
+SIP/2.0 100 Trying
+[last_Via:]
+[last_Call-ID:]
+[last_From:]
+[last_To:]
+[last_CSeq:]
+Content-Length: 0
+
+]]>
+</send>
+
+<send>
+<![CDATA[
+
+SIP/2.0 180 Ringing
+[last_Via:]
+[last_Call-ID:]
+[last_From:]
+[last_To:]
+[last_CSeq:]
+Content-Length: 0
+
+]]>
+</send>
+
+<send retrans="500">
+<![CDATA[
+
+SIP/2.0 200 OK
+[last_Via:]
+[last_Call-ID:]
+[last_From:]
+[last_To:];tag=[call_number]
+[last_CSeq:]
+Contact: <sip:736596371553211257@[local_ip]:[local_port];user=phone>
+Content-Type: application/sdp
+Content-Length: [len]
+
+v=0
+o=HuaweiSoftX3000 6644052 6644052 IN IP[local_ip_type] [local_ip]
+s=Sip Call
+c=IN IP[local_ip_type] [local_ip]
+t=0 0
+m=audio 8000 RTP/AVP 0
+a=rtpmap:0 PCMU/8000
+
+]]>
+</send>
+
+
+<recv request="ACK" rtd="true" crlf="true">
+</recv>
+
+<recv request="BYE">
+</recv>
+
+<send>
+<![CDATA[
+
+SIP/2.0 200 OK
+[last_Via:]
+[last_From:]
+[last_To:]
+[last_Call-ID:]
+[last_CSeq:]
+Content-Length: 0
+
+]]>
+</send>
+</scenario>
diff --git a/tests/channels/pjsip/ice/ice_offered/test-config.yaml b/tests/channels/pjsip/ice/ice_offered/test-config.yaml
new file mode 100644
index 0000000..ac2412c
--- /dev/null
+++ b/tests/channels/pjsip/ice/ice_offered/test-config.yaml
@@ -0,0 +1,12 @@
+testinfo:
+ summary: 'Test that if Asterisk does put ice in the response if it is requested'
+ description: |
+ 'Endpôint A has ice enabled and sends an invite with ICE candidates in the SDP. The
+ ANSWER from asterisk should contain ICE candidates'
+
+properties:
+ minversion: '13'
+ dependencies:
+ - app : 'sipp'
+ tags:
+ - SIP
diff --git a/tests/channels/pjsip/ice/tests.yaml b/tests/channels/pjsip/ice/tests.yaml
new file mode 100644
index 0000000..9ba4765
--- /dev/null
+++ b/tests/channels/pjsip/ice/tests.yaml
@@ -0,0 +1,3 @@
+tests:
+ - test: 'ice_not_offered'
+ - test: 'ice_offered'
diff --git a/tests/channels/pjsip/tests.yaml b/tests/channels/pjsip/tests.yaml
index 681bda2..34ecab7 100644
--- a/tests/channels/pjsip/tests.yaml
+++ b/tests/channels/pjsip/tests.yaml
@@ -24,6 +24,7 @@
- dir: 'transfers'
- dir: 'transport'
- dir: 'video_calls'
+ - dir: 'ice'
- test: 'accountcode'
- test: 'acl_call'
- test: 'allow_overlap'
--
To view, visit https://gerrit.asterisk.org/9428
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic4744c062e17862bf60eaa76f46af2ba2743e650
Gerrit-Change-Number: 9428
Gerrit-PatchSet: 1
Gerrit-Owner: Torrey Searle <tsearle at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180713/a48b3323/attachment-0001.html>
More information about the asterisk-code-review
mailing list