[SR-Users] t_set_fr() different behavior whether transport is udp or tcp

Olle E. Johansson oej at edvina.net
Tue Aug 16 16:14:15 CEST 2016


> On 16 Aug 2016, at 11:41, Daniel Tryba <d.tryba at pocos.nl> wrote:
> 
> I'm seeing a different behavior of t_set_fr depending on transports.
Which is correct. UDP is connectionless and thus SIP has timers for 
retransmits and fails when there’s no response. With connection-oriented
protocols, the failure happens when the connection fails, which in many
cases is much faster and not based on any retransmission timers.

In fact - failures in TCP is quite operating system dependent if the URI
results in an IP address. There are some interesting papers on this topic
which for SIP lead to the development of solutions like SIP outbound.

/O

> Scenario is that a endpoint has a failover defined in the registrat
> after 10s (t_set_fr(10000) and handling the locally generated 408 to the
> failover destination). This works fine when the request and response
> where delivered over UDP. When the Path is TCP the failover happends
> after 30s (even when using a different time t_set_fr(20000) so it is not
> a factor 3 or something like that).
> 
> Setup:
> OK, 10s:
> Orig->UDP->loadbalancer->UDP->registrar->UDP->loadbalancer->TCP->Term
> Fail, 30s:
> Orig->UDP->loadbalancer->TCP->registrar->TCP->loadbalancer->TCP->Term
> 
> Loadbalancer and registrar are kamailio machines (4.3.6). Communication
> between lb and registrar is based on dispatcher and path modules. 
> 1 sip:registrar:5060;transport=udp 8 0
> or via tcp:
> 1 sip:registrar:5060;transport=tcp 8 0
> 
> In the location database of the registrar the difference between the
> cases is:
> socket:
> udp:registrar:5060
> or via tcp
> tcp:registrar:5060
> path:
> <sip:lb at loadbalancer;lr;received=sip:1.2.3.4:5067%3Btransport%3Dtcp>
> or via tcp
> <sip:lb at loadbalancer;transport=tcp;lr;received=sip:1.2.3.4:5067%3Btransport%3Dtcp>
> 
> Looking at debug(=3) nothing happens between the initial INVITE and the
> local 408 as far as I can see. 
> 
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users




More information about the sr-users mailing list