Asterisk Troubleshooting: Wireshark Intro (Latest Versions)
Updated guide for modern Asterisk (PJSIP era): wireshark intro with real configs, common mistakes, and troubleshooting steps.
Capturing Packets Using tcpdump (Server-Side Method)
In production servers, Wireshark GUI is often not installed. Instead, administrators capture traffic using tcpdump and later open the capture file in Wireshark.
Basic SIP Capture
sudo tcpdump -i any -s 0 -w sip_capture.pcap udp port 5060
This records all SIP signaling traffic into a file.
Capture SIP + RTP Together
sudo tcpdump -i any -s 0 -w full_call.pcap udp portrange 10000-20000 or udp port 5060
This captures:
- SIP signaling (port 5060)
- RTP audio packets (default Asterisk range 10000–20000)
Capture Traffic for One Specific IP
sudo tcpdump -i any -s 0 -w call_ip.pcap host 192.168.1.50
Useful when debugging a single phone or provider.
After capture, download the .pcap file
and open it in Wireshark for deep analysis.
Opening tcpdump Capture in Wireshark
- Open Wireshark
- Click File → Open
- Select the
.pcapfile captured via tcpdump - Apply SIP or RTP display filters
sip
rtp
Now the full call flow becomes visible.
Using Wireshark Telephony Tools to See Call Legs
Wireshark provides powerful telecom-specific analysis under the Telephony menu.
Step-by-Step to View SIP Call Flow
- Open the capture file in Wireshark
- Go to Telephony → VoIP Calls
- Select a call from the list
- Click Flow Sequence
This shows a ladder diagram of:
- INVITE
- Ringing
- 200 OK
- ACK
- BYE
It visually confirms which system ended the call and where failures occurred.
Viewing RTP Streams and Playing Audio
- Go to Telephony → RTP → RTP Streams
- Select an RTP stream
- Click Analyze
- Optionally click Play Streams
This allows you to:
- Confirm audio exists in both directions
- Measure packet loss and jitter
- Listen to the actual captured conversation
If only one RTP stream exists, the issue is almost always NAT or firewall blocking.
Real-World Debugging Workflow (Used by Telecom Engineers)
- Enable Asterisk SIP logger
- If unclear → capture using tcpdump
- Open capture in Wireshark
- Check VoIP Calls ladder
- Verify RTP Streams in both directions
Following this order isolates nearly every SIP or audio issue without guesswork.
Want to see API-driven CRM + Telecom workflows in action? Try the WhatsApp bot or explore the demos.
Comments (0)
Be the first to comment.