]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
res_rtp_asterisk.c: Correct coefficient in MOS calculation.
authorromryz <51915794+romryz@users.noreply.github.com>
Tue, 6 Feb 2024 13:57:32 +0000 (15:57 +0200)
committerromryz <51915794+romryz@users.noreply.github.com>
Wed, 14 Feb 2024 15:05:37 +0000 (15:05 +0000)
Media Experience Score relies on incorrect pseudo_mos variable
calculation. According to forming an opinion section of the
documentation, calculation relies on ITU-T G.107 standard:

    https://docs.asterisk.org/Deployment/Media-Experience-Score/#forming-an-opinion

ITU-T G.107 Annex B suggests to calculate MOS with a coefficient
"seven times ten to the power of negative six", 7 * 10^(-6). which
would mean 6 digits after the decimal point. Current implementation
has 7 digits after the decimal point, which downrates the calls.

Fixes: #597
res/res_rtp_asterisk.c

index c8af3c376350f6525fd6990f4d2b37ce2f4a7936..a309c3317dd651fccd5c5e7aa957e5e46434449d 100644 (file)
@@ -6240,7 +6240,7 @@ static double calc_media_experience_score(struct ast_rtp_instance *instance,
        } else if (r_value > 100) {
                pseudo_mos = 4.5;
        } else {
-               pseudo_mos = 1 + (0.035 * r_value) + (r_value * (r_value - 60) * (100 - r_value) * 0.0000007);
+               pseudo_mos = 1 + (0.035 * r_value) + (r_value * (r_value - 60) * (100 - r_value) * 0.000007);
        }
 
        /*