[Users] OpenSER and transport selection (SRV and NAPTR)

Klaus Darilion klaus.mailinglists at pernau.at
Thu Dec 15 12:41:26 CET 2005


Joachim Fabini wrote:
> Hi,
> 
> Initially I intended to submit a feature request for
> OpenSER functionality similar to t_relay_to_udp, 
> t_relay_to_tcp but WITHOUT the need to specify the 
> destination IP address and port.
> My reasoning was to let the new functions do exactly 
> what t_relay() does but in addition force the DNS SRV 
> query for a specific transport (udp, tcp, or tls). 
> 

Hi Joachim!

Maybe you can get a workaround using add_uri_param:
http://openser.org/docs/modules/1.0.x/uri.html#AEN118

add_uri_param("transport=tcp");

The t_relay should use TCP. A problem might be if there is already a 
transport parameter.

I guess you can avoid this by do not changing the request URI but the 
destination URI (overrides the request URI). E.g. an example from Bogdan:

        avp_write("sip:openser.org;transport=tls","i:11");
        avp_pushto("$duri","i:11");

Probably you have to use regexp to copy the existing RURI into an AVP, 
strip the existing transport parameter, add the new one, and write it 
into the DURI.

regards
klaus


> Seeing the roadmap for 1.1 I realized that NAPTR solves 
> part of this problem. Is there already any estimation 
> when NAPTR implementation will be available in OpenSER?
> 
> I intentionally said "part of the problem" because 
> NAPTR delegates the decision on the transport to the
> destination DNS. But: our own proxy might also be
> required to control the selected transport.
> It seems to me quite flexible to implement a 
> proxy-hosted NAPTR emulation and specify the list 
> of requested protocols, e.g. 
> t_relay_to_transport("tls","tcp",0) 
> specifies that t_relay should firstly generate a 
> SRV DNS query for _sips._tcp.mydomain.org, if this 
> fails to query for _sip._tcp.mydomain.org and then 
> give up - if I don't want UDP. 
> 
> This saves one DNS query (NAPTR) and enables a proxy
> to control what protocols it uses for contacting the 
> next hop.
> 
> Finally, I believe that the interface to t_relay_naptr() 
> (or whatever the naptr relaying will be called) should 
> support selection of desired protocols, e.g.
> t_relay_to_naptr("tls", "tcp", "udp") where entries
> can be left empty to indicate that this transport is
> not desired. The argument order might even overrule 
> the NAPTR response transport ranking - finally we
> connect and thus decide on what transport we prefer... ;)  
> 
> Any comments warmly welcome,
> best regards
> --Joachim
>  
> 
> 
> _______________________________________________
> Users mailing list
> Users at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/users
> 
> 





More information about the Users mailing list