<p>Paulo Vicentini has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/testsuite/+/13847">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Non negotiated rtp frame causes call disconnection when there is a SSRC change<br><br>For a non negotiated rtp frame, when there was a SSRC change, the frame<br>would be marked as a control frame and it would be queued to be written<br>and then leading to a disconnection<br>(ast_channel_softhangup_internal_flag_add)<br>The associated patch prevents processing of a non negotiated rtp frame<br>considering also when SSRC changes<br><br>ASTERISK-28759<br><br>Change-Id: If3e760a7bb94c9bfc1ee24aff7f5fd7a3cbd33ed<br>---<br>A tests/channels/pjsip/non_negotiated_frame_SSRC_change/configs/ast1/extensions.conf<br>A tests/channels/pjsip/non_negotiated_frame_SSRC_change/configs/ast1/pjsip.conf<br>A tests/channels/pjsip/non_negotiated_frame_SSRC_change/run-test<br>A tests/channels/pjsip/non_negotiated_frame_SSRC_change/sipp/A_party_g711a.pcap<br>A tests/channels/pjsip/non_negotiated_frame_SSRC_change/sipp/g711a.pcap<br>A tests/channels/pjsip/non_negotiated_frame_SSRC_change/sipp/ssrc1.pcap<br>A tests/channels/pjsip/non_negotiated_frame_SSRC_change/sipp/ssrc2.pcap<br>A tests/channels/pjsip/non_negotiated_frame_SSRC_change/sipp/uac_g719_g711.xml<br>A tests/channels/pjsip/non_negotiated_frame_SSRC_change/sipp/uas_asterisk.xml<br>A tests/channels/pjsip/non_negotiated_frame_SSRC_change/test-config.yaml<br>M tests/channels/pjsip/tests.yaml<br>11 files changed, 429 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/47/13847/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/tests/channels/pjsip/non_negotiated_frame_SSRC_change/configs/ast1/extensions.conf b/tests/channels/pjsip/non_negotiated_frame_SSRC_change/configs/ast1/extensions.conf</span><br><span>new file mode 100644</span><br><span>index 0000000..ad7b155</span><br><span>--- /dev/null</span><br><span>+++ b/tests/channels/pjsip/non_negotiated_frame_SSRC_change/configs/ast1/extensions.conf</span><br><span>@@ -0,0 +1,11 @@</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,Dial(pjsip/sbc,180)</span><br><span>diff --git a/tests/channels/pjsip/non_negotiated_frame_SSRC_change/configs/ast1/pjsip.conf b/tests/channels/pjsip/non_negotiated_frame_SSRC_change/configs/ast1/pjsip.conf</span><br><span>new file mode 100644</span><br><span>index 0000000..6ef2143</span><br><span>--- /dev/null</span><br><span>+++ b/tests/channels/pjsip/non_negotiated_frame_SSRC_change/configs/ast1/pjsip.conf</span><br><span>@@ -0,0 +1,80 @@</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%);">+user_agent = Callcontrol</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-udp6]</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 = [::]:5060</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%);">+dtmf_mode = rfc4733</span><br><span style="color: hsl(120, 100%, 40%);">+disallow = all</span><br><span style="color: hsl(120, 100%, 40%);">+allow = alaw</span><br><span style="color: hsl(120, 100%, 40%);">+direct_media = no</span><br><span style="color: hsl(120, 100%, 40%);">+send_rpid = yes</span><br><span style="color: hsl(120, 100%, 40%);">+sdp_session = session</span><br><span style="color: hsl(120, 100%, 40%);">+dtls_verify = no</span><br><span style="color: hsl(120, 100%, 40%);">+aors = PEER_A</span><br><span style="color: hsl(120, 100%, 40%);">+t38_udptl = yes</span><br><span style="color: hsl(120, 100%, 40%);">+t38_udptl_ec = redundancy</span><br><span style="color: hsl(120, 100%, 40%);">+asymmetric_rtp_codec = no</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%);">+dtmf_mode = rfc4733</span><br><span style="color: hsl(120, 100%, 40%);">+disallow = all</span><br><span style="color: hsl(120, 100%, 40%);">+allow = alaw</span><br><span style="color: hsl(120, 100%, 40%);">+direct_media = no</span><br><span style="color: hsl(120, 100%, 40%);">+send_rpid = yes</span><br><span style="color: hsl(120, 100%, 40%);">+sdp_session = session</span><br><span style="color: hsl(120, 100%, 40%);">+dtls_verify = no</span><br><span style="color: hsl(120, 100%, 40%);">+dtls_rekey = 300</span><br><span style="color: hsl(120, 100%, 40%);">+dtls_cipher = ALL</span><br><span style="color: hsl(120, 100%, 40%);">+aors = sbc</span><br><span style="color: hsl(120, 100%, 40%);">+t38_udptl = yes</span><br><span style="color: hsl(120, 100%, 40%);">+t38_udptl_ec = redundancy</span><br><span style="color: hsl(120, 100%, 40%);">+asymmetric_rtp_codec = no</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>diff --git a/tests/channels/pjsip/non_negotiated_frame_SSRC_change/run-test b/tests/channels/pjsip/non_negotiated_frame_SSRC_change/run-test</span><br><span>new file mode 100755</span><br><span>index 0000000..72db0a7</span><br><span>--- /dev/null</span><br><span>+++ b/tests/channels/pjsip/non_negotiated_frame_SSRC_change/run-test</span><br><span>@@ -0,0 +1,71 @@</span><br><span style="color: hsl(120, 100%, 40%);">+#!/usr/bin/env python</span><br><span style="color: hsl(120, 100%, 40%);">+'''</span><br><span style="color: hsl(120, 100%, 40%);">+Copyright (C) 2010, Digium, Inc.</span><br><span style="color: hsl(120, 100%, 40%);">+Russell Bryant <russell@digium.com></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+This program is free software, distributed under the terms of</span><br><span style="color: hsl(120, 100%, 40%);">+the GNU General Public License Version 2.</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%);">+import sys</span><br><span style="color: hsl(120, 100%, 40%);">+import os</span><br><span style="color: hsl(120, 100%, 40%);">+import logging</span><br><span style="color: hsl(120, 100%, 40%);">+import signal</span><br><span style="color: hsl(120, 100%, 40%);">+import subprocess</span><br><span style="color: hsl(120, 100%, 40%);">+import time</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+sys.path.append("lib/python")</span><br><span style="color: hsl(120, 100%, 40%);">+sys.path.append("utils")</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+from twisted.internet import reactor</span><br><span style="color: hsl(120, 100%, 40%);">+from asterisk.sipp import SIPpTest</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+WORKING_DIR = os.path.abspath(os.path.dirname(__file__))</span><br><span style="color: hsl(120, 100%, 40%);">+TEST_DIR = os.path.dirname(os.path.realpath(__file__))</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+logger = logging.getLogger(__name__)</span><br><span style="color: hsl(120, 100%, 40%);">+e164 = "3200000000"</span><br><span style="color: hsl(120, 100%, 40%);">+sippA_logfile = WORKING_DIR + "/A_PARTY.log"</span><br><span style="color: hsl(120, 100%, 40%);">+sippA_errfile = WORKING_DIR + "/A_PARTY_ERR.log"</span><br><span style="color: hsl(120, 100%, 40%);">+sippB_logfile = WORKING_DIR + "/B_PARTY.log"</span><br><span style="color: hsl(120, 100%, 40%);">+sippB_errfile = WORKING_DIR + "/B_PARTY_ERR.log"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+SIPP_SCENARIOS = [</span><br><span style="color: hsl(120, 100%, 40%);">+ {</span><br><span style="color: hsl(120, 100%, 40%);">+ 'scenario' : 'uas_asterisk.xml',</span><br><span style="color: hsl(120, 100%, 40%);">+ '-i' : '127.0.0.1',</span><br><span style="color: hsl(120, 100%, 40%);">+ '-p' : '5700',</span><br><span style="color: hsl(120, 100%, 40%);">+ '-message_file' : sippB_logfile,</span><br><span style="color: hsl(120, 100%, 40%);">+ '-error_file' : sippB_errfile,</span><br><span style="color: hsl(120, 100%, 40%);">+ '-trace_msg' : '-trace_err',</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%);">+ 'scenario' : 'uac_g719_g711.xml',</span><br><span style="color: hsl(120, 100%, 40%);">+ '-i' : '127.0.0.1',</span><br><span style="color: hsl(120, 100%, 40%);">+ '-p' : '5061',</span><br><span style="color: hsl(120, 100%, 40%);">+ '-s' : e164,</span><br><span style="color: hsl(120, 100%, 40%);">+ '-d' : '20000',</span><br><span style="color: hsl(120, 100%, 40%);">+ '-mp': '6000',</span><br><span style="color: hsl(120, 100%, 40%);">+ '-message_file' : sippA_logfile,</span><br><span style="color: hsl(120, 100%, 40%);">+ '-error_file' : sippA_errfile,</span><br><span style="color: hsl(120, 100%, 40%);">+ '-trace_msg' : '-trace_err',</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%);">+def main():</span><br><span style="color: hsl(120, 100%, 40%);">+ test = SIPpTest(WORKING_DIR, TEST_DIR, SIPP_SCENARIOS)</span><br><span style="color: hsl(120, 100%, 40%);">+ test.reactor_timeout = 55;</span><br><span style="color: hsl(120, 100%, 40%);">+ reactor.run()</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ if not test.passed:</span><br><span style="color: hsl(120, 100%, 40%);">+ return 1</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ return 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%);">+if __name__ == "__main__":</span><br><span style="color: hsl(120, 100%, 40%);">+ sys.exit(main())</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%);">+# vim:sw=4:ts=4:expandtab:textwidth=79</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>diff --git a/tests/channels/pjsip/non_negotiated_frame_SSRC_change/sipp/A_party_g711a.pcap b/tests/channels/pjsip/non_negotiated_frame_SSRC_change/sipp/A_party_g711a.pcap</span><br><span>new file mode 100644</span><br><span>index 0000000..ba96dc6</span><br><span>--- /dev/null</span><br><span>+++ b/tests/channels/pjsip/non_negotiated_frame_SSRC_change/sipp/A_party_g711a.pcap</span><br><span>Binary files differ</span><br><span>diff --git a/tests/channels/pjsip/non_negotiated_frame_SSRC_change/sipp/g711a.pcap b/tests/channels/pjsip/non_negotiated_frame_SSRC_change/sipp/g711a.pcap</span><br><span>new file mode 100644</span><br><span>index 0000000..bafea38</span><br><span>--- /dev/null</span><br><span>+++ b/tests/channels/pjsip/non_negotiated_frame_SSRC_change/sipp/g711a.pcap</span><br><span>Binary files differ</span><br><span>diff --git a/tests/channels/pjsip/non_negotiated_frame_SSRC_change/sipp/ssrc1.pcap b/tests/channels/pjsip/non_negotiated_frame_SSRC_change/sipp/ssrc1.pcap</span><br><span>new file mode 100644</span><br><span>index 0000000..913dc79</span><br><span>--- /dev/null</span><br><span>+++ b/tests/channels/pjsip/non_negotiated_frame_SSRC_change/sipp/ssrc1.pcap</span><br><span>Binary files differ</span><br><span>diff --git a/tests/channels/pjsip/non_negotiated_frame_SSRC_change/sipp/ssrc2.pcap b/tests/channels/pjsip/non_negotiated_frame_SSRC_change/sipp/ssrc2.pcap</span><br><span>new file mode 100644</span><br><span>index 0000000..b248f20</span><br><span>--- /dev/null</span><br><span>+++ b/tests/channels/pjsip/non_negotiated_frame_SSRC_change/sipp/ssrc2.pcap</span><br><span>Binary files differ</span><br><span>diff --git a/tests/channels/pjsip/non_negotiated_frame_SSRC_change/sipp/uac_g719_g711.xml b/tests/channels/pjsip/non_negotiated_frame_SSRC_change/sipp/uac_g719_g711.xml</span><br><span>new file mode 100644</span><br><span>index 0000000..b819563</span><br><span>--- /dev/null</span><br><span>+++ b/tests/channels/pjsip/non_negotiated_frame_SSRC_change/sipp/uac_g719_g711.xml</span><br><span>@@ -0,0 +1,150 @@</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 "bansallaptop.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 default 'uac' scenario. --></span><br><span style="color: hsl(120, 100%, 40%);">+<!-- --></span><br><span style="color: hsl(120, 100%, 40%);">+<scenario name="Basic Sipstone UAC"></span><br><span style="color: hsl(120, 100%, 40%);">+ <!-- In client mode (bansallaptop placing calls), the Call-ID MUST be --></span><br><span style="color: hsl(120, 100%, 40%);">+ <!-- generated by bansallaptop. 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]@[remote_ip] 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: <sip:bansallaptop@[local_ip]:[local_port]>;tag=[call_number]</span><br><span style="color: hsl(120, 100%, 40%);">+ To: bansalphone <sip:[service]@[remote_ip]></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:bansallaptop@[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=bansallaptop 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 IP4 127.0.0.1</span><br><span style="color: hsl(120, 100%, 40%);">+ t=0 0</span><br><span style="color: hsl(120, 100%, 40%);">+ m=audio [media_port] RTP/AVP 116 107 8 111 110 13</span><br><span style="color: hsl(120, 100%, 40%);">+ a=sendrecv</span><br><span style="color: hsl(120, 100%, 40%);">+ a=ptime:20</span><br><span style="color: hsl(120, 100%, 40%);">+ a=rtpmap:116 AMR-WB/16000/1</span><br><span style="color: hsl(120, 100%, 40%);">+ a=fmtp:116 mode-change-capability=2</span><br><span style="color: hsl(120, 100%, 40%);">+ a=rtpmap:107 AMR-WB/16000/1</span><br><span style="color: hsl(120, 100%, 40%);">+ a=fmtp:107 octet-align=1; mode-change-capability=2</span><br><span style="color: hsl(120, 100%, 40%);">+ a=rtpmap:8 PCMA/8000</span><br><span style="color: hsl(120, 100%, 40%);">+ a=rtpmap:111 telephone-event/16000</span><br><span style="color: hsl(120, 100%, 40%);">+ a=rtpmap:110 telephone-event/8000</span><br><span style="color: hsl(120, 100%, 40%);">+ a=rtpmap:13 CN/8000</span><br><span style="color: hsl(120, 100%, 40%);">+ a=fmtp:111 0-15</span><br><span style="color: hsl(120, 100%, 40%);">+ a=fmtp:111 0-15</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%);">+</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" rrs="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%);">+</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 [next_url] 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: bansallaptop <sip:bansallaptop@[local_ip]:[local_port]>;tag=[call_number]</span><br><span style="color: hsl(120, 100%, 40%);">+ To: bansalphone <sip:[service]@[remote_ip]:[remote_port]>[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:bansallaptop@[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%);">+ [routes]</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="40"/></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ <nop></span><br><span style="color: hsl(120, 100%, 40%);">+ <action></span><br><span style="color: hsl(120, 100%, 40%);">+ <exec play_pcap_audio="tests/channels/pjsip/non_negotiated_frame_SSRC_change/sipp/ssrc1.pcap"/></span><br><span style="color: hsl(120, 100%, 40%);">+ </action></span><br><span style="color: hsl(120, 100%, 40%);">+ </nop></span><br><span style="color: hsl(120, 100%, 40%);">+ <pause milliseconds="40"/></span><br><span style="color: hsl(120, 100%, 40%);">+ <nop></span><br><span style="color: hsl(120, 100%, 40%);">+ <action></span><br><span style="color: hsl(120, 100%, 40%);">+ <exec play_pcap_audio="tests/channels/pjsip/non_negotiated_frame_SSRC_change/sipp/ssrc2.pcap"/></span><br><span style="color: hsl(120, 100%, 40%);">+ </action></span><br><span style="color: hsl(120, 100%, 40%);">+ </nop></span><br><span style="color: hsl(120, 100%, 40%);">+ <pause milliseconds="40"/></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ <nop></span><br><span style="color: hsl(120, 100%, 40%);">+ <action></span><br><span style="color: hsl(120, 100%, 40%);">+ <exec play_pcap_audio="tests/channels/pjsip/non_negotiated_frame_SSRC_change/sipp/A_party_g711a.pcap"/></span><br><span style="color: hsl(120, 100%, 40%);">+ </action></span><br><span style="color: hsl(120, 100%, 40%);">+ </nop></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ <pause milliseconds="3000"/></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ <!-- This delay can be customized by the -d command-line option --></span><br><span style="color: hsl(120, 100%, 40%);">+ <!-- or by adding a 'milliseconds = "value"' option here. --></span><br><span style="color: hsl(120, 100%, 40%);">+ <pause/></span><br><span style="color: hsl(120, 100%, 40%);">+</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 [next_url] 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: bansallaptop <sip:bansallaptop@[local_ip]:[local_port]>;tag=[call_number]</span><br><span style="color: hsl(120, 100%, 40%);">+ To: bansalphone <sip:[service]@[remote_ip]:[remote_port]>[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:bansallaptop@[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%);">+ [routes]</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%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ <!-- definition of the response time repartition table (unit is ms) --></span><br><span style="color: hsl(120, 100%, 40%);">+ <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ <!-- definition of the call length repartition table (unit is ms) --></span><br><span style="color: hsl(120, 100%, 40%);">+ <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</scenario></span><br><span>diff --git a/tests/channels/pjsip/non_negotiated_frame_SSRC_change/sipp/uas_asterisk.xml b/tests/channels/pjsip/non_negotiated_frame_SSRC_change/sipp/uas_asterisk.xml</span><br><span>new file mode 100644</span><br><span>index 0000000..657bcbb</span><br><span>--- /dev/null</span><br><span>+++ b/tests/channels/pjsip/non_negotiated_frame_SSRC_change/sipp/uas_asterisk.xml</span><br><span>@@ -0,0 +1,95 @@</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%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+<scenario name="Re-Invite problem 1"></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+<recv request="INVITE" crlf="true" rrs="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%);">+</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%);">+<![CDATA[</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+SIP/2.0 100 Trying</span><br><span style="color: hsl(120, 100%, 40%);">+[last_Via:]</span><br><span style="color: hsl(120, 100%, 40%);">+[last_Call-ID:]</span><br><span style="color: hsl(120, 100%, 40%);">+[last_From:]</span><br><span style="color: hsl(120, 100%, 40%);">+[last_To:]</span><br><span style="color: hsl(120, 100%, 40%);">+[last_CSeq:]</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%);">+<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%);">+SIP/2.0 200 OK</span><br><span style="color: hsl(120, 100%, 40%);">+[last_Via:]</span><br><span style="color: hsl(120, 100%, 40%);">+[last_Call-ID:]</span><br><span style="color: hsl(120, 100%, 40%);">+[last_From:]</span><br><span style="color: hsl(120, 100%, 40%);">+[last_To:];tag=[call_number]</span><br><span style="color: hsl(120, 100%, 40%);">+[last_CSeq:]</span><br><span style="color: hsl(120, 100%, 40%);">+[last_Record-Route]</span><br><span style="color: hsl(120, 100%, 40%);">+Contact: <sip:bansallaptop@[local_ip]:[local_port];user=phone></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=HuaweiSoftX3000 6644052 6644052 IN IP[local_ip_type] [local_ip]</span><br><span style="color: hsl(120, 100%, 40%);">+s=Sip Call</span><br><span style="color: hsl(120, 100%, 40%);">+c=IN IP4 127.0.0.1</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 8 103</span><br><span style="color: hsl(120, 100%, 40%);">+a=rtpmap:8 PCMA/8000</span><br><span style="color: hsl(120, 100%, 40%);">+a=rtpmap:103 telephone-event/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%);">+</send></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+<recv request="ACK"</span><br><span style="color: hsl(120, 100%, 40%);">+ rtd="true"</span><br><span style="color: hsl(120, 100%, 40%);">+ 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%);">+<pause milliseconds="40"/></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ <nop></span><br><span style="color: hsl(120, 100%, 40%);">+ <action></span><br><span style="color: hsl(120, 100%, 40%);">+ <exec play_pcap_audio="tests/channels/pjsip/non_negotiated_frame_SSRC_change/sipp/g711a.pcap"/></span><br><span style="color: hsl(120, 100%, 40%);">+ </action></span><br><span style="color: hsl(120, 100%, 40%);">+ </nop></span><br><span style="color: hsl(120, 100%, 40%);">+ <recv request="BYE"></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%);">+ <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%);">+ SIP/2.0 200 OK</span><br><span style="color: hsl(120, 100%, 40%);">+ [last_Via:]</span><br><span style="color: hsl(120, 100%, 40%);">+ [last_From:]</span><br><span style="color: hsl(120, 100%, 40%);">+ [last_To:]</span><br><span style="color: hsl(120, 100%, 40%);">+ [last_Call-ID:]</span><br><span style="color: hsl(120, 100%, 40%);">+ [last_CSeq:]</span><br><span style="color: hsl(120, 100%, 40%);">+ Contact: <sip:[local_ip]:[local_port];transport=[transport]></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%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+<!-- Keep the call open for a while in case the 200 is lost to be --></span><br><span style="color: hsl(120, 100%, 40%);">+<!-- able to retransmit it if we receive the BYE again. --></span><br><span style="color: hsl(120, 100%, 40%);">+<pause milliseconds="4000"/></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%);">+<!-- definition of the response time repartition table (unit is ms) --></span><br><span style="color: hsl(120, 100%, 40%);">+<ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+<!-- definition of the call length repartition table (unit is ms) --></span><br><span style="color: hsl(120, 100%, 40%);">+<CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/></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>diff --git a/tests/channels/pjsip/non_negotiated_frame_SSRC_change/test-config.yaml b/tests/channels/pjsip/non_negotiated_frame_SSRC_change/test-config.yaml</span><br><span>new file mode 100644</span><br><span>index 0000000..87892e4</span><br><span>--- /dev/null</span><br><span>+++ b/tests/channels/pjsip/non_negotiated_frame_SSRC_change/test-config.yaml</span><br><span>@@ -0,0 +1,21 @@</span><br><span style="color: hsl(120, 100%, 40%);">+testinfo:</span><br><span style="color: hsl(120, 100%, 40%);">+ summary: 'It prevents processing of a non negotiated rtp frame considering also when SSRC changes'</span><br><span style="color: hsl(120, 100%, 40%);">+ description: |</span><br><span style="color: hsl(120, 100%, 40%);">+ 'When there was a SSRC change, the frame would be marked as a control frame and it would be queued to be written and then leading to a disconnection (ast_channel_softhangup_internal_flag_add).'</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: True</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/tests.yaml b/tests/channels/pjsip/tests.yaml</span><br><span>index 4fa8f51..9b419ac 100644</span><br><span>--- a/tests/channels/pjsip/tests.yaml</span><br><span>+++ b/tests/channels/pjsip/tests.yaml</span><br><span>@@ -58,3 +58,4 @@</span><br><span> - test: 'multipart_empty_part'</span><br><span> - test: 'dtmf_info_fallback'</span><br><span> - test: 'invalid_uris'</span><br><span style="color: hsl(120, 100%, 40%);">+ - test: 'non_negotiated_frame_SSRC_change'</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/testsuite/+/13847">change 13847</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/c/testsuite/+/13847"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: testsuite </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: If3e760a7bb94c9bfc1ee24aff7f5fd7a3cbd33ed </div>
<div style="display:none"> Gerrit-Change-Number: 13847 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Paulo Vicentini <paulo.vicentini@gmail.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>