[OpenSIPS-Users] IP check in FixContact (nat_traversal.c)

Bogdan-Andrei Iancu bogdan at voice-system.ro
Wed Feb 25 20:20:59 CET 2009


Hi Iñaki,

Thanks a lot for the clarification - I will keep in mind this.

So most important implication of this is to remember and not to use the 
via versus received port test (as NAT test) for the TCP proto...

Thanks and regards,
Bogdan

Iñaki Baz Castillo wrote:
> 2009/2/25 Bogdan-Andrei Iancu <bogdan at voice-system.ro>:
>   
>> Hi Iñaki,
>>
>> to be honest, I'm note 100% sure about this. If you consider that the reply
>> has to be routed back via the same TCP connection, what you have in VIA is
>> the origin of the TCP conn (used by client to open the connection) and not
>> the listening info (for receiving new connections).
>>     
>
> Bogdan, AFAIK what you say is not correct. I show you an example of a
> TCP request sent by Twinkle:
>
>   T  10.10.10.120:33947 -> 10.10.10.121:5070 [AP]
>   INVITE sip:1234 at mydomain.org SIP/2.0
>   Via: SIP/2.0/TCP 10.10.10.120:5060;rport;branch=z9hG4bKsbnnahng
>
> As you see, the Via sent-by is the *listening* address of Twinkle.
>
> RFC 3261 states more or less clearly that, in case of a TCP
> connection, the response is sent using the existing TCP connection.
> But the Via remains being the listening address.
> In case the response cannot arrive due to a TCP error, the UAS should
> open a *new* connection against the Via sent-by address (in the above
> example it would be "10.10.10.120:5060", this is, the address in which
> the UAC is listening).
>
> I'm 101% sure of it :)
>
>
>
>   
>> In such a case, the port should match...but again, I'm not 100% what you
>> should put in VIA when doing TCP - the desctiption of the TCP connection or
>> the description of the listening interface.
>>     
>
> The listening interface, sure :)
>
>
>
>   




More information about the Users mailing list