Dmitry Goncharov
Sat, 14 Mar 2009 05:14:40 -0700
E.H.Eefting wrote:
After a lot of debugging with asterisk and sipp in pcap mode we found the following problem:If asterisk is configured to allow rtp ports greater than 9999, it seems the last digit is trimmed away some how.An example of a tcpdump followed by an immediate netstat shows this problem: -192.168.13.198 is running sipp in uac_pcap mode. -192.168.13.150 is the asterisk server. -uac is sending packets to udp port 1830 -asterisk is listening on ports 18300 and 18301If asterisk happens to choose a port below 10000 (a port that is 4 digits long), everything goes well. This looks like a SIP parser bug in sipp somewhere, since normally we dont have this problem with other sip clients.The SIP protocol is text-based, so a parser bug makes sence, right?Could somebody look into the sourcecode if this is right? If it IS a bug, it would certainly explain a lot for many people i think ;)Edwin Eefting http://www.syn-3.nl -----------------------------------------(paste of terminal output)[Syn-3] r...@darkstar.example.net /etc/asterisk# tcpdump -n -l src 192.168.13.198 and not port 22 or proto ICMP | head -20 ; netstat -nap| grep asterisktcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0:0, link-type EN10MB (Ethernet), capture size 68 bytes ..... 17:57:49.398169 IP 192.168.13.198.6016 > 192.168.13.150.1830: UDP, length 252 17:57:49.428113 IP 192.168.13.198.6016 > 192.168.13.150.1830: UDP, length 252 17:57:49.458880 IP 192.168.13.198.6016 > 192.168.13.150.1830: UDP, length 25217:57:49.458939 IP 192.168.13.150 > 192.168.13.198: ICMP 192.168.13.150 udp port 1830 unreachable, length 28817:57:49.488563 IP 192.168.13.198.6016 > 192.168.13.150.1830: UDP, length 252 17:57:49.517853 IP 192.168.13.198.6016 > 192.168.13.150.1830: UDP, length 252 ..... 21 packets captured 48 packets received by filter 0 packets dropped by kerneludp 0 0 0.0.0.0:5060 0.0.0.0:* 18189/asterisk udp 0 0 0.0.0.0:18300 0.0.0.0:* 18189/asterisk udp 0 0 0.0.0.0:18301 0.0.0.0:* 18189/asterisk udp 0 0 0.0.0.0:17278 0.0.0.0:* 18189/asterisk
Hi, Edwin Yes, this is a bug in sipp. Here is your patch. BR, Dmitry
diff -urb sipp.svn_orig/call.cpp sipp.svn_fixed/call.cpp
--- sipp.svn_orig/call.cpp 2008-12-19 13:14:51.000000000 +0300
+++ sipp.svn_fixed/call.cpp 2008-12-19 13:16:34.000000000 +0300
@@ -192,7 +192,7 @@
/* m=audio not found */
return 0;
}
- begin += strlen(pattern) - 1;
+ begin += strlen(pattern);
end = strstr(begin, "\r\n");
if (!end)
ERROR("get_remote_port_media: no CRLF found");
------------------------------------------------------------------------------ Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________ Sipp-users mailing list Sipp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sipp-users
- [Sipp-users] asterisk/sipp rtp port bug? E.H.Eefting
Re: [Sipp-users] asterisk/sipp rtp port bug? Dmitry Goncharov