Answer the question
In order to leave comments, you need to log in
How to correctly calculate the quality of communication?
I found an article on Habré https://habr.com/ru/post/317746/
Interested in the mechanics / method of calculating the quality of communication.
According to the article, on the knee, using the formula R = 100 - (RTT / 10 + 2 * MaxLostPackets)
, I learned something like this
public function onRTCPReceived(EventMessage $event)
{
$channel = $event->getKey("Channel");
if (!preg_match("/PJSIP\/\d+/s", $channel)) {
return;
}
$this->channels[$channel] = [
"From" => $event->getKey("From"),
"Exten" => $event->getKey("Exten"),
"SentPackets" => $event->getKey("SentPackets"),
"SentOctets" => $event->getKey("SentOctets"),
"Report0CumulativeLost" => $event->getKey("Report0CumulativeLost"),
"RTT" => $event->getKey("RTT")
];
// R = 100 - (RTT / 10 + 2 * MaxLostPackets)
$this->table->setRows([]);
$this->table->setHeaders([
"Канал", "Качество"
]);
foreach ($this->channels as $key => $item) {
$r = 100 - ($item["RTT"] / 10+2* $item["Report0CumulativeLost"]);
$this->table->addRow([
$key, $r
]);
}
$this->output->write(sprintf("\033\143"));
$this->table->render();
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question