[sr-dev] why new tcp connection?

Klaus Darilion klaus.mailinglists at pernau.at
Mon Nov 9 16:08:25 CET 2009



Andrei Pelinescu-Onciul schrieb:
> On Nov 09, 2009 at 13:08, Juha Heinanen <jh at tutpro.com> wrote:
>> Andrei Pelinescu-Onciul writes:
>>
>>  > I have somewhere a function that does just that (using the above
>>  > format). I used it a long time ago for load balancing (IIRC lb added
>>  > received="..." to nated contacts when forwarding to the proxies behind
>>  > it and removed "received" from r-uri, set the proper send socket based
>>  > on dstip and the destination based on the received=uri when forwarding a
>>  > message from a proxy to the outside world).
>>  > I can create a new module for it (if it's  not already in one of
>>  > them).
>>
>> andrei,
>>
>> there is a long thread on this and the needed functions have already
>> been written.
> 
> You will need also to save the local ip:port on which the packet is
> received by the proxy. They will be needed when forwarding a packet with
> and alias in r-uri, to make sure the same socket/ip:port will be used
> for sending (or else it won't work with nats if you have several listen
> addresses).

Isn't that already handled by record-routing? AFAIK RR header contains 
the socket on which the request was received, and if incoming and 
outgoing socket differ, then double-RR is used. Thus, isn't the 
send-socket not already set after loose_route()?

This already works fine with fix_nated_contact(), and the new alias_... 
functions do not change routing, the just preserve the original contact URI.

regards
klaus







More information about the sr-dev mailing list