Sip 使用tshark过滤VoIP呼叫
我正在分析网络上的VoIP呼叫 目前我使用的是生成的.pcap文件,但稍后我将实时监听 我正在使用tshark,我可以很容易地从.pcap中过滤一些重要数据(如“源ip地址和端口”、“目标ip地址和端口”、有效负载pckt丢失、最大增量(ms)、最大抖动(ms)、平均抖动(ms)),使用 tshark-rmyfile-q-zrtp,流 我想知道的是:如何获得通话的sip地址?(客户端和服务器) 我可以通过如下方式过滤所有sip INVITE来检索一些sip地址(仅客户端): tshark-r myFile-r“sip.Request-Line包含INVITE” 但是我找不到服务器的地址 为了澄清一点,我的想法是在tshark中获得这个“统计数据”,就像wireshark在我访问“电话>VoIP呼叫”时给我的一样(与tshark-r myfile-q-z rtp、Streams返回我的统计数据的方式相同,就像wireshark的电话>rtp>显示所有流),有没有办法做到这一点?如果没有使用“statistics”(-z),我如何创建一个过滤器(-R)来执行类似wireshark的“VoIPCall”函数的操作 我使用tshark是因为我想处理这些数据,而不仅仅是在屏幕上分析它 谢谢试试:Sip 使用tshark过滤VoIP呼叫,sip,voip,wireshark,tshark,Sip,Voip,Wireshark,Tshark,我正在分析网络上的VoIP呼叫 目前我使用的是生成的.pcap文件,但稍后我将实时监听 我正在使用tshark,我可以很容易地从.pcap中过滤一些重要数据(如“源ip地址和端口”、“目标ip地址和端口”、有效负载pckt丢失、最大增量(ms)、最大抖动(ms)、平均抖动(ms)),使用 tshark-rmyfile-q-zrtp,流 我想知道的是:如何获得通话的sip地址?(客户端和服务器) 我可以通过如下方式过滤所有sip INVITE来检索一些sip地址(仅客户端): tshark-r m
tshark -r myFile -R "sip.CSeq.method eq INVITE"
这将筛选从客户端发送的请求和从服务器发送的相应回复。我也遇到过类似的情况,最后浏览了tshark手册页 命令:
tshark-r input_file.pcap-q-z sip,stat
说明:
-r <infile> : Read packet data from infile
-q : When reading a capture file, don't print packet information; this is useful if you're using a -z option to calculate statistics and don't want the packet information printed, just the statistics.
-z <statistics> : Get TShark to collect various types of statistics and display the result after finishing reading the capture file.
如果需要多个过滤器,可以逐个添加它们
tshark-r input_file.pcap-q-z sip,stat,sip.Status code==480-z sip,stat,sip.Status code==500
如果要按sip地址汇总,可以按以下方式进行筛选:
tshark-r input_file.pcap-q-z sip,stat,sip.to.host==sip to host.com
参考:
你到底想要什么/需要什么还不清楚。它是在捕获过程中提供“实时”信息的东西吗?或者只是一个命令行界面来获取“Telephony>VoIP Calls”GUI选项提供的信息?
-z sip,stat[,filter] : This option will activate a counter for SIP messages. You will get the number of occurrences of each SIP Method and of each SIP Status-Code