[SR-Users] Confusion about TCP worker ports

Noah Mehl noahmehl at gmail.com
Thu Oct 29 21:48:31 CET 2020


Alex,

In the original example:

recv 1481 bytes from tcp/[1.1.1.1]:33940 at 16:56:47.920698:
   ------------------------------------------------------------------------
   INVITE sip:991012 at sip.domain.com SIP/2.0
   Record-Route: <sip:1.1.1.1;transport=tcp;r2=on;lr;nat=yes>
   Record-Route: <sip:1.1.1.1:5061;transport=tls;r2=on;lr;nat=yes>
   Via: SIP/2.0/TCP 1.1.1.1;branch=z9hG4bKd408.3f53e940ccb20c1033df4b3a8ebd8a34.0;i=1
   Via: SIP/2.0/TLS 172.22.199.110:55304;received=5.5.5.5;rport=39518;branch=z9hG4bKPj5Css6JomCt9Cli2cCINbXi4FbPM5wewG;alias
   Max-Forwards: 69
   From: "Noah Mehl" <sip:5135555555 at inbound-jail>;tag=s3i3y2tiOCgnUId5TD4Vp0UChf9GyEy9
   To: <sip:991012 at inbound-jail>
   Contact: <sip:74895612 at 172.22.199.110:54887;transport=tls;alias=5.5.5.5~39518~3>
   Call-ID: 5aoRBMBHahxqSLzrIpFnlfRz.UcGsmfq
   CSeq: 27271 INVITE
   Allow: SUBSCRIBE, NOTIFY, INVITE, ACK, BYE, CANCEL, UPDATE, MESSAGE, REFER
   Supported: replaces, norefersub, gruu
   User-Agent: Blink Pro 4.6.0 (MacOSX)
   Content-Type: application/sdp
   Content-Length:   528

The top Via header is not identifying port 33940 which is where the request is coming from. Or the expectation is that the receiving side will send replies to port 5060 (which I guess is broken in Freeswitch sometimes?)

I guess I would like to update that existing Via header with the source port (since it’s not 5060)?

~Noah

> On Oct 29, 2020, at 4:45 PM, Alex Balashov <abalashov at evaristesys.com> wrote:
> 
> There's not really a reasonable way for you to add your own Via header to this outgoing request. If Kamailio is doing something wrong or inconsistent in this context, it should be fixed there.
> 
> On 10/29/20 4:42 PM, Noah Mehl wrote:
>> Alex,
>> No dice.
>> So now my question is what is the correct way to fix the Via?
>> If this is the original:
>> Via: SIP/2.0/TCP 1.1.1.1;branch=z9hG4bKd408.3f53e940ccb20c1033df4b3a8ebd8a34.0;i=1
>> Then do I update the port like this:
>> Via: SIP/2.0/TCP 1.1.1.1:33940;branch=z9hG4bKd408.3f53e940ccb20c1033df4b3a8ebd8a34.0;i=1
>> Or should I use an rport tag:
>> Via: SIP/2.0/TCP 1.1.1.1;branch=z9hG4bKd408.3f53e940ccb20c1033df4b3a8ebd8a34.0;i=1;rport=33940
>> Thanks!
>> ~Noah
>>> On Oct 29, 2020, at 4:12 PM, Alex Balashov <abalashov at evaristesys.com> wrote:
>>> 
>>> Noah,
>>> 
>>> It is also possible that this core config parameter will in and of itself cure your problem:
>>> 
>>> https://www.kamailio.org/wiki/cookbooks/5.4.x/core#tcp_reuse_port
>>> 
>>> Not sure whether it helps only in tandem with the previous UAC default_socket modparam suggestion, or is sufficient in and of itself.
>>> 
>>> -- Alex
>>> 
>>> -- 
>>> Alex Balashov | Principal | Evariste Systems LLC
>>> 
>>> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
>>> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>>> 
>>> _______________________________________________
>>> Kamailio (SER) - Users Mailing List
>>> sr-users at lists.kamailio.org
>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>> _______________________________________________
>> Kamailio (SER) - Users Mailing List
>> sr-users at lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> 
> -- 
> Alex Balashov | Principal | Evariste Systems LLC
> 
> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
> 
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users




More information about the sr-users mailing list