<p><a href="https://gerrit.asterisk.org/c/asterisk/+/15630">View Change</a></p><p>1 comment:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.asterisk.org/c/asterisk/+/15630/4/res/res_pjsip/pjsip_message_filter.c">File res/res_pjsip/pjsip_message_filter.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/15630/4/res/res_pjsip/pjsip_message_filter.c@242">Patch Set #4, Line 242:</a> <code style="font-family:monospace,monospace">     if ((tdata->tp_info.transport->key.type != PJSIP_TRANSPORT_UDP) &&</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">You're right, as far as I could observe, it does. I didn't know whether this was the desired behaviour or not, though.</p><p style="white-space: pre-wrap; word-wrap: break-word;">---</p><p style="white-space: pre-wrap; word-wrap: break-word;">I have a transport configured to bind to TCP 0.0.0.0:9060,<br>If I call a registered phone (the phone's SIP bindport is 5060), I can see that the TCP packet is targeted to the phone</p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Transmission Control Protocol, Src Port: 36611, Dst Port: 5060, Seq: 1, Ack: 1, Len: 1008<br>    Source Port: 36611<br>    Destination Port: 5060</pre></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">where 36611 is the ephemeral port.<br>This port is used in the SIP INVITE's Via and Contact headers:</p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Session Initiation Protocol (INVITE)<br>    Request-Line: INVITE sip:9099@10.193.10.120:5060;transport=tcp SIP/2.0<br>    Message Header<br>        Via: SIP/2.0/TCP 10.193.0.1:36611;rport;branch=z9hG4bKPj68a09b52-e117-4b95-a172-e65a55d5fb7b;alias<br>        From: "Station 9011" <sip:9011@192.168.248.80>;tag=a74efce4-3e08-4d6a-9d51-f79b67ea9fbe<br>            SIP Display info: "Station 9011"<br>            SIP from address: sip:9011@192.168.248.80<br>            SIP from tag: a74efce4-3e08-4d6a-9d51-f79b67ea9fbe<br>        To: <sip:9099@10.193.10.120><br>            SIP to address: sip:9099@10.193.10.120<br>        Contact: <sip:asterisk@10.193.0.1:36611;transport=TCP><br>            Contact URI: sip:asterisk@10.193.0.1:36611;transport=TCP<br>                Contact URI User Part: asterisk<br>                Contact URI Host Part: 10.193.0.1<br>                Contact URI Host Port: 36611<br>                Contact URI parameter: transport=TCP</pre></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">-----</p><p style="white-space: pre-wrap; word-wrap: break-word;">I've now checked the behaviour against that of UDP transports. Those have the transport's bindport in the Via and Contact headers.</p><p style="white-space: pre-wrap; word-wrap: break-word;">I therefore assume that those should contain the bindport. I will try to adapt my patch accordingly. Could you point me in the right direction how to do this? I would have tried to use the `local_name.port`, like it is done for UDP in line 257, but have not looked into it yet.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/15630">change 15630</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/asterisk/+/15630"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 16 </div>
<div style="display:none"> Gerrit-Change-Id: I598e60257a7f92b29efce1fb3e9a2fc06f1439b6 </div>
<div style="display:none"> Gerrit-Change-Number: 15630 </div>
<div style="display:none"> Gerrit-PatchSet: 4 </div>
<div style="display:none"> Gerrit-Owner: Florian Floimair <f.floimair@commend.com> </div>
<div style="display:none"> Gerrit-Reviewer: Bernd Zobl <b.zobl@commend.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Wed, 31 Mar 2021 12:32:34 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Comment-In-Reply-To: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>