i have twinkle registered from behind nat over tcp and another sip phone
registered over udp using the same aor and q value. this aor is then
called by another sip phone and sr forks the invite:
Oct 28 17:58:37 localhost /usr/sbin/sip-proxy[28989]: INFO: Routing first INVITE to <sip:foo@192.168.0.169:5074;transport=tcp> and <<sip:JzlUogbN0_q5BaWAN1Zv@xx.xx.xx.xx>;q=0>
...
twinkle answers and sends 200 ok. 200 ok is received by the calling
phone, which then sends ack to twinkle via sr, the problem is that
twinkle never receives the ack. instead sr reports a tcp error:
Oct 28 17:58:46 localhost /usr/sbin/sip-proxy[28994]: INFO: Routing in-dialog ACK from <sip:foo.bar@foo.bar> to <sip:foo@192.168.0.169:5074;transport=TCP>
Oct 28 17:58:46 lohi /usr/sbin/sip-proxy[28994]: 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 28 17:58:51 localhost /usr/sbin/sip-proxy[29140]: ERROR: <core>
[tcp_main.c:3747]: connect 192.168.0.169:5074 failed (timeout)
weird thing about the warning is that it mentions ip address 192.X.Y.2,
which is not any of the ip addresses sr has configured to listen at.
192.X.Y.2 is the ip address of eth0 of sr host, but sr is listening at
192.X.Y.10, which is address of interface eth0:1.
am i missing some magic from sr tcp config or what could be the reason
that sr is trying to find non-existing listening socket?
i do have wireshark capture of this if it helps.
-- juha
Hi!
IMO it would be better to increase the default value of memdbg and
memlog to 4 (L_DBG+1) to avoid the memory log messages in debug=3 mode.
I often use debug=3 to hunt down script or sip-router errors and I am
not interested in memory debugging. I think this confuses many new
sip-router users too.
regards
klaus
Module: sip-router
Branch: sr_3.0
Commit: 6fcba958595c5189c1b9d97c8fc4c9f434a3c7ad
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=6fcba95…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Thu Nov 5 16:21:35 2009 +0100
tcp: use the forced socket ip as source
- if a socket is forced always use the forced socket ip as source
(if a connection exists with different ip as source, open a new
one with the forced ip).
---
forward.h | 23 +++++++++++++++++++++--
1 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/forward.h b/forward.h
index 2a6e91e..b365753 100644
--- a/forward.h
+++ b/forward.h
@@ -123,6 +123,11 @@ static inline int msg_send(struct dest_info* dst, char* buf, int len)
{
struct dest_info new_dst;
str outb;
+#ifdef USE_TCP
+ union sockaddr_union* from;
+ union sockaddr_union local_addr;
+#endif
+
outb.s = buf;
outb.len = len;
sr_event_exec(SREV_NET_DATA_OUT, (void*)&outb);
@@ -152,7 +157,14 @@ static inline int msg_send(struct dest_info* dst, char* buf, int len)
" support is disabled\n");
goto error;
}else{
- if (unlikely(tcp_send(dst, 0, outb.s, outb.len)<0)){
+ from=0;
+ if (unlikely((dst->send_flags & SND_F_FORCE_SOCKET) &&
+ dst->send_sock)) {
+ local_addr=dst->send_sock->su;
+ su_setport(&local_addr, 0); /* any local port will do */
+ from=&local_addr;
+ }
+ if (unlikely(tcp_send(dst, from, outb.s, outb.len)<0)){
STATS_TX_DROPS;
LOG(L_ERR, "msg_send: ERROR: tcp_send failed\n");
goto error;
@@ -167,7 +179,14 @@ static inline int msg_send(struct dest_info* dst, char* buf, int len)
" support is disabled\n");
goto error;
}else{
- if (unlikely(tcp_send(dst, 0, outb.s, outb.len)<0)){
+ from=0;
+ if (unlikely((dst->send_flags & SND_F_FORCE_SOCKET) &&
+ dst->send_sock)) {
+ local_addr=dst->send_sock->su;
+ su_setport(&local_addr, 0); /* any local port will do */
+ from=&local_addr;
+ }
+ if (unlikely(tcp_send(dst, from, outb.s, outb.len)<0)){
STATS_TX_DROPS;
LOG(L_ERR, "msg_send: ERROR: tcp_send failed\n");
goto error;
Hi!
Bug: db_flatstore is in db_modules package and ser standard package
I think it should be removed from db_modules packages as it does not
have any dependencies on db-libraries.
regards
klaus