Browse code

rtpengine: query rtt per call leg (#2576)

Co-authored-by: Julien Chavanton <jchavanton@subspace.com>

Julien Chavanton authored on 07/12/2020 13:26:19 • GitHub committed on 07/12/2020 13:26:19
Showing 2 changed files
... ...
@@ -830,7 +830,7 @@ modparam("rtpengine", "mos_min_jitter_pv", "$avp(mos_min_jitter)")
830 830
 	<section id="rtpengine.p.mos_min_roundtrip_pv">
831 831
 		<title><varname>mos_min_roundtrip_pv</varname> (string)</title>
832 832
 		<para>
833
-			The name of a pseudovariable to hold the packet round-trip time in milliseconds
833
+			The name of a pseudovariable to hold the packet round-trip time in microseconds
834 834
 			at the time the minimum MOS value was encountered;
835 835
 		</para>
836 836
 		<para>
... ...
@@ -952,7 +952,7 @@ modparam("rtpengine", "mos_max_jitter_pv", "$avp(mos_max_jitter)")
952 952
 	<section id="rtpengine.p.mos_max_roundtrip_pv">
953 953
 		<title><varname>mos_max_roundtrip_pv</varname> (string)</title>
954 954
 		<para>
955
-			The name of a pseudovariable to hold the packet round-trip time in milliseconds
955
+			The name of a pseudovariable to hold the packet round-trip time in microseconds
956 956
 			at the time the maximum MOS value was encountered;
957 957
 		</para>
958 958
 		<para>
... ...
@@ -1236,7 +1236,7 @@ modparam("rtpengine", "mos_min_jitter_A_pv", "$avp(mos_min_jitter_A)")
1236 1236
 	<section id="rtpengine.p.mos_min_roundtrip_A_pv">
1237 1237
 		<title><varname>mos_min_roundtrip_A_pv</varname> (string)</title>
1238 1238
 		<para>
1239
-			The name of a pseudovariable to hold the packet round-trip time in milliseconds
1239
+			The name of a pseudovariable to hold the packet round-trip time in microseconds
1240 1240
 			at the time the minimum MOS value was encountered;
1241 1241
 		</para>
1242 1242
 		<para>
... ...
@@ -1261,6 +1261,33 @@ modparam("rtpengine", "mos_min_roundtrip_A_pv", "$avp(mos_min_roundtrip_A)")
1261 1261
 		</example>
1262 1262
 	</section>
1263 1263
 
1264
+	<section id="rtpengine.p.mos_min_roundtrip_leg_A_pv">
1265
+		<title><varname>mos_min_roundtrip_leg_A_pv</varname> (string)</title>
1266
+		<para>
1267
+			The name of a pseudovariable to hold the packet round-trip time of the specific call leg
1268
+			in microseconds at the time the minimum MOS value was encountered;
1269
+		</para>
1270
+		<para>
1271
+			There is no default value.
1272
+		</para>
1273
+		<para>
1274
+			This value is filled in after invoking <quote>rtpengine_delete</quote>,
1275
+			<quote>rtpengine_query</quote>, or <quote>rtpengine_manage</quote> if the
1276
+			command resulted in a deletion of the call (or call branch).
1277
+		</para>
1278
+		<para>
1279
+			Only call legs matching the rtpengine label given in the <quote>mos_A_label_pv</quote>
1280
+			will be used in calculating this statistics value.
1281
+		</para>
1282
+		<example>
1283
+		<title>Set <varname>mos_min_roundtrip_leg_A_pv</varname> parameter</title>
1284
+<programlisting format="linespecific">
1285
+...
1286
+modparam("rtpengine", "mos_min_roundtrip_leg_A_pv", "$avp(mos_min_roundtrip_leg_A)")
1287
+...
1288
+</programlisting>
1289
+		</example>
1290
+	</section>
1264 1291
 
1265 1292
 	<section id="rtpengine.p.mos_max_A_pv">
1266 1293
 		<title><varname>mos_max_A_pv</varname> (string)</title>
... ...
@@ -1378,7 +1405,7 @@ modparam("rtpengine", "mos_max_jitter_A_pv", "$avp(mos_max_jitter_A)")
1378 1405
 	<section id="rtpengine.p.mos_max_roundtrip_A_pv">
1379 1406
 		<title><varname>mos_max_roundtrip_A_pv</varname> (string)</title>
1380 1407
 		<para>
1381
-			The name of a pseudovariable to hold the packet round-trip time in milliseconds
1408
+			The name of a pseudovariable to hold the packet round-trip time in microseconds
1382 1409
 			at the time the maximum MOS value was encountered;
1383 1410
 		</para>
1384 1411
 		<para>
... ...
@@ -1403,6 +1430,34 @@ modparam("rtpengine", "mos_max_roundtrip_A_pv", "$avp(mos_max_roundtrip_A)")
1403 1430
 		</example>
1404 1431
 	</section>
1405 1432
 
1433
+	<section id="rtpengine.p.mos_max_roundtrip_leg_A_pv">
1434
+		<title><varname>mos_max_roundtrip_leg_A_pv</varname> (string)</title>
1435
+		<para>
1436
+			The name of a pseudovariable to hold the packet round-trip time of the specific
1437
+			call leg in microseconds at the time the maximum MOS value was encountered;
1438
+		</para>
1439
+		<para>
1440
+			There is no default value.
1441
+		</para>
1442
+		<para>
1443
+			This value is filled in after invoking <quote>rtpengine_delete</quote>,
1444
+			<quote>rtpengine_query</quote>, or <quote>rtpengine_manage</quote> if the
1445
+			command resulted in a deletion of the call (or call branch).
1446
+		</para>
1447
+		<para>
1448
+			Only call legs matching the rtpengine label given in the <quote>mos_A_label_pv</quote>
1449
+			will be used in calculating this statistics value.
1450
+		</para>
1451
+		<example>
1452
+		<title>Set <varname>mos_max_roundtrip_leg_A_pv</varname> parameter</title>
1453
+<programlisting format="linespecific">
1454
+...
1455
+modparam("rtpengine", "mos_max_roundtrip_leg_A_pv", "$avp(mos_max_roundtrip_leg_A)")
1456
+...
1457
+</programlisting>
1458
+		</example>
1459
+	</section>
1460
+
1406 1461
 	<section id="rtpengine.p.mos_average_A_pv">
1407 1462
 		<title><varname>mos_average_A_pv</varname> (string)</title>
1408 1463
 		<para>
... ...
@@ -1493,8 +1548,7 @@ modparam("rtpengine", "mos_average_jitter_A_pv", "$avp(mos_average_jitter_A)")
1493 1548
 		<title><varname>mos_average_roundtrip_A_pv</varname> (string)</title>
1494 1549
 		<para>
1495 1550
 			The name of a pseudovariable to hold the average (median) packet round-trip
1496
-			time in milliseconds
1497
-			present throughout the call.
1551
+			time in microseconds present throughout the call.
1498 1552
 		</para>
1499 1553
 		<para>
1500 1554
 			There is no default value.
... ...
@@ -1518,6 +1572,34 @@ modparam("rtpengine", "mos_average_roundtrip_A_pv", "$avp(mos_average_roundtrip_
1518 1572
 		</example>
1519 1573
 	</section>
1520 1574
 
1575
+	<section id="rtpengine.p.mos_average_roundtrip_leg_A_pv">
1576
+		<title><varname>mos_average_roundtrip_leg_A_pv</varname> (string)</title>
1577
+		<para>
1578
+			The name of a pseudovariable to hold the average (median) packet round-trip
1579
+			time of the specific call leg in microseconds present throughout the call.
1580
+		</para>
1581
+		<para>
1582
+			There is no default value.
1583
+		</para>
1584
+		<para>
1585
+			This value is filled in after invoking <quote>rtpengine_delete</quote>,
1586
+			<quote>rtpengine_query</quote>, or <quote>rtpengine_manage</quote> if the
1587
+			command resulted in a deletion of the call (or call branch).
1588
+		</para>
1589
+		<para>
1590
+			Only call legs matching the rtpengine label given in the <quote>mos_A_label_pv</quote>
1591
+			will be used in calculating this statistics value.
1592
+		</para>
1593
+		<example>
1594
+		<title>Set <varname>mos_average_roundtrip_leg_A_pv</varname> parameter</title>
1595
+<programlisting format="linespecific">
1596
+...
1597
+modparam("rtpengine", "mos_average_roundtrip_leg_A_pv", "$avp(mos_average_roundtrip_leg_A)")
1598
+...
1599
+</programlisting>
1600
+		</example>
1601
+	</section>
1602
+
1521 1603
 	<section id="rtpengine.p.mos_average_samples_A_pv">
1522 1604
 		<title><varname>mos_average_samples_A_pv</varname> (string)</title>
1523 1605
 		<para>
... ...
@@ -1686,7 +1768,7 @@ modparam("rtpengine", "mos_min_jitter_B_pv", "$avp(mos_min_jitter_B)")
1686 1768
 	<section id="rtpengine.p.mos_min_roundtrip_B_pv">
1687 1769
 		<title><varname>mos_min_roundtrip_B_pv</varname> (string)</title>
1688 1770
 		<para>
1689
-			The name of a pseudovariable to hold the packet round-trip time in milliseconds
1771
+			The name of a pseudovariable to hold the packet round-trip time in microseconds
1690 1772
 			at the time the minimum MOS value was encountered;
1691 1773
 		</para>
1692 1774
 		<para>
... ...
@@ -1711,6 +1793,34 @@ modparam("rtpengine", "mos_min_roundtrip_B_pv", "$avp(mos_min_roundtrip_B)")
1711 1793
 		</example>
1712 1794
 	</section>
1713 1795
 
1796
+	<section id="rtpengine.p.mos_min_roundtrip_leg_B_pv">
1797
+		<title><varname>mos_min_roundtrip_leg_B_pv</varname> (string)</title>
1798
+		<para>
1799
+			The name of a pseudovariable to hold the packet round-trip time of the specific call leg
1800
+			in microseconds at the time the minimum MOS value was encountered;
1801
+		</para>
1802
+		<para>
1803
+			There is no default value.
1804
+		</para>
1805
+		<para>
1806
+			This value is filled in after invoking <quote>rtpengine_delete</quote>,
1807
+			<quote>rtpengine_query</quote>, or <quote>rtpengine_manage</quote> if the
1808
+			command resulted in a deletion of the call (or call branch).
1809
+		</para>
1810
+		<para>
1811
+			Only call legs matching the rtpengine label given in the <quote>mos_B_label_pv</quote>
1812
+			will be used in calculating this statistics value.
1813
+		</para>
1814
+		<example>
1815
+		<title>Set <varname>mos_min_roundtrip_leg_B_pv</varname> parameter</title>
1816
+<programlisting format="linespecific">
1817
+...
1818
+modparam("rtpengine", "mos_min_roundtrip_leg_B_pv", "$avp(mos_min_roundtrip_leg_B)")
1819
+...
1820
+</programlisting>
1821
+		</example>
1822
+	</section>
1823
+
1714 1824
 
1715 1825
 	<section id="rtpengine.p.mos_max_B_pv">
1716 1826
 		<title><varname>mos_max_B_pv</varname> (string)</title>
... ...
@@ -1828,7 +1938,7 @@ modparam("rtpengine", "mos_max_jitter_B_pv", "$avp(mos_max_jitter_B)")
1828 1938
 	<section id="rtpengine.p.mos_max_roundtrip_B_pv">
1829 1939
 		<title><varname>mos_max_roundtrip_B_pv</varname> (string)</title>
1830 1940
 		<para>
1831
-			The name of a pseudovariable to hold the packet round-trip time in milliseconds
1941
+			The name of a pseudovariable to hold the packet round-trip time in microseconds
1832 1942
 			at the time the maximum MOS value was encountered;
1833 1943
 		</para>
1834 1944
 		<para>
... ...
@@ -1853,6 +1963,34 @@ modparam("rtpengine", "mos_max_roundtrip_B_pv", "$avp(mos_max_roundtrip_B)")
1853 1963
 		</example>
1854 1964
 	</section>
1855 1965
 
1966
+	<section id="rtpengine.p.mos_max_roundtrip_leg_B_pv">
1967
+		<title><varname>mos_max_roundtrip_leg_B_pv</varname> (string)</title>
1968
+		<para>
1969
+			The name of a pseudovariable to hold the packet round-trip time of the specific
1970
+			call leg in microseconds at the time the maximum MOS value was encountered;
1971
+		</para>
1972
+		<para>
1973
+			There is no default value.
1974
+		</para>
1975
+		<para>
1976
+			This value is filled in after invoking <quote>rtpengine_delete</quote>,
1977
+			<quote>rtpengine_query</quote>, or <quote>rtpengine_manage</quote> if the
1978
+			command resulted in a deletion of the call (or call branch).
1979
+		</para>
1980
+		<para>
1981
+			Only call legs matching the rtpengine label given in the <quote>mos_A_label_pv</quote>
1982
+			will be used in calculating this statistics value.
1983
+		</para>
1984
+		<example>
1985
+		<title>Set <varname>mos_max_roundtrip_leg_B_pv</varname> parameter</title>
1986
+<programlisting format="linespecific">
1987
+...
1988
+modparam("rtpengine", "mos_max_roundtrip_leg_B_pv", "$avp(mos_max_roundtrip_leg_B)")
1989
+...
1990
+</programlisting>
1991
+		</example>
1992
+	</section>
1993
+
1856 1994
 	<section id="rtpengine.p.mos_average_B_pv">
1857 1995
 		<title><varname>mos_average_B_pv</varname> (string)</title>
1858 1996
 		<para>
... ...
@@ -1943,8 +2081,7 @@ modparam("rtpengine", "mos_average_jitter_B_pv", "$avp(mos_average_jitter_B)")
1943 2081
 		<title><varname>mos_average_roundtrip_B_pv</varname> (string)</title>
1944 2082
 		<para>
1945 2083
 			The name of a pseudovariable to hold the average (median) packet round-trip
1946
-			time in milliseconds
1947
-			present throughout the call.
2084
+			time in microseconds present throughout the call.
1948 2085
 		</para>
1949 2086
 		<para>
1950 2087
 			There is no default value.
... ...
@@ -1968,6 +2105,34 @@ modparam("rtpengine", "mos_average_roundtrip_B_pv", "$avp(mos_average_roundtrip_
1968 2105
 		</example>
1969 2106
 	</section>
1970 2107
 
2108
+	<section id="rtpengine.p.mos_average_roundtrip_leg_B_pv">
2109
+		<title><varname>mos_average_roundtrip_leg_B_pv</varname> (string)</title>
2110
+		<para>
2111
+			The name of a pseudovariable to hold the average (median) packet round-trip
2112
+			time of the specific call leg in microseconds present throughout the call.
2113
+		</para>
2114
+		<para>
2115
+			There is no default value.
2116
+		</para>
2117
+		<para>
2118
+			This value is filled in after invoking <quote>rtpengine_delete</quote>,
2119
+			<quote>rtpengine_query</quote>, or <quote>rtpengine_manage</quote> if the
2120
+			command resulted in a deletion of the call (or call branch).
2121
+		</para>
2122
+		<para>
2123
+			Only call legs matching the rtpengine label given in the <quote>mos_B_label_pv</quote>
2124
+			will be used in calculating this statistics value.
2125
+		</para>
2126
+		<example>
2127
+		<title>Set <varname>mos_average_roundtrip_leg_B_pv</varname> parameter</title>
2128
+<programlisting format="linespecific">
2129
+...
2130
+modparam("rtpengine", "mos_average_roundtrip_leg_B_pv", "$avp(mos_average_roundtrip_leg_B)")
2131
+...
2132
+</programlisting>
2133
+		</example>
2134
+	</section>
2135
+
1971 2136
 	<section id="rtpengine.p.mos_average_samples_B_pv">
1972 2137
 		<title><varname>mos_average_samples_B_pv</varname> (string)</title>
1973 2138
 		<para>
... ...
@@ -149,6 +149,7 @@ struct minmax_mos_stats {
149 149
 	str packetloss_param;
150 150
 	str jitter_param;
151 151
 	str roundtrip_param;
152
+	str roundtrip_leg_param;
152 153
 	str samples_param;
153 154
 
154 155
 	pv_elem_t *mos_pv;
... ...
@@ -156,6 +157,7 @@ struct minmax_mos_stats {
156 157
 	pv_elem_t *packetloss_pv;
157 158
 	pv_elem_t *jitter_pv;
158 159
 	pv_elem_t *roundtrip_pv;
160
+	pv_elem_t *roundtrip_leg_pv;
159 161
 	pv_elem_t *samples_pv;
160 162
 };
161 163
 struct minmax_mos_label_stats {
... ...
@@ -174,6 +176,7 @@ struct minmax_stats_vals {
174 176
 	long long packetloss;
175 177
 	long long jitter;
176 178
 	long long roundtrip;
179
+	long long roundtrip_leg;
177 180
 	long long samples;
178 181
 	long long avg_samples; /* our own running count to average the averages */
179 182
 };
... ...
@@ -463,15 +466,18 @@ static param_export_t params[] = {
463 466
 	{"mos_min_packetloss_pv",     PARAM_STR, &global_mos_stats.min.packetloss_param      },
464 467
 	{"mos_min_jitter_pv",         PARAM_STR, &global_mos_stats.min.jitter_param          },
465 468
 	{"mos_min_roundtrip_pv",      PARAM_STR, &global_mos_stats.min.roundtrip_param       },
469
+	{"mos_min_roundtrip_leg_pv",  PARAM_STR, &global_mos_stats.min.roundtrip_leg_param   },
466 470
 	{"mos_max_pv",                PARAM_STR, &global_mos_stats.max.mos_param             },
467 471
 	{"mos_max_at_pv",             PARAM_STR, &global_mos_stats.max.at_param              },
468 472
 	{"mos_max_packetloss_pv",     PARAM_STR, &global_mos_stats.max.packetloss_param      },
469 473
 	{"mos_max_jitter_pv",         PARAM_STR, &global_mos_stats.max.jitter_param          },
470 474
 	{"mos_max_roundtrip_pv",      PARAM_STR, &global_mos_stats.max.roundtrip_param       },
475
+	{"mos_max_roundtrip_leg_pv",  PARAM_STR, &global_mos_stats.max.roundtrip_leg_param   },
471 476
 	{"mos_average_pv",            PARAM_STR, &global_mos_stats.average.mos_param         },
472 477
 	{"mos_average_packetloss_pv", PARAM_STR, &global_mos_stats.average.packetloss_param  },
473 478
 	{"mos_average_jitter_pv",     PARAM_STR, &global_mos_stats.average.jitter_param      },
474 479
 	{"mos_average_roundtrip_pv",  PARAM_STR, &global_mos_stats.average.roundtrip_param   },
480
+	{"mos_average_roundtrip_leg_pv", PARAM_STR, &global_mos_stats.average.roundtrip_leg_param },
475 481
 	{"mos_average_samples_pv",    PARAM_STR, &global_mos_stats.average.samples_param     },
476 482
 
477 483
 	/* designated side A */
... ...
@@ -481,15 +487,18 @@ static param_export_t params[] = {
481 487
 	{"mos_min_packetloss_A_pv",     PARAM_STR, &side_A_mos_stats.min.packetloss_param      },
482 488
 	{"mos_min_jitter_A_pv",         PARAM_STR, &side_A_mos_stats.min.jitter_param          },
483 489
 	{"mos_min_roundtrip_A_pv",      PARAM_STR, &side_A_mos_stats.min.roundtrip_param       },
490
+	{"mos_min_roundtrip_leg_A_pv",  PARAM_STR, &side_A_mos_stats.min.roundtrip_leg_param   },
484 491
 	{"mos_max_A_pv",                PARAM_STR, &side_A_mos_stats.max.mos_param             },
485 492
 	{"mos_max_at_A_pv",             PARAM_STR, &side_A_mos_stats.max.at_param              },
486 493
 	{"mos_max_packetloss_A_pv",     PARAM_STR, &side_A_mos_stats.max.packetloss_param      },
487 494
 	{"mos_max_jitter_A_pv",         PARAM_STR, &side_A_mos_stats.max.jitter_param          },
488 495
 	{"mos_max_roundtrip_A_pv",      PARAM_STR, &side_A_mos_stats.max.roundtrip_param       },
496
+	{"mos_max_roundtrip_leg_A_pv",  PARAM_STR, &side_A_mos_stats.max.roundtrip_leg_param   },
489 497
 	{"mos_average_A_pv",            PARAM_STR, &side_A_mos_stats.average.mos_param         },
490 498
 	{"mos_average_packetloss_A_pv", PARAM_STR, &side_A_mos_stats.average.packetloss_param  },
491 499
 	{"mos_average_jitter_A_pv",     PARAM_STR, &side_A_mos_stats.average.jitter_param      },
492 500
 	{"mos_average_roundtrip_A_pv",  PARAM_STR, &side_A_mos_stats.average.roundtrip_param   },
501
+	{"mos_average_roundtrip_leg_A_pv",  PARAM_STR, &side_A_mos_stats.average.roundtrip_leg_param },
493 502
 	{"mos_average_samples_A_pv",    PARAM_STR, &side_A_mos_stats.average.samples_param     },
494 503
 
495 504
 	/* designated side B */
... ...
@@ -499,15 +508,18 @@ static param_export_t params[] = {
499 508
 	{"mos_min_packetloss_B_pv",     PARAM_STR, &side_B_mos_stats.min.packetloss_param      },
500 509
 	{"mos_min_jitter_B_pv",         PARAM_STR, &side_B_mos_stats.min.jitter_param          },
501 510
 	{"mos_min_roundtrip_B_pv",      PARAM_STR, &side_B_mos_stats.min.roundtrip_param       },
511
+	{"mos_min_roundtrip_B_pv",      PARAM_STR, &side_B_mos_stats.min.roundtrip_param       },
502 512
 	{"mos_max_B_pv",                PARAM_STR, &side_B_mos_stats.max.mos_param             },
503 513
 	{"mos_max_at_B_pv",             PARAM_STR, &side_B_mos_stats.max.at_param              },
504 514
 	{"mos_max_packetloss_B_pv",     PARAM_STR, &side_B_mos_stats.max.packetloss_param      },
505 515
 	{"mos_max_jitter_B_pv",         PARAM_STR, &side_B_mos_stats.max.jitter_param          },
506 516
 	{"mos_max_roundtrip_B_pv",      PARAM_STR, &side_B_mos_stats.max.roundtrip_param       },
517
+	{"mos_max_roundtrip_leg_B_pv",  PARAM_STR, &side_B_mos_stats.max.roundtrip_leg_param   },
507 518
 	{"mos_average_B_pv",            PARAM_STR, &side_B_mos_stats.average.mos_param         },
508 519
 	{"mos_average_packetloss_B_pv", PARAM_STR, &side_B_mos_stats.average.packetloss_param  },
509 520
 	{"mos_average_jitter_B_pv",     PARAM_STR, &side_B_mos_stats.average.jitter_param      },
510 521
 	{"mos_average_roundtrip_B_pv",  PARAM_STR, &side_B_mos_stats.average.roundtrip_param   },
522
+	{"mos_average_roundtrip_leg_B_pv",  PARAM_STR, &side_B_mos_stats.average.roundtrip_leg_param },
511 523
 	{"mos_average_samples_B_pv",    PARAM_STR, &side_B_mos_stats.average.samples_param     },
512 524
 
513 525
 	{0, 0, 0}
... ...
@@ -1925,6 +1937,8 @@ static int minmax_pv_parse(struct minmax_mos_stats *s, int *got_any) {
1925 1937
 		return -1;
1926 1938
 	if (pv_parse_var(&s->roundtrip_param, &s->roundtrip_pv, got_any))
1927 1939
 		return -1;
1940
+	if (pv_parse_var(&s->roundtrip_leg_param, &s->roundtrip_leg_pv, got_any))
1941
+		return -1;
1928 1942
 	if (pv_parse_var(&s->samples_param, &s->samples_pv, got_any))
1929 1943
 		return -1;
1930 1944
 	return 0;
... ...
@@ -3272,6 +3286,7 @@ static void avp_print_mos(struct minmax_mos_stats *s, struct minmax_stats_vals *
3272 3286
 	avp_print_int(s->packetloss_pv, vals->packetloss / vals->avg_samples, msg);
3273 3287
 	avp_print_int(s->jitter_pv, vals->jitter / vals->avg_samples, msg);
3274 3288
 	avp_print_int(s->roundtrip_pv, vals->roundtrip / vals->avg_samples, msg);
3289
+	avp_print_int(s->roundtrip_leg_pv, vals->roundtrip_leg / vals->avg_samples, msg);
3275 3290
 	avp_print_int(s->samples_pv, vals->samples / vals->avg_samples, msg);
3276 3291
 }
3277 3292
 
... ...
@@ -3287,6 +3302,7 @@ static int decode_mos_vals_dict(struct minmax_stats_vals *vals, bencode_item_t *
3287 3302
 	vals->packetloss = bencode_dictionary_get_integer(mos_ent, "packet loss", -1);
3288 3303
 	vals->jitter = bencode_dictionary_get_integer(mos_ent, "jitter", -1);
3289 3304
 	vals->roundtrip = bencode_dictionary_get_integer(mos_ent, "round-trip time", -1);
3305
+	vals->roundtrip_leg = bencode_dictionary_get_integer(mos_ent, "round-trip time leg", -1);
3290 3306
 	vals->samples = bencode_dictionary_get_integer(mos_ent, "samples", -1);
3291 3307
 	vals->avg_samples = 1;
3292 3308
 
... ...
@@ -3416,6 +3432,7 @@ ssrc_ok:
3416 3432
 			average_vals.packetloss += vals_decoded.packetloss;
3417 3433
 			average_vals.jitter += vals_decoded.jitter;
3418 3434
 			average_vals.roundtrip += vals_decoded.roundtrip;
3435
+			average_vals.roundtrip_leg += vals_decoded.roundtrip_leg;
3419 3436
 			average_vals.samples += vals_decoded.samples;
3420 3437
 		}
3421 3438