On Oct 30, 2009 at 18:57, Juha Heinanen jh@tutpro.com wrote:
Andrei Pelinescu-Onciul writes:
I can add the force_send_socket() sets src. for tcp new connection feature quite easily, the question is whether or not to do it on sr_3.0. One difference from k would be that in k (and older ser) a connection from IP1->X is equivalent to IP2->x (only the destination is used, if for example you do force_send_socket(IP2); forward...(X) and a connection from IP1 -> X already exists, this connection will be used and no new connection will be created) while in sr the connections will be different (both the source and the destinations are used => in the above example a new IP2 -> X connection will be opened even if IP1 -> X already exists which IMHO is the correct thing to do).
in k i have had to call force_send_socket(EXTERNAL_IP:5060) when requests comes to proxy from proxy itself at 127.0.0.1 and goes out to an UA. if i don't do that, source ip in the outgoing request would be 127.0.0.1. this is both in case of initial and in-dialog requests.
is this compatible and works as is with sr or do i need to make some changes in my sr config?
It should work out of the box without any force_send_socket, if I understand you correctly. The source ip will be 127.0.0.1 only if you send to 127.0.0.1 (or if you have some strange routing table). If you skip the force_send_socket(), the IP in Via & RR will be the IP of the first listen address that is not localhost or mcast.
Andrei