capture expressions need to capture only specific voip calls

hello,

Im having hell of a time getting the expressions written so I can only capture specific calls....

the issue I have is we are capturing off a PBX that has multiple customers in it,

What I have been tasked with is to only capture calls from a specific customer.

in the capture that i have in the sip.to.host == "DOMAIN HERE" works in the display filter....

which is from the : sip.r-uri.host field in the INVITE.

how do I translate that so the capture filter will only capture that call for "DOMAIN HERE"

TIA

Posted Feb 5, 2021, 5:31 PM UTC

14
showipintbri•

Capture filters use bpf not lipcap syntax. If you try to use 'host [hostname]' it won't yield you what you're thinking.

Can you use a source IP and destination IP to match?

2
TheGABB•

Exactly https://www.tcpdump.org/manpages/pcap-filter.7.html Why not capture more, then filter out and re-export after?

2
dangerforceidle•

I'm not super familiar with SIP, but you can capture using TCP offset values and the HEX value of the domain in the sip.to.host field with BPF.

Let me see if I can find some SIP traffic in my network that is captured and try and work out the offsets for the INVITE.

There may not be a way to do what you're hoping.

1
dangerforceidle•

It doesn't look very feasible, to be honest. And the SIP traffic isn't the call, it's only for the call setup, right? Even if there was a way to set up a capture filter that captured all the SIP packets associated with a call, you wouldn't get the actual call itself.

If you want to talk BPF and offsets in a general sense, I can run through it, but from what I can see from SIP traffic in my environment, the data moves around to different positions in the SIP headers depending on the message (INVITE, REGISTER, NOTIFY, ACK) and BPF is not a very flexible way to filter. The TCP headers including options can also increase the complexity.

1