<p>Benjamin Keith Ford has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/testsuite/+/15586">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">AST-2021-006: Check for zero port in m=image line.<br><br>If Asterisk received a T.38 re-invite with an image line with a zero<br>port, a crash would occur. This test checks that both parties are hung<br>up upon receiving the re-invite.<br><br>Change-Id: I6f52cc5f40723198b208874ba8bf2a92cc3d2106<br>---<br>A tests/fax/pjsip/t38_zero_port/configs/ast1/extensions.conf<br>A tests/fax/pjsip/t38_zero_port/configs/ast1/pjsip.conf<br>A tests/fax/pjsip/t38_zero_port/sipp/endpoint_A.xml<br>A tests/fax/pjsip/t38_zero_port/sipp/endpoint_B.xml<br>A tests/fax/pjsip/t38_zero_port/test-config.yaml<br>M tests/fax/pjsip/tests.yaml<br>6 files changed, 310 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/86/15586/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/tests/fax/pjsip/t38_zero_port/configs/ast1/extensions.conf b/tests/fax/pjsip/t38_zero_port/configs/ast1/extensions.conf</span><br><span>new file mode 100644</span><br><span>index 0000000..9ccf33d</span><br><span>--- /dev/null</span><br><span>+++ b/tests/fax/pjsip/t38_zero_port/configs/ast1/extensions.conf</span><br><span>@@ -0,0 +1,6 @@</span><br><span style="color: hsl(120, 100%, 40%);">+[general]</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 => basicdial,1,NoOp()</span><br><span style="color: hsl(120, 100%, 40%);">+same => n,Dial(PJSIP/endpoint_B/sip:127.0.0.3)</span><br><span style="color: hsl(120, 100%, 40%);">+same => n,Hangup()</span><br><span>diff --git a/tests/fax/pjsip/t38_zero_port/configs/ast1/pjsip.conf b/tests/fax/pjsip/t38_zero_port/configs/ast1/pjsip.conf</span><br><span>new file mode 100644</span><br><span>index 0000000..bc95b50</span><br><span>--- /dev/null</span><br><span>+++ b/tests/fax/pjsip/t38_zero_port/configs/ast1/pjsip.conf</span><br><span>@@ -0,0 +1,26 @@</span><br><span style="color: hsl(120, 100%, 40%);">+[local-transport]</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=127.0.0.1</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+[endpoint-template](!)</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=!all,ulaw</span><br><span style="color: hsl(120, 100%, 40%);">+t38_udptl=yes</span><br><span style="color: hsl(120, 100%, 40%);">+direct_media=no</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+[endpoint_A](endpoint-template)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+[endpoint_B](endpoint-template)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+[identify-template](!)</span><br><span style="color: hsl(120, 100%, 40%);">+type=identify</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+[endpoint_A](identify-template)</span><br><span style="color: hsl(120, 100%, 40%);">+endpoint=endpoint_A</span><br><span style="color: hsl(120, 100%, 40%);">+match=127.0.0.2</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+[endpoint_B](identify-template)</span><br><span style="color: hsl(120, 100%, 40%);">+endpoint=endpoint_B</span><br><span style="color: hsl(120, 100%, 40%);">+match=127.0.0.3</span><br><span>diff --git a/tests/fax/pjsip/t38_zero_port/sipp/endpoint_A.xml b/tests/fax/pjsip/t38_zero_port/sipp/endpoint_A.xml</span><br><span>new file mode 100644</span><br><span>index 0000000..6eb4854</span><br><span>--- /dev/null</span><br><span>+++ b/tests/fax/pjsip/t38_zero_port/sipp/endpoint_A.xml</span><br><span>@@ -0,0 +1,122 @@</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="Phone A calls B to receive a T.38 UDPTL stream."></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ <!-- Initial invite - Call phone B --></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%);">+ INVITE sip:basicdial@[remote_ip]:[remote_port] 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: endpoint_A <sip:endpoint_A@[local_ip]:[local_port]>;tag=[call_number]</span><br><span style="color: hsl(120, 100%, 40%);">+ To: <sip:basicdial@[remote_ip]:[remote_port];user=phone></span><br><span style="color: hsl(120, 100%, 40%);">+ CSeq: 1 INVITE</span><br><span style="color: hsl(120, 100%, 40%);">+ Call-ID: [call_id]</span><br><span style="color: hsl(120, 100%, 40%);">+ Contact: <sip:endpoint_A@[local_ip]:[local_port]></span><br><span style="color: hsl(120, 100%, 40%);">+ Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE, NOTIFY, PRACK, UPDATE, REFER</span><br><span style="color: hsl(120, 100%, 40%);">+ User-Agent: PolycomSoundPointIP-SPIP_430-UA/3.2.3.1734</span><br><span style="color: hsl(120, 100%, 40%);">+ Accept-Language: en</span><br><span style="color: hsl(120, 100%, 40%);">+ Allow-Events: talk,hold,conference</span><br><span style="color: hsl(120, 100%, 40%);">+ Max-Forwards: 70</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=- 1324901698 1324901698 IN IP4 [local_ip]</span><br><span style="color: hsl(120, 100%, 40%);">+ s=Polycom IP Phone</span><br><span style="color: hsl(120, 100%, 40%);">+ c=IN IP4 [local_ip]</span><br><span style="color: hsl(120, 100%, 40%);">+ t=0 0</span><br><span style="color: hsl(120, 100%, 40%);">+ a=sendrecv</span><br><span style="color: hsl(120, 100%, 40%);">+ m=audio 2226 RTP/AVP 0 101</span><br><span style="color: hsl(120, 100%, 40%);">+ a=sendrecv</span><br><span style="color: hsl(120, 100%, 40%);">+ a=rtpmap:0 PCMU/8000</span><br><span style="color: hsl(120, 100%, 40%);">+ a=rtpmap:101 telephone-event/8000</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%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ <recv response="180" optional="true" /></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ <recv response="183" optional="true" /></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ <recv response="200" /></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%);">+ ACK sip:endpoint_B@[remote_ip]:[remote_port] 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: endpoint_A <sip:endpoint_A@[remote_ip]>;tag=[call_number]</span><br><span style="color: hsl(120, 100%, 40%);">+ To: <sip:endpoint_B@[remote_ip];user=phone>[peer_tag_param]</span><br><span style="color: hsl(120, 100%, 40%);">+ CSeq: 1 ACK</span><br><span style="color: hsl(120, 100%, 40%);">+ Call-ID: [call_id]</span><br><span style="color: hsl(120, 100%, 40%);">+ Contact: <sip:endpoint_A@[local_ip]:[local_port]></span><br><span style="color: hsl(120, 100%, 40%);">+ Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE, NOTIFY, PRACK, UPDATE, REFER</span><br><span style="color: hsl(120, 100%, 40%);">+ User-Agent: PolycomSoundPointIP-SPIP_430-UA/3.2.3.1734</span><br><span style="color: hsl(120, 100%, 40%);">+ Accept-Language: en</span><br><span style="color: hsl(120, 100%, 40%);">+ Max-Forwards: 70</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%);">+ </send></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ <!-- Reinvite received for T38 - media flows between Enpoint A and Asterisk --></span><br><span style="color: hsl(120, 100%, 40%);">+ <recv request="INVITE" /></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%);">+ 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:];tag=[call_number]</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:endpoint_A@[local_ip]:[local_port];transport=[transport]></span><br><span style="color: hsl(120, 100%, 40%);">+ Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE, NOTIFY, PRACK, UPDATE, REFER</span><br><span style="color: hsl(120, 100%, 40%);">+ Supported: 100rel,replaces</span><br><span style="color: hsl(120, 100%, 40%);">+ User-Agent: PolycomSoundPointIP-SPIP_430-UA/3.2.3.1734</span><br><span style="color: hsl(120, 100%, 40%);">+ Accept-Language: en</span><br><span style="color: hsl(120, 100%, 40%);">+ Testsuite-Track-Phone-A: 2</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=- 1324901698 1324901700 IN IP4 [local_ip]</span><br><span style="color: hsl(120, 100%, 40%);">+ s=Polycom IP Phone</span><br><span style="color: hsl(120, 100%, 40%);">+ c=IN IP4 [local_ip]</span><br><span style="color: hsl(120, 100%, 40%);">+ t=0 0</span><br><span style="color: hsl(120, 100%, 40%);">+ m=image 0 udptl t38</span><br><span style="color: hsl(120, 100%, 40%);">+ a=sendrecv</span><br><span style="color: hsl(120, 100%, 40%);">+ a=T38FaxVersion:0</span><br><span style="color: hsl(120, 100%, 40%);">+ a=T38MaxBitRate:9600</span><br><span style="color: hsl(120, 100%, 40%);">+ a=T38FaxMaxBuffer:1024</span><br><span style="color: hsl(120, 100%, 40%);">+ a=T38FaxMaxDatagram:400</span><br><span style="color: hsl(120, 100%, 40%);">+ a=T38FaxRateManagement:transferredTCF</span><br><span style="color: hsl(120, 100%, 40%);">+ a=T38FaxUdpEC:t38UDPRedundancy</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%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ <!-- Receive a BYE since we sent an image line with a zero port --></span><br><span style="color: hsl(120, 100%, 40%);">+ <recv request="BYE"/></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%);">+ 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:];tag=[call_number]</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:endpoint_A@[local_ip]:[local_port];transport=[transport]></span><br><span style="color: hsl(120, 100%, 40%);">+ Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE, NOTIFY, PRACK, UPDATE, REFER</span><br><span style="color: hsl(120, 100%, 40%);">+ Supported: 100rel,replaces</span><br><span style="color: hsl(120, 100%, 40%);">+ User-Agent: PolycomSoundPointIP-SPIP_430-UA/3.2.3.1734</span><br><span style="color: hsl(120, 100%, 40%);">+ Accept-Language: en</span><br><span style="color: hsl(120, 100%, 40%);">+ Testsuite-Track-Phone-A: 5</span><br><span style="color: hsl(120, 100%, 40%);">+ Content-Type: application/sdp</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%);">+ </send></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/fax/pjsip/t38_zero_port/sipp/endpoint_B.xml b/tests/fax/pjsip/t38_zero_port/sipp/endpoint_B.xml</span><br><span>new file mode 100644</span><br><span>index 0000000..6b415e3</span><br><span>--- /dev/null</span><br><span>+++ b/tests/fax/pjsip/t38_zero_port/sipp/endpoint_B.xml</span><br><span>@@ -0,0 +1,123 @@</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="Phone B Answers and reINVITEs to send T.38 malicious UDPTL pcap stream."></span><br><span style="color: hsl(120, 100%, 40%);">+ <Global variables="remote_tag"/></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ <recv request="INVITE" crlf="true"></span><br><span style="color: hsl(120, 100%, 40%);">+ <action></span><br><span style="color: hsl(120, 100%, 40%);">+ <ereg regexp=".*(;tag=.*)"</span><br><span style="color: hsl(120, 100%, 40%);">+ header="From:"</span><br><span style="color: hsl(120, 100%, 40%);">+ search_in="hdr"</span><br><span style="color: hsl(120, 100%, 40%);">+ check_it="true"</span><br><span style="color: hsl(120, 100%, 40%);">+ assign_to="remote_tag"/></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%);">+</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%);">+ 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_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_Call-ID:]</span><br><span style="color: hsl(120, 100%, 40%);">+ [last_CSeq:]</span><br><span style="color: hsl(120, 100%, 40%);">+ Contact: <sip:endpoint_B@[local_ip]:[local_port];transport=[transport]></span><br><span style="color: hsl(120, 100%, 40%);">+ User-Agent: PolycomSoundPointIP-SPIP_430-UA/3.2.3.1734</span><br><span style="color: hsl(120, 100%, 40%);">+ Accept-Language: en</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%);">+ </send></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%);">+ SIP/2.0 180 Ringing</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:];tag=[call_number]</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:endpoint_B@[local_ip]:[local_port];transport=[transport]></span><br><span style="color: hsl(120, 100%, 40%);">+ User-Agent: PolycomSoundPointIP-SPIP_430-UA/3.2.3.1734</span><br><span style="color: hsl(120, 100%, 40%);">+ Allow-Events: talk,hold,conference</span><br><span style="color: hsl(120, 100%, 40%);">+ Accept-Language: en</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%);">+ </send></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ <pause milliseconds="200"/></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%);">+ 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:endpoint_B@[local_ip]:[local_port];transport=[transport]></span><br><span style="color: hsl(120, 100%, 40%);">+ Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE, NOTIFY, PRACK, UPDATE, REFER</span><br><span style="color: hsl(120, 100%, 40%);">+ Supported: 100rel,replaces</span><br><span style="color: hsl(120, 100%, 40%);">+ User-Agent: PolycomSoundPointIP-SPIP_430-UA/3.2.3.1734</span><br><span style="color: hsl(120, 100%, 40%);">+ Accept-Language: en</span><br><span style="color: hsl(120, 100%, 40%);">+ Testsuite-Track-Phone-B-Media-Restrict: 1</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=- 1324901698 1324901698 IN IP4 [local_ip]</span><br><span style="color: hsl(120, 100%, 40%);">+ s=Polycom IP Phone</span><br><span style="color: hsl(120, 100%, 40%);">+ c=IN IP4 [local_ip]</span><br><span style="color: hsl(120, 100%, 40%);">+ t=0 0</span><br><span style="color: hsl(120, 100%, 40%);">+ a=sendrecv</span><br><span style="color: hsl(120, 100%, 40%);">+ m=audio 2226 RTP/AVP 0 101</span><br><span style="color: hsl(120, 100%, 40%);">+ a=sendrecv</span><br><span style="color: hsl(120, 100%, 40%);">+ a=rtpmap:0 PCMU/8000</span><br><span style="color: hsl(120, 100%, 40%);">+ a=rtpmap:101 telephone-event/8000</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 ACK --></span><br><span style="color: hsl(120, 100%, 40%);">+ <recv request="ACK"/></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ <!-- Wait some period of time --></span><br><span style="color: hsl(120, 100%, 40%);">+ <pause milliseconds="1500"/></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ <!-- Reinvite to set up T38 Fax session --></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%);">+ INVITE sip:endpoint_B@[remote_ip]:[remote_port] 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:127.0.0.3></span><br><span style="color: hsl(120, 100%, 40%);">+ To: [$remote_tag]</span><br><span style="color: hsl(120, 100%, 40%);">+ CSeq: [cseq] INVITE</span><br><span style="color: hsl(120, 100%, 40%);">+ [last_Call-ID:]</span><br><span style="color: hsl(120, 100%, 40%);">+ Contact: <sip:endpoint_B@[local_ip]:[local_port]></span><br><span style="color: hsl(120, 100%, 40%);">+ Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE, NOTIFY, PRACK, UPDATE, REFER</span><br><span style="color: hsl(120, 100%, 40%);">+ User-Agent: PolycomSoundPointIP-SPIP_430-UA/3.2.3.1734</span><br><span style="color: hsl(120, 100%, 40%);">+ Accept-Language: en</span><br><span style="color: hsl(120, 100%, 40%);">+ Supported: 100rel,replaces</span><br><span style="color: hsl(120, 100%, 40%);">+ Allow-Events: talk,hold,conference</span><br><span style="color: hsl(120, 100%, 40%);">+ Max-Forwards: 70</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=- 1324901698 1324901700 IN IP4 [local_ip]</span><br><span style="color: hsl(120, 100%, 40%);">+ s=Polycom IP Phone</span><br><span style="color: hsl(120, 100%, 40%);">+ c=IN IP4 [local_ip]</span><br><span style="color: hsl(120, 100%, 40%);">+ t=0 0</span><br><span style="color: hsl(120, 100%, 40%);">+ m=image 30002 udptl t38</span><br><span style="color: hsl(120, 100%, 40%);">+ a=sendrecv</span><br><span style="color: hsl(120, 100%, 40%);">+ a=T38FaxVersion:0</span><br><span style="color: hsl(120, 100%, 40%);">+ a=T38MaxBitRate:9600</span><br><span style="color: hsl(120, 100%, 40%);">+ a=T38FaxMaxBuffer:1024</span><br><span style="color: hsl(120, 100%, 40%);">+ a=T38FaxMaxDatagram:400</span><br><span style="color: hsl(120, 100%, 40%);">+ a=T38FaxRateManagement:transferredTCF</span><br><span style="color: hsl(120, 100%, 40%);">+ a=T38FaxUdpEC:t38UDPRedundancy</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="BYE"/></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/fax/pjsip/t38_zero_port/test-config.yaml b/tests/fax/pjsip/t38_zero_port/test-config.yaml</span><br><span>new file mode 100644</span><br><span>index 0000000..e3aba1a</span><br><span>--- /dev/null</span><br><span>+++ b/tests/fax/pjsip/t38_zero_port/test-config.yaml</span><br><span>@@ -0,0 +1,30 @@</span><br><span style="color: hsl(120, 100%, 40%);">+testinfo:</span><br><span style="color: hsl(120, 100%, 40%);">+ summary: 'Test for receiving fax with zero port in image line'</span><br><span style="color: hsl(120, 100%, 40%);">+ description: |</span><br><span style="color: hsl(120, 100%, 40%);">+ 'Test to make sure that Asterisk does not crash when receiving</span><br><span style="color: hsl(120, 100%, 40%);">+ a T.38 INVITE with an image line and a zero port.'</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%);">+ add-test-to-search-path: 'True'</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%);">+ 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': 'endpoint_A.xml', '-i': '127.0.0.2', '-p': '5060'} }</span><br><span style="color: hsl(120, 100%, 40%);">+ - { 'key-args': {'scenario': 'endpoint_B.xml', '-i': '127.0.0.3', '-p': '5060'} }</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.5'</span><br><span style="color: hsl(120, 100%, 40%);">+ - asterisk : 'app_dial'</span><br><span style="color: hsl(120, 100%, 40%);">+ - asterisk : 'chan_pjsip'</span><br><span style="color: hsl(120, 100%, 40%);">+ - asterisk : 'res_pjsip_t38'</span><br><span style="color: hsl(120, 100%, 40%);">+ tags:</span><br><span style="color: hsl(120, 100%, 40%);">+ - pjsip</span><br><span style="color: hsl(120, 100%, 40%);">+ - fax</span><br><span>diff --git a/tests/fax/pjsip/tests.yaml b/tests/fax/pjsip/tests.yaml</span><br><span>index dd55995..639fc85 100644</span><br><span>--- a/tests/fax/pjsip/tests.yaml</span><br><span>+++ b/tests/fax/pjsip/tests.yaml</span><br><span>@@ -12,3 +12,6 @@</span><br><span> - test: 't38_fast_reject'</span><br><span> - test: 't38_with_auth'</span><br><span> - test: 't38_initial_offer'</span><br><span style="color: hsl(120, 100%, 40%);">+ - test: 't38_enabled_two_reinvite_on_a_leg'</span><br><span style="color: hsl(120, 100%, 40%);">+ - test: 't38_enabled_two_reinvite_on_b_leg'</span><br><span style="color: hsl(120, 100%, 40%);">+ - test: 't38_zero_port'</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/testsuite/+/15586">change 15586</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/+/15586"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: testsuite </div>
<div style="display:none"> Gerrit-Branch: 17 </div>
<div style="display:none"> Gerrit-Change-Id: I6f52cc5f40723198b208874ba8bf2a92cc3d2106 </div>
<div style="display:none"> Gerrit-Change-Number: 15586 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Benjamin Keith Ford <bford@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>