[asterisk-bugs] [JIRA] (ASTERISK-29364) res_rtp_asterisk: standard deviation miscalculation

Kevin Harwell (JIRA) noreply at issues.asterisk.org
Mon Mar 22 15:21:15 CDT 2021


Kevin Harwell created ASTERISK-29364:
----------------------------------------

             Summary: res_rtp_asterisk: standard deviation miscalculation 
                 Key: ASTERISK-29364
                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-29364
             Project: Asterisk
          Issue Type: Bug
      Security Level: None
          Components: Resources/res_rtp_asterisk
    Affects Versions: 18.2.2, 16.16.2, GIT
            Reporter: Kevin Harwell


The formula used to calculate standard deviation is not correct, and depending on the input excessively large numbers are seen. For example here's some output after I added the following logging to _calc_rxstamp_:
{noformat}
	ast_log(LOG_VERBOSE, "calc_rxstamp - %f, %f, %f, %u\n",
		rtp->rxjitter, rtp->rtcp->normdev_rxjitter, rtp->rtcp->stdev_rxjitter, rtp->rtcp->rxjitter_count);
{noformat}
{noformat}
calc_rxstamp - 0.000520, 0.000260, 0.000000, 2
calc_rxstamp - 0.000613, 0.000378, 0.000000, 3
calc_rxstamp - 0.000609, 0.000436, 0.000001, 4
calc_rxstamp - 0.000595, 0.000468, 0.000005, 5
calc_rxstamp - 0.000587, 0.000488, 0.000024, 6
calc_rxstamp - 0.000603, 0.000504, 0.000146, 7
calc_rxstamp - 0.000574, 0.000513, 0.001022, 8
calc_rxstamp - 0.000546, 0.000516, 0.008178, 9
calc_rxstamp - 0.000517, 0.000517, 0.073598, 10
calc_rxstamp - 0.000489, 0.000514, 0.735981, 11
calc_rxstamp - 0.000461, 0.000510, 8.095796, 12
calc_rxstamp - 0.000442, 0.000504, 97.149551, 13
calc_rxstamp - 0.000418, 0.000498, 1262.944167, 14
calc_rxstamp - 0.000401, 0.000492, 17681.218343, 15
calc_rxstamp - 0.000405, 0.000486, 265218.275142, 16
calc_rxstamp - 0.000381, 0.000480, 4243492.402266, 17
calc_rxstamp - 0.000370, 0.000474, 72139370.838520, 18
calc_rxstamp - 0.000357, 0.000468, 1298508675.093367, 19
calc_rxstamp - 0.000336, 0.000461, 24671664826.773975, 20
calc_rxstamp - 0.000320, 0.000454, 493433296535.479492, 21
calc_rxstamp - 0.000301, 0.000447, 10362099227245.070312, 22
calc_rxstamp - 0.000285, 0.000440, 227966182999391.562500, 23
calc_rxstamp - 0.000270, 0.000433, 5243222208986006.000000, 24
calc_rxstamp - 0.000258, 0.000426, 125837333015664144.000000, 25
calc_rxstamp - 0.000289, 0.000421, 3145933325391603712.000000, 26
calc_rxstamp - 0.000284, 0.000416, 81794266460181692416.000000, 27
calc_rxstamp - 0.000284, 0.000411, 2208445194424905629696.000000, 28
calc_rxstamp - 0.000314, 0.000408, 61836465443897356582912.000000, 29
calc_rxstamp - 0.000352, 0.000406, 1793257497873023248629760.000000, 30
{noformat}
Similar output can be seen after hanging up a call when the following is in the dialplan:
{noformat}
exten => h,1,NoOp()
	same => n,Log(NOTICE, ${CHANNEL(rtcp,all_jitter)})
	same => n,Log(NOTICE, ${CHANNEL(rtcp,all_rtt)})
{noformat}
{noformat}
[Mar 22 15:20:35] NOTICE[36116][C-00000001]: Ext. h:2 @ default:  minrxjitter=0.000584;maxrxjitter=0.007450;avgrxjitter=0.003584;stdevrxjitter=106709037996391588652335043005039379128254464.000000;reported_minjitter=11.000000;reported_maxjitter=11.000000;reported_avgjitter=11.000000;reported_stdevjitter=11.000000;
[Mar 22 15:20:35] NOTICE[36116][C-00000001]: Ext. h:3 @ default:  minrtt=0.000000;maxrtt=0.000000;avgrtt=0.000000;stdevrtt=0.000000;
{noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list