Me again,
On 09/16/2011 02:46 PM, Andreas Granig wrote:
And this is what I'd need to add if I got you
right:
# the default reply route used when transaction is already gone
onreply_route
{
if(reply from inside)
force_send_socket(localhost);
else
force_send_socket(public interface);
}
I've tried to implement and test this, but there's one issue with it.
If
I have mhomed=1, then my injected (out of any transaction) reply hits
this default route and is sent to the next hop (in my case
192.168.51.1:5060) according to the 2nd via header, so this is fine.
However if I set mhomed=0, but still call
force_send_socket(192.168.51.205:5060), I get the same error, like this:
INFO:<script>: Reply without Transaction - S=200 - Alive
F=sip:127.0.0.1:5062 T=sip:foo@bar.com:5060 IP=127.0.0.1:5062
ID=44217ae8-30016e50-13c4-197d78a-3921f4fc-db1e9be9
INFO:<script>: Force outbound socket - S=200 - Alive
F=sip:127.0.0.1:5062 T=sip:foo@bar.com:5060 IP=127.0.0.1:5062
ID=44217ae8-30016e50-13c4-197d78a-3921f4fc-db1e9be9
ERROR:<core> [udp_server.c:586]: ERROR: udp_send:
sendto(sock,0x980fa8,350,0,192.168.51.1:5060,16): Invalid argument(22)
Sep 16 15:12:25 sp1 /usr/sbin/kamailio[31169]: :<core>
[udp_server.c:591]: CRITICAL: invalid sendtoparameters#012one possible
reason is the server is bound to localhost and#012attempts to send to
the net
ERROR:<core> [forward.h:149]: msg_send: ERROR: udp_send failed
So is there actually a limitation on when I'm allowed to call
force_send_socket()? Any way to force force_send_socket()? :)