Lag time in CLI for IAX channels doesnt seem to be accurate


Hi, I have 2 * boxes linked via an IAX2 trunk. They seem to work fine for the better part but from time to time calls are dropped. What I noticed is the LAG value when doing a IAX2 SHOW CHANNELS command from CLI is off. Both boxes are * 1.0.7 , the interesting part is the * box on the remote side shows Lag of 00000ms while the local side shows Lags of 00020 or more. This lag seems to increase as the call progresses as well.

Here is an example:

pbxCLI> iax2 show channels
Channel Peer Username ID (Lo/Rem) Seq (Tx/Rx) Lag Jitter JitBuf Format
IAX2/trunkmain-peer/1 trunkremote 00001/00002 00162/00163 00027ms 0001ms 0000ms gsm
CLI> exit
Executing last minute cleanups
[root@pbx root]# ping
PING ( 56(84) bytes of data.
64 bytes from icmp_seq=0 ttl=55 time=6.59 ms
64 bytes from icmp_seq=1 ttl=55 time=12.4 ms
64 bytes from icmp_seq=2 ttl=55 time=8.29 ms
64 bytes from icmp_seq=3 ttl=55 time=7.71 ms
64 bytes from icmp_seq=4 ttl=55 time=7.81 ms
64 bytes from icmp_seq=5 ttl=55 time=7.74 ms ping statistics —
6 packets transmitted, 6 received, 0% packet loss, time 5048ms
rtt min/avg/max/mdev = 6.591/8.431/12.430/1.861 ms, pipe 2
[root@pbx root]#

Anyone seen this before? Is there a workaround or fix?


It would be worth having a search around in the asterisk pages for this. I’m not sure where i’ve come across this, but i’ve got some idea that the “lag” time hasn’t got anything to do with network latency, but refers to the time it takes to encode/decode or transcode the audio streams.