Hi,
I apologize if this is a too basic VoIP problem I am having. I tried to use the stateless_proxy.pl and ran into a loop problem. I wonder whether someone could give me a hind whether I am doing something wrong here in the usage of the proxy.
This is the way I am calling the proxy:
perl stateless_proxy.pl -d 30 -r --domain mysip.de --leg 192.168.122.10
The proxy runs on a Linux box with a physical interface 192.168.122.10 and SIP clients connect over PPPoE. There are two clients, one at address 192.168.9.136 and a second at 192.168.9.140. The two clients register just fine to the proxy, but then when I try to do a call from one to the other I am getting the loop detection error.
Here is what the log shows:
1240918089.7097 DEBUG:<10> Net::SIP::StatelessProxy::receive[95]: received REQ INVITE ip:1234#@mys
+ip.de;transport=udp with body
1240918089.7101 DEBUG:<10> myProxy::__forward_request_getleg[402]: query registrar for sip:1234#@my
+sip.de
1240918089.7120 DEBUG:<10> Net::SIP::Leg::forward_outgoing[218]: loop detected because outgoing leg
+ is in Via. DROP
1240918089.7121 DEBUG:<10> Net::SIP::StatelessProxy::__forward_packet_final[442]: ERROR while forwa
+rding: loop detected on outgoing leg, dropping
I read that the loop detection is done when in the Via header the own IP address is detected. But the original INVITE request comes in just fine, with the right address in the Via header:
1240918089.7023 DEBUG:<2> Net::SIP::Leg::receive[414]: received on 192.168.122.10:5060 from 192.168
+.9.136:5060 packet
1240918089.7023 DEBUG:<2> INVITE sip:1234#@mysip.de;transport=udp SIP/2.0
1240918089.7023 DEBUG:<2> Via: SIP/2.0/UDP 192.168.9.136:5060;branch=z9hG4bKc4e7dfb6afe861d45d3d9ab
+392eedc18
What happens then is that it gets remapped, which is what I don't understand:
1240918089.7025 DEBUG:<10> Net::SIP::StatelessProxy::receive[95]: received REQ INVITE sip:1234#@my
+sip.de;transport=udp with body
1240918089.7031 DEBUG:<10> myProxy::__forward_request_getleg[402]: query registrar for sip:1234#@my
+sip.de
1240918089.7085 DEBUG:<2> Net::SIP::Leg::deliver[330]: delivery from 192.168.122.10:5060 to udp:192
+.168.122.10:5060 OK:
1240918089.7085 DEBUG:<2> INVITE sip:1234#@mysip.de;transport=udp SIP/2.0
1240918089.7085 DEBUG:<2> Via: SIP/2.0/UDP 192.168.122.10;branch=z9hG4bK59127a34823c2e3e7036db39876
+e050c83dddc009b7fb78c79ca7030b163dfea
This is when the Via header is changed and the IP address of the registered leg is added to it. Now that address is used for incoming and outgoing requests, so I don't understand why this rewrite happens.
Anyone can shed some light on that?
Thanks for your help.
Cheers, Guenter