[Siproxd-users] Siproxd uses random port to send SIP messages
Status: Beta
Brought to you by:
tries
From: Christof M. <cm...@we...> - 2004-02-08 13:39:17
|
Hi, I am unable to connect to sipgate.de via siproxd and I have tracked it down to a problem in siproxd: when siproxd forwards a SIP message it uses a random local port to send the UDP packet. sipgate.de seems to use this address to send replies to, but siproxd doesn't listen on this port and so the reply is lost. Here is a tcpdump: 14:21:57.348815 62.241.36.165.3769 > 217.10.79.9.5060: udp 553 (DF) 14:21:57.358810 217.10.79.9.5060 > 62.241.36.165.3769: udp 689 (DF) [tos 0x10] 14:22:01.275851 62.241.36.165.3769 > 217.10.79.9.5060: udp 553 (DF) 14:22:01.285601 217.10.79.9.5060 > 62.241.36.165.3769: udp 689 (DF) [tos 0x10] 14:22:05.320897 62.241.36.165.3769 > 217.10.79.9.5060: udp 553 (DF) 14:22:05.331116 217.10.79.9.5060 > 62.241.36.165.3769: udp 690 (DF) [tos 0x10] 14:22:09.306329 62.241.36.165.3769 > 217.10.79.9.5060: udp 553 (DF) 14:22:09.317900 217.10.79.9.5060 > 62.241.36.165.3769: udp 690 (DF) [tos 0x10] As you can see, replies are sent to port 3769 on my machine, but siproxd doesn't expect replies to be sent to this port (it only listens on port 5060 for replies). Fixing the problem is simple (use the same socket for sending and receiving SIP messages): - remove the line "int sip_socket=0;" in src/siproxd.c - rename the "listen_socket" in src/sock.c to "sip_socket" bye, Christof -- http://cmeerw.org JID: cm...@ja... mailto cmeerw at web.de |