[OpenSIPS-Devel] [RFC] NAT pinging

Bogdan-Andrei Iancu bogdan at voice-system.ro
Mon Dec 15 11:56:36 CET 2008


Hi Maxim,

Maxim Sobolev wrote:
> Bogdan-Andrei Iancu wrote:
>> A) contact info versus network info
>>
>> When considering a REGISTER request, you have two sets of 
>> information: I - registered contact ; II - network info (source 
>> IP/port, proto, local socket where the request was received on).
>> When comes to determine the destination for pinging, right now, the 
>> logic uses the network info (as more or less NAT at network level).
>> But, according to RFC 3261, the REGISTER request may carry whatever 
>> contact, like a REGISTER via UDP may register a contact for TCP (or 
>> vice-versa). In case of NAT, this will not work at all (as we assume 
>> that the source of REGISTER and registered contact point to the same 
>> network location).
>>
>> So, the question is:  if NAT detected and such a protocol mismatch is 
>> detected, should a registrar refuse the registration (as it will be 
>> anyhow unusable) ?
>
> From practical prospective I don't think that rejecting will be good 
> default behavior in such situation. If REGISTER arrives by UDP, while 
> contact has TCP it's likely that we are dealing with somehow 
> misconfigured UA that supports both protocols, therefore trying to 
> contact it by UDP will most likely work just fine. Hence, "fix" 
> contact to use UDP in addition to the usual IP:port fixup and save it.
yes, this is true and it might correct in most of the cases. So, more or 
less, the network info will have higher relevance than the contact info. 
In this case we need to do some changes in the nathelper module as it is 
looking into contact URI to learn the proto (when pinging) :).

Regards,
Bogdan



More information about the Devel mailing list