[SR-Users] RTPEngine QoS statistics and leg labelling

Alex Balashov abalashov at evaristesys.com
Wed Feb 14 00:16:53 CET 2018


Hello,

I am excited about the new media statistics from RTPEngine, exposed
conveniently into PVs, e.g. jitter, packet loss, MOS, time offset of
lowest and highest MOS scores, etc. Great work!

I am, however, having a bit of trouble understanding how to properly
apply this new functionality, as it is not clearly documented (IMHO):

1. What is the meaning of "global" statistics which do not take into
account an "A" and a "B" side? That is to say, if I have a packet loss
or a jitter or MOS score statistic using just the generic toplevel
values, e.g.

https://kamailio.org/docs/modules/5.1.x/modules/rtpengine.html#rtpengine.p.mos_min_pv

What does that mean? 

A functional call ordinarily consists of an inbound and outbound RTP
stream direction relative to the endpoints on both sides of RTPEngine.

   Inbound A --> server --> Outbound A
   Outbound B <-- server <--- Inbound B

Where do the "global" stats situate themselves in relation to all this?

2. I am given to understand that the statistics for the "A" and "B"
sides of a bidirectional RTP stream can be separated based on an
arbitrary label, using these PVs:

https://kamailio.org/docs/modules/5.1.x/modules/rtpengine.html#rtpengine.p.mos_A_label_pv

https://kamailio.org/docs/modules/5.1.x/modules/rtpengine.html#rtpengine.p.mos_B_label_pv

How do I use it properly?

My intuition was to try something like this:

   rtpengine_offer("replace-origin replace-session-connection ICE=remove label=outbound");

And in the answer/manage handler on the SDP answer:

   rtpengine_answer("replace-origin replace-session-connection ICE=remove label=inbound");

Later, when processing a BYE and obtaining subsequent media statistics,
I tried this:

        if(check_route_param("proxy_media=yes")) {
                $avp(rtpengine_a_label) = 'outbound';
                $avp(rtpengine_b_label) = 'inbound';
                rtpengine_delete();
                route(LOG_RTPENGINE_STATS);
	}

But this only gets me stats for the "A" leg in the JSON object I emit:

{
  "server_addr": "udp:127.0.0.1:5050",
  "a_label": "outbound",
  "b_label": "inbound",
  "a_leg": {
    "min": {
      "mos": "4.4",
      "at": "0:04",
      "packetloss": "0",
      "jitter": "0",
      "roundtrip": 0
    },
    "max": {
      "mos": "4.4",
      "at": "0:04",
      "packetloss": "0",
      "jitter": "0",
      "roundtrip": 0
    },
    "avg": {
      "mos": "4.4",
      "packetloss": "0",
      "jitter": "0",
      "roundtrip": 0,
      "samples": 2
    }
  },
  "b_leg": {
    "min": {
      "mos": "<null>",
      "at": "<null>",
      "packetloss": "<null>",
      "jitter": "<null>"
    },
    "max": {
      "mos": "<null>",
      "at": "<null>",
      "packetloss": "<null>",
      "jitter": "<null>"
    },
    "avg": {
      "mos": "<null>",
      "packetloss": "<null>",
      "jitter": "<null>"
    }
  }
}

I also tried rtpengine_delete("label=inbound") (and outbound) individually.

Some clarity on how this all fits together would be appreciated. :-)
Many thanks to Sipwise for great work on it!

-- Alex

-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/



More information about the sr-users mailing list