0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

RTP traffic trouble shooting ideas

Last updated at Posted at 2021-03-12

RTP: Capturing Ideas

ngrep

ngrepはtcpdumpのように動作するコマンドで、各種プロトコルの通信をモニタリングしてキーワードに該当するデータだけを表示するといったことができる。

  • タイムスタンプを付加したファイルで保存する
  • 600秒のみでキャプチャを停止する
  • NICを指定する・あるいはしない
  • SIP(port 5060 or 5061)をキャプチャする
NIC=
FILTER=
FILENAME=/var/tmp/$(hostname)_sipdump_$(date +%Y%m%d_%H%M).pcap
timeout 600 ngrep -qtWbyline -d ${NIC:-any} -O ${FILENAME} "${FILTER:-.}" "port 5060||5061"

RTP header だけをキャプチャする:

NIC=
FILTER=
FILENAME=/var/tmp/$(hostname)_RTPdump_$(date +%Y%m%d_%H%M).pcap
tcpdump -s 68 -i ${NIC:-any} -W 1000 -C 10 -w "${FILENAME}" "(port 5060) or (udp[1] & 1 != 1 && udp[3] & 1 != 1 && udp[8] & 0x80 == 0x80 && length < 250)" &

options:

-W

RTP stream 全体をキャプチャする:

tcpdump

  • port 22 を除外する
NIC=
FILENAME=/var/tmp/$(hostname)_alldump_$(date +%Y%m%d_%H%M).pcap
tcpdump -nvi ${NIC:-any} -w ${FILENAME} "not port 22"

Analizing

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?