[OpenSIPS-Devel] disabling outbound TCP connection for nated UA

Bogdan-Andrei Iancu bogdan at voice-system.ro
Wed Feb 24 12:00:29 CET 2010


Ok, so let say we see (after usrloc lookup) that we have to use tcp 
(looking at RURI param) and also we can inspect the bflag for nat 
indication.

 From this point I see two options:
    - expose a TCP related function to be called from script to check if 
there is an opened connection to a certain destination (like RURI) -> if 
false, drop the call
    - invent a new flag to instruct the TCP layer not to open a new 
connection - probably a script flag, as the sip_msg struct  is not 
passed to the transport layer. In this case, the error will be reported 
by t_relay()...a bit ambiguous ..

Regards,
Bogdan

Emmanuel BUU wrote:
> Bogdan-Andrei Iancu a écrit :
>   
>> Hi Emmanuel,
>>
>> In theory this will be nice and correct, but practically speaking it is 
>> too difficult to do , as the SIP part needs to be aware of the transport 
>> layer and vice versa .
>>   
>>     
> This already the case as the contact that is stored in the USRLOC module 
> contains a transport indication (that is if the UA is using TCP)
>   
>> Like you need to "know" that a SIP URI points behind a NAT, store the 
>> info with the RURI and pass it to the transport level when it tries to 
>> send the message out.
>>   
>>     
> This can be done by scripting when the REGISTER message is processed and 
> one could use a registry flag to tag the contact as nated".
>   
>> The 2.0 design will solve this problem as the async model will not be 
>> affected by the blocking to a natted destination.
>>   
>>     
> Yes but it will issue TCP connection nevetheless, connections that are 
> bound to fail. Maybe we should see if there is a way to tell the TM module:
>
> "try to reuse a TCP connection to this UA and if no such connection is 
> available, report an error".
>   
>> Regards,
>> Bogdan
>>
>> Emmanuel BUU wrote:
>>   
>>     
>>> Hello,
>>>
>>> Is there a way in the TM module to prevent opensips to open an outbound 
>>> TCP connection in case the destination is nated?
>>>
>>> Emmanuel
>>>
>>> _______________________________________________
>>> Devel mailing list
>>> Devel at lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
>>>
>>>   
>>>     
>>>       
>>   
>>     
>
>
> _______________________________________________
> Devel mailing list
> Devel at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
>
>   


-- 
Bogdan-Andrei Iancu
www.voice-system.ro




More information about the Devel mailing list