[SR-Users] NATDETECT Flag 16
Henning Westerholt
hw at kamailio.org
Wed Mar 21 08:19:49 CET 2018
Am Mittwoch, 21. März 2018, 08:10:39 CET schrieb Henning Westerholt:
> Am Dienstag, 20. März 2018, 17:40:26 CET schrieb Duarte Rocha:
> > I have a doubt about the flag 16 used in nat_uac_test() belonging to the
> > module NATDETECT.
> >
> > In the documentation, the following is stated :
> >
> > *16* - Test if the source port is different from the port in the “Via”
> > header
> >
> > I have some situations that I receive a request from port 5060 and the Via
> > Header contains no port. I think it probably assumes that it is the
> > default
> > port.
> >
> > Will this situation trigger the "16" flag ?
>
> Hello,
>
> I haven't tested it for you. :-)
>
> But as I look to the code, it should then assume that its the default SIP
> port 5060.
>
> nat_uac_test -> received_via_test -> check_via_address:
> "if (port==0) port=SIP_PORT;"
This one for was for the complete address comparison, but for the port its the
same:
nathelper.c:
if((tests & NAT_UAC_TEST_RPORT) && (msg->rcv.src_port != (msg->via1->port ?
msg->via1->port : SIP_PORT)))
Best regards,
Henning
More information about the sr-users
mailing list