[OpenSER-Devel] [ openser-Bugs-1950569 ] path: add_path_received() does not add transport

SourceForge.net noreply at sourceforge.net
Fri Jul 4 15:08:48 CEST 2008


Bugs item #1950569, was opened at 2008-04-24 10:35
Message generated for change (Settings changed) made by henningw
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1950569&group_id=139143

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: ver 1.2.x
Status: Open
Resolution: Accepted
Priority: 5
Private: No
Submitted By: axlh (axlh)
Assigned to: Bogdan-Andrei Iancu (bogdan_iancu)
>Summary: path: add_path_received() does not add transport

Initial Comment:
I use add_path_received() in a load-balancer in front of a registrar. When a request comes in via TCP, this is not reflected in the received parameter of the Path header added with the function add_path_received().

The problem is when the registrar sends an invite via the balancer to the ua. On the balancer, the value in the received parameter of the uri is set to the destination uri, but it is sent out via udp instead of tcp because of the missing ';transport=tcp'.

Suggested fix: add the transport over which the request came in tot the received paramater in the Path header when the transport is not UDP.


----------------------------------------------------------------------

Comment By: axlh (axlh)
Date: 2008-05-15 11:42

Message:
Logged In: YES 
user_id=1212856
Originator: YES

Bogdan,

Is that the only solution? By adding the received parameter, the switch
from tcp to/from udp is handled. I have this working perfectly well for the
simple balancer/registrar situation. In contrary to the Record-Route/Route,
the Path information is used in only 1 direction.

I have this in the 'path' field in the 'location' table:
<sip:xx.xx.xx.xx;lr;received="sip:yy.yy.yy.yy:5075;transport=tcp";nat>

where xx.xx.xx.xx is the ip of the balancer (no transport parameter, thus
defaulting to udp) and yy.yy.yy.yy the public ip of the client (with
transport parameter tcp).

The registrar correctly puts the entire uri into a Route: header and send
it off to xx.xx.xx.xx over UDP. The balancer uses loose_route() and
forwards to yy.yy.yy.yy over TCP.

Alex.

----------------------------------------------------------------------

Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2008-05-15 09:39

Message:
Logged In: YES 
user_id=1275325
Originator: NO

Hi Alex,

I think the fix is not the simple - as Path is very similar to RR, in case
of changing the interface/port/proto, there should be 2 headers added - one
for the inbound interface and one for the outbound interface. This is the
correct way to do it (and RR module is doing it).

You need two headers as one tells to proxy how to send the request to your
LB and second says to LB how to sent the request out (to change the
interface/transport).

Regards,
Bogdan


----------------------------------------------------------------------

Comment By: axlh (axlh)
Date: 2008-05-15 09:04

Message:
Logged In: YES 
user_id=1212856
Originator: YES

Bogdan,

That is the case, the balancer speaks both udp and tcp, the registrar only
udp.

I already tested by adding the parameter manually in the 'location' table
for a registered (tcp) contact. Then the request is send over tcp from the
balancer on. So the only thing missing is the addition of the transport to
the Path header.

Thanks,

Alex.

----------------------------------------------------------------------

Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2008-05-14 12:09

Message:
Logged In: YES 
user_id=1275325
Originator: NO

Hi Axel,

On the LB, is there a protocol change? I mean you receive TCP and forward
to registrar via UDP?

Regards,
Bogdan

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1950569&group_id=139143



More information about the Devel mailing list