paulgorman.org/technical

VoIP Monitoring and Troubleshooting

(August 2017)

Network characteristics that influence call quality:

Different audio codecs tolerate adverse network conditions differently. Explore Opus as a reasonably resilient codec.

RTCP

Tools built into Asterisk

--- gab asterisk $  sudo watch "asterisk -rx 'pjsip show channelstats'"


gab*CLI> pjsip show channelstats 
                                              ...........Receive......... .........Transmit..........
 BridgeId ChannelId ........ UpTime.. Codec.   Count    Lost Pct  Jitter   Count    Lost Pct  Jitter RTT....
 ===========================================================================================================
 0e4eb767 413-00000dfc       00:03:03          8965       0    0   0.000   8959       0    0   0.001 999.999
 0e4eb767 hs_trunk-00000dfd  00:03:03 ulaw     8959       0    0   0.000   8965       0    0   0.000   0.051
 0ea2b02c 302-00000e15       00:01:09          2176       0    0   0.000   3314       5    0   0.000 999.999
 0ea2b02c gm_trunk-00000e13  00:01:10 ulaw     3315       0    0   0.000   3320       0    0   0.000   0.074
 40225210 303-00000e1a       00:00:29           282       0    0   0.000    282       0    0   0.000   0.000
 40225210 bv_trunk-00000e1b  00:00:29 ulaw      282       0    0   0.000    282       0    0   0.000   0.000
 4b98b586 404-00000e05       00:01:35          3501       0    0   0.000   4592    1101   23   0.000 999.999
 4b98b586 hr_trunk-00000e06  00:01:35 ulaw     4593       0    0   0.000   4597       0    0   0.000   0.065
 9c2be061 103-00000e18       00:00:58          2767       0    0   0.000   2764       3    0   0.003 999.999
 9c2be061 mo_trunk-00000e19  00:00:58 ulaw     2764       0    0   0.000   2767       0    0   0.000   0.059
 c3e6aa2f 382-00000db8       00:09:29         28180      81    0   0.000  28253       0    0   0.000 999.999
 c3e6aa2f hv_trunk-00000db9  00:09:28 ulaw    28253       0    0   0.000  28184       0    0   0.000   0.052


gab*CLI> rtcp set debug ip 198.0.107.153
RTCP Debugging Enabled for address: 198.0.107.153:0
gab*CLI>   
[Aug  8 16:27:27] 
[Aug  8 16:27:27] 
[Aug  8 16:27:27] Got RTCP from 198.0.107.153:5990
[Aug  8 16:27:27] PT: 200(Sender Report)
[Aug  8 16:27:27] Reception reports: 1
[Aug  8 16:27:27] SSRC of sender: 610329440
[Aug  8 16:27:27] NTP timestamp: 1502224047.3294507008
[Aug  8 16:27:27] RTP timestamp: 45799360
[Aug  8 16:27:27] SPC: 250      SOC: 40000
[Aug  8 16:27:27] 

iperf

iperf is available in two forked versions: iperf2 and iperf3. Both are good, although they’re not entirely compatible. We’ll use iperf2.

# apt-get install iperf

See IPERF(1).

iperf measure network throughput. It tests either TCP or UDP. To test, establish both a server (to discard traffic) and a client (to generate traffic).