Trigger close state not working
Hello, Can I ask how the close trigger is working? Because I tried trigger close to run another cmd, the debug log did not appear when the call ended
Filter on two numbers via RegEx
solution was to delete old pcapsipdump reinstall(update)libpcap intall pcapsipdump from svn
have the same error on Centos no RTP in pcapsipdump i am usign it pcapsipdump -i eth0 -d /tmp/siplog/ when i do tcpdump -i eth0 -n -s 0 udp port 5060 or udp portrange 10000-50000 -v -w dump.cap and then open it with wireshark i can see RTP
Far side is behind NAT, pcapsipdump doesn't capture media
Did you find the solution? I ran into a similar problem on RHEL 8.
@Aex Aey: Any Updates / Ideas here ??...
Yes, exactly.
If we take an example of: From: "Joe Random" <joe@example.com> ...would that be "Joe Random" that you want to match on?
Filter / Output "SIP Display Info" Field
New versioned release
Fixed with #include <netinet/in.h>
Fixed with #include <netinet/in.h>
I'm having the same problem in FreeBSD 11.3-RELEASE #0 r349754 libpcap version 1.9.0
Fixed with #include <netinet/in.h>
Fixed with #include <netinet in.h=""></netinet>
Fixed with #include <netinet in.h=""></netinet>
Compiling on FreeBSD 11.3
Compiling on FreeBSD
Segfault
Transparent Ethernet Bridging (Protocol 0x6558) Ignored
pcapsipdump does not dump all sip calls
Skipping lot of calls
Hi Alex, Thanks a lot it works like a charm. Do you plan to add RTP capture for IPV6 ? tried to add it but failed. David
ipv6 + vlan
Should be fixed in [r157]. Can you give it a try?
add another encapsulation - 802.1Q-then-IPv6
ipv6 + vlan
I found a solution to get working files. Tshark has a option to export PDUs. input from fritzbox | tshark -i - -w - | tshark -r - -U "OSI layer 4" -Y "sip or rtp or rtcp" -w capture.cap This works for me. Maybe you can add support for this "57 Unknown interface type (252)." so we can pipe from tshark into pcapsipdump :D
Would be very nice if someone can fix this, i really need it for my work. I tried some tricks with tshark to filter sip/rtp/rtcp only traffic, because it cant filter (-f) from pipe stream. input from fritzbox | tshark -i - -Y "sip or rtp or rtcp" -x | text2pcap - capture.cap But the rtp packets are not visible as those. Maybe the same problem as with pcapsipdump.
On IPv6 without ds lite i'm getting this: Can't get ip/port from SDP: v=0 o=user 8368762 8368762 IN IP6 2001:16b8:4100:2e90:9a9b:cbff:fe56:fc96 s=call c=IN IP6 2001:16b8:4100:2e90:9a9b:cbff:fe56:fc96 t=0 0 m=audio 7078 RTP/AVP 8 0 2 102 100 99 97 101 a=sendrecv a=rtpmap:2 G726-32/8000 a=rtpmap:102 G726-32/8000 a=rtpmap:100 G726-40/8000 a=rtpmap:99 G726-24/8000 a=rtpmap:97 iLBC/8000 a=fmtp:97 mode=30 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-15 a=rtcp:7079 a=ptime:20 v=0 o=user 8368762 8368762...
Ok some more is working. Seems IPv4 works without ds lite. But IPv6 is not working yet neither with or without ds lite. Here some captures:
Ok some more is working. Seems IPv4 works without ds lite. But IPv6 is not working yet neither with or without ds lite. Here some captures:
Ok some more is working. Seems IPv4 works fawlessly. But IPv6 is not working yet neither with or without ds lite. Here some captures:
Ok some more is working. But IPv6 is not working yet neither with or without ds lite. Here a capture of an outgoing call.
Ok some more is working. But IPv6 is not working yet neither with or without ds lite.
Youre a genius! All working now :) except ds-lite. ds lite still shows this Skipping udp packet 2001:16b8:4103:7a5e:3a10:d5ff:fe0c:93fc:7078->2001:8d8:104:0:212:227:124:73:41566 Skipping udp packet 2001:16b8:4103:7a5e:3a10:d5ff:fe0c:93fc:7078->2001:8d8:104:0:212:227:124:73:41566 Skipping udp packet 2001:16b8:4103:7a5e:3a10:d5ff:fe0c:93fc:7078->2001:8d8:104:0:212:227:124:73:41566 Skipping udp packet 2001:16b8:4103:7a5e:3a10:d5ff:fe0c:93fc:7078->2001:8d8:104:0:212:227:124:73:41566 Skipping udp packet...
Youre a genius! All working now :) except ds-lite. ds lite still shows this Skipping udp packet 2001:16b8:4103:7a5e:3a10:d5ff:fe0c:93fc:7078->2001:8d8:104:0:212:227:124:73:41566 Skipping udp packet 2001:16b8:4103:7a5e:3a10:d5ff:fe0c:93fc:7078->2001:8d8:104:0:212:227:124:73:41566 Skipping udp packet 2001:16b8:4103:7a5e:3a10:d5ff:fe0c:93fc:7078->2001:8d8:104:0:212:227:124:73:41566 Skipping udp packet 2001:16b8:4103:7a5e:3a10:d5ff:fe0c:93fc:7078->2001:8d8:104:0:212:227:124:73:41566 Skipping udp packet...
Youre a genius! All working now :) except ds-lite and nice debugging function. ds lite still shows this Skipping udp packet 2001:16b8:4103:7a5e:3a10:d5ff:fe0c:93fc:7078->2001:8d8:104:0:212:227:124:73:41566 Skipping udp packet 2001:16b8:4103:7a5e:3a10:d5ff:fe0c:93fc:7078->2001:8d8:104:0:212:227:124:73:41566 Skipping udp packet 2001:16b8:4103:7a5e:3a10:d5ff:fe0c:93fc:7078->2001:8d8:104:0:212:227:124:73:41566 Skipping udp packet 2001:16b8:4103:7a5e:3a10:d5ff:fe0c:93fc:7078->2001:8d8:104:0:212:227:124:73:41566...
Capture with ds lite still does not work, but with real dual stack it works now, but only on the pppoe interface without vlan (7). The pppoe interface with vlan gives me masses of this here: Can't parse Ethernet tags: 8100 0007 8864 1100 27c3 05d6 Can't parse Ethernet tags: 8100 0007 8864 1100 27c3 0036 Can't parse Ethernet tags: 8100 0007 8864 1100 27c3 05d6 Can't parse Ethernet tags: 8100 0007 8864 1100 27c3 05d6 Can't parse Ethernet tags: 8100 0007 8864 1100 27c3 05d6 Can't parse Ethernet tags:...
First one (8100 0007 8864 1100 27c3 05d6) appears to be PPPoE inside an 802.1Q VLAN. I've added this in [r155] (untested, I don't have any pcaps with such traffic) On the LAN: - Ethernet tag 86dd is IPv6 - added in [r156] - Ethernet tag 88e1 homeplug (ethernet over powerline) protocol: https://en.avm.de/service/fritzbox/fritzbox-7360/knowledge-base/publication/show/249_Firewall-reports-attacks-on-TCP-port-80-or-14013-or-unsolicited-packets-of-type-0x88e1/ - Ethernet tag 8912 - can't figure this one...
support 0x86dd as IPv6 EtherType
support PPPoE-in-802.1Q
Yes, of course. thank you for attaching. I've integrated your fix as [r152] With a fresh svn checkout, you should see SIP working on both native IPv6 and IPv4-tunneled-in-IPv6 (as is customary to do in DS-lite). However, RTP will likely still be missing (if SDP is not in the first fragment, like it is in the attached pcap). To make that work, we need teach pcapsipdump to do full segment reassembly. I'll add this on to-do list.
Did you test it against the cap file? Still does not work or do i need to add my fix after fresh svn checkout? To verify that i have no old stuff i did rm -fr pcapsipdump-code rm /usr/sbin/pcapsipdump
[r154] should deal with DS-lite and some IPv6 fragmented packets, but latter is quite limited similarly to the IPv4 fragmenation handler - RTP will only be picked up if enough of SDP (m= and c=) are included in first fragment.
handle ipv4-in-ipv6 (a.k.a. dual-stack lite)
first attempt to handle ipv6 fragmentation
refactor ethernet header parsing and add pppoe support
When the provider is forcing a dual stack lite tunnel, its nearly impossible for pcapsipdump to find some packets. Unknown SIP method:''! Skipping udp packet 2001:16b8:4102:c71e:3a10:d5ff:fe0c:93fc:7078->2001:8d8:104:0:212:227:124:6:23252 Skipping udp packet 2001:16b8:4102:c71e:3a10:d5ff:fe0c:93fc:7078->2001:8d8:104:0:212:227:124:6:23252 Skipping udp packet 2001:16b8:4102:c71e:3a10:d5ff:fe0c:93fc:7078->2001:8d8:104:0:212:227:124:6:23252 Skipping udp packet 2001:16b8:4102:c71e:3a10:d5ff:fe0c:93fc:7078->2001:8d8:104:0:212:227:124:6:23252...
When the provider is forcing dual stack lite, its nearly impossible for pcapsipdump to find the right packets. Unknown SIP method:''! Skipping udp packet 2001:16b8:4102:c71e:3a10:d5ff:fe0c:93fc:7078->2001:8d8:104:0:212:227:124:6:23252 Skipping udp packet 2001:16b8:4102:c71e:3a10:d5ff:fe0c:93fc:7078->2001:8d8:104:0:212:227:124:6:23252 Skipping udp packet 2001:16b8:4102:c71e:3a10:d5ff:fe0c:93fc:7078->2001:8d8:104:0:212:227:124:6:23252 Skipping udp packet 2001:16b8:4102:c71e:3a10:d5ff:fe0c:93fc:7078->2001:8d8:104:0:212:227:124:6:23252...
Hi Oliver, thanks for reporing this. Would you be able to attach a .pcap file with pppoe ipv4/ipv6 sip packets? Just one packet for each(ipv4/ipv6) would be enough.
fix for direct input from avm fritzbox
Morning, cleaned up the patch for pcapsipdump_lib.h a bit. Regards, Seb
Using libc's strlcpy if available
Endian issue, pcapsipdump not working on big endian
Hello Aex, It's working fine now without patches. I compile-tested on x86_64, once a native compile and once a cross-combile for MIPS BE, endian was properly detected during both. Run-tested on MIPS BE. Thank you very much! Regards, Seb P.S.: I didn't see a way to close this ticket. Maybe you can close it when you get around to it.
Sure, will try when I get home and ping you back. Thanks!
Ok, I you are right. I was confused beween solaris-style defines (either _LITTLE_ENDIAN == 1 or _BIG_ENDIAN == 1; other one undefined) and BSD/Linux-style defines (either __BYTE_ORDER == __LITTLE_ENDIAN or __BYTE_ORDER == __BIG_ENDIAN; all three always defined), so trunk since [r139] was broken on BE systems. Should be fixed in [r151], can you give it a try?
refactor endianness detection (fix #39 2/2)
Hello Aex, I crosscompile on x86_64 with OpenWrt buildroot. gcc is 7.4.0 and libc in this case is musl. Will try tonight. I think __LITTLE_ENDIAN and __BIG_ENDIAN can't be used for tests, because they seem to be defined both at the same time. I put an #error below if !defined (__LITTLE_ENDIAN) && !defined (__BIG_ENDIAN) and the build never reached this error. Also, pcapsipdump testing like this ("do this if both __LITTLE_ENDIAN and __BIG_ENDIAN aren't defined") suggests this is normal. I found this...
Hello Aex, I crosscompile on x86_64 with OpenWrt buildroot. gcc is 7.4.0 and libc in this case is musl. Will try tonight. I think __LITTLE_ENDIAN and __BIG_ENDIAN can't be used for tests, because they seem to be defined both at the same time. I put an #error below if !defined (__LITTLE_ENDIAN) && !defined (__BIG_ENDIAN) and the build never reached this error. Also, pcapsipdump testing like this ("do this if both __LITTLE_ENDIAN and __BIG_ENDIAN aren't defined") suggests this is normal. I found this...
Hello Aex, I crosscompile on x86_64 with OpenWrt buildroot. gcc is 7.4.0 and libc in this case is musl. Will try tonight. I think __LITTLE_ENDIAN and __BIG_ENDIAN can't be used for tests, because they seem to be defined both at the same time. I put an #error below if !defined (__LITTLE_ENDIAN) && !defined (__BIG_ENDIAN) and the build never reached this error. Also, pcapsipdump testing like this ("do this if both __LITTLE_ENDIAN and __BIG_ENDIAN aren't defined") suggests this is normal. I found this...
Hello Aex, I crosscompile on x86_64 with OpenWrt buildroot. gcc is 7.4.0 and libc in this case is musl. Will try tonight. I think __LITTLE_ENDIAN and __BIG_ENDIAN can't be used for tests, because they seem to be defined both at the same time. I put an #error below if !defined (__LITTLE_ENDIAN) && !defined (__BIG_ENDIAN) and the build never reached this error. Also, pcapsipdump testing like this ("do this if both __LITTLE_ENDIAN and __BIG_ENDIAN aren't defined") suggests this is normal. I found this...
Re: endinannes though - that is not what is going on here. __LITTLE_ENDIAN or __BIG_ENDIAN are used to construct packet header structs. On most systems, one of them is defined to indicate endianness (not both). If neither is defined, then, as a fallback __BYTE_ORDER is probed, and either __LITTLE_ENDIAN or __BIG_ENDIAN is defined locally. Do you complile this natively on BE host? Which gcc/libc? Can you try to compile lines 31..42 of pcapsipdump.h standalone to see if this is what compliler chokes...
Endian issue, pcapsipdump not working on big endian
time_t fix is in [r150], thanks!
Fix #39 (1/2)
Here's the endian patch I used.
Endian issue, pcapsipdump not working on big endian
Major bug -- Inverted logical expression
Fixed in [r149], thanks for reporting! Note that while missing "!" before memcmp is indeed a bug, it was never a problem, being masked by another bug in the same line: confusion between sizeof (string constant length including final \0, i.e. memcmp does exact match) vs. strlen (string length excluding final \0, i.e. memcmp does prefix match). That is to say - if you don't see .pcap files being created, check other things too.
Fix #38
Major bug -- Inverted logical expression
Hello. Thank you for explanations. Now I can split the file. Also, I was suprised that it is possible to set filetrs like TCP/UDP port. Thank you.
Support q-in-q VLANs
hm... looks like sf wouldn't allow me to set you as commit author :-/
Support q-in-q VLANs
Commited in [r148]. Thanks for contributing!
Allow q-in-q capture. This should really be dynamic number of tags - walk through all the 0x8100s until we get 0x0800
BSD
Thanks for reporting. According to /usr/include/pcap/dlt.h link type 113 is "Linux cooked sockets". This interface type (lo, tun, etc...) lack L2 header, and therefore vlan support. Vlan was, until now, part of default pcap filter expression. This should be fixed in [r147] (by dropping default pcap filter expression altogether). For earlier version, any explicit pcap expression compatible with linktype can be specified after all the other parameters, for example ip. This will override default pcap...
Unable to split pcap file
Thanks for reporting. According to /usr/include/pcap/dlt.h link type 113 is "Linux cooked sockets". This interface type (lo, tun, etc...) lack L2 header, and therefore vlan support. Vlan was, until now, part of default pcap filter expression. This should be fixed in [r147] (by dropping default pcap filter expression altogether). For earlier version, any explicit pcap expression compatible with linktype can be specified after all the other parameters, for example ip. This will overrive default pcap...
Drop the default pcap filter expression
Unable to split pcap file
Fix calltable cache segfaults
Make indenting consistent
Support q-in-q VLANs
Crashes since switching to AWS m5a instance type
pcapsipdump crashes while parsing packet greater than MTU
Indeed, it works. Thanks for the speedy fix!
Should be fixed in [r146], thanks for reporting!
Fix gettag()
TCP support appears to be broken in r143 and forward. Only the first INVITE packet is captured. It works in r142. Thanks!
Is there anything I can colelct for you that might help understand why yhis is happening?