i thought that tcp problem (using wrong ip address) appeared only in latest sr code, but now i saw it also in older version.
to repeat, register twinkle using tcp from behind nat. call twinkle from another sip phone that is using udp. twinkle receives 200 ok, but never the ack. sr cannot forward ack to twinkle and reports:
Oct 30 10:36:56 localhost /usr/sbin/sip-proxy[3911]: WARNING: <core> [tcp_main.c:1200]: WARNING: tcp_do_connect 192.168.0.169:5074: could not find corresponding listening socket for 192.X.Y.2, using default... Oct 30 10:36:57 localhost /usr/sbin/sip-proxy[3924]: INFO: Routing in-dialog BYE from sip:foo.bar@bar.com to sip:jh_bar_com@192.168.0.169:5074;transport=tcpOct 30 10:37:01 localhost /usr/sbin/sip-proxy[4023]: ERROR: <core> [tcp_main.c:3747]: connect 192.168.0.169:5074 failed (timeout)
where 192.X.Y.2 is NONE of the addresses sr is listening at, but ip of eth0 interface.
this is a very serious show stopper.
-- juha
Juha Heinanen writes:
Oct 30 10:36:56 localhost /usr/sbin/sip-proxy[3911]: WARNING: <core> [tcp_main.c:1200]: WARNING: tcp_do_connect 192.168.0.169:5074: could not find corresponding listening socket for 192.X.Y.2, using default... Oct 30 10:36:57 localhost /usr/sbin/sip-proxy[3924]: INFO: Routing in-dialog BYE from sip:foo.bar@bar.com to sip:jh_bar_com@192.168.0.169:5074;transport=tcpOct 30 10:37:01 localhost /usr/sbin/sip-proxy[4023]: ERROR: <core> [tcp_main.c:3747]: connect 192.168.0.169:5074 failed (timeout)
this was also due to the wrong flag being set by save(). sr didn't know that the called user was behind nat.
however, i still don't understand what address 192.X.Y.2 appears in the error message, because sr has nothing to do with it.
-- juha
On Oct 30, 2009 at 10:44, Juha Heinanen jh@tutpro.com wrote:
i thought that tcp problem (using wrong ip address) appeared only in latest sr code, but now i saw it also in older version.
to repeat, register twinkle using tcp from behind nat. call twinkle from another sip phone that is using udp. twinkle receives 200 ok, but never the ack. sr cannot forward ack to twinkle and reports:
Oct 30 10:36:56 localhost /usr/sbin/sip-proxy[3911]: WARNING: <core> [tcp_main.c:1200]: WARNING: tcp_do_connect 192.168.0.169:5074: could not find corresponding listening socket for 192.X.Y.2, using default... Oct 30 10:36:57 localhost /usr/sbin/sip-proxy[3924]: INFO: Routing in-dialog BYE from sip:foo.bar@bar.com to sip:jh_bar_com@192.168.0.169:5074;transport=tcpOct 30 10:37:01 localhost /usr/sbin/sip-proxy[4023]: ERROR: <core> [tcp_main.c:3747]: connect 192.168.0.169:5074 failed (timeout)
where 192.X.Y.2 is NONE of the addresses sr is listening at, but ip of eth0 interface.
Use tcp_source_ipv4=.... if you want a force source address, or make sure the route to 192.X.Y.0 use src=desired_src_address or just let sr listen on all interfaces.
Andrei
Andrei Pelinescu-Onciul writes:
Use tcp_source_ipv4=.... if you want a force source address, or make sure the route to 192.X.Y.0 use src=desired_src_address or just let sr listen on all interfaces.
andrei,
listening on all interfaces is not good option because of security issues.
tcp_source_ipv4=.... cannot be used if proxy uses tcp over lo interface and also over an ethernet interface.
my suggestion is that proxy uses by default an ip that does not belong to lo interface, but that it itself is listening on.
using an ip that proxy is not listening itself on is not a good idea.
-- juha