[asterisk-dev] [IAX] Need for LAGRQ and LAGRP

Matthew Jordan mjordan at digium.com
Tue Mar 10 14:39:26 CDT 2015


On Mon, Mar 9, 2015 at 5:03 PM, Yousf Ateya <y.ateya at starkbits.com> wrote:
> While browsing some pcap captures of IAX channel, I found many LAGRQ and
> LAGRP packets (once per 10 seconds for each call).
>
> So, I traced LAGRQ and LAGRP use in code and found that it is almost
> useless; it sets iaxs[fr->callno]->lag which is not used anywhere else.
>
> Almost same functionality (calculate lag) can be achieved using PING/PONG.
>
> Is it left for RFC-compatability only? Or there something I didn't notice?
>

Quoting from the IAX2 RFC:

6.7.4 LAGRQ Lag Request Message

   A LAGRQ is a lag request.  It is sent to determine the lag between
   two IAX endpoints, including the amount of time used to process a
   frame through a jitter buffer (if any).  It requires a clock-based
   time-stamp, and MUST be answered with a LAGRP, which MUST echo the
   LAGRQ's time-stamp.  The lag between the two peers can be computed on
   the peer sending the LAGRQ by comparing the time-stamp of the LAGRQ
   and the time the LAGRP was received.

   This message does not require any IEs.

Note that this is similar to PING/POKEs, except that it is used
explicitly to measure the time between request/response *including*
the time it takes for a frame to traverse a jitter buffer. That isn't
exactly the same as the PING/POKE functionality, which is more about
reachability (and the time to reach the endpoint) then it is about
media quality.

That being said, you are correct that nothing currently uses that
value. It is simply stored on the pvt and updated when a LAGRP is
received for a transmitted LAGRQ.

Theoretically, something could report on the quality of the call using
the lag value (in a manner similar to RTCP call quality statistics),
but it does not appear as if that was ever done.

-- 
Matthew Jordan
Digium, Inc. | Director of Technology
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org



More information about the asterisk-dev mailing list