Browse code

rtpengine: consume MOS values reported back by RTP proxy

Richard Fuchs authored on 05/05/2017 13:54:43
Showing 2 changed files
... ...
@@ -650,7 +650,7 @@ modparam("rtpengine", "disabled_col", "disabled_column_name")
650 650
 
651 651
 
652 652
 	<section id="rtpengine.p.setid_default">
653
-		<title><varname>setid_default</varname> (string)</title>
653
+		<title><varname>setid_default</varname> (integer)</title>
654 654
 		<para>
655 655
 			The default set of nodes to be used.
656 656
 		</para>
... ...
@@ -671,9 +671,1274 @@ modparam("rtpengine", "setid_default", 11)
671 671
 		</example>
672 672
 	</section>
673 673
 
674
+
675
+	<section id="rtpengine.p.mos_min_pv">
676
+		<title><varname>mos_min_pv</varname> (string)</title>
677
+		<para>
678
+			The name of a pseudovariable to hold the minimum encountered MOS value for the call.
679
+			The value typically has a range of 1.0 through 5.0.
680
+		</para>
681
+		<para>
682
+			There is no default value.
683
+		</para>
684
+		<para>
685
+			This value is filled in after invoking<quote>rtpengine_delete</quote>,
686
+			<quote>rtpengine_query</quote>, or <quote>rtpengine_manage</quote> if the
687
+			command resulted in a deletion of the call (or call branch).
688
+		</para>
689
+		<example>
690
+		<title>Set <varname>mos_min_pv</varname> parameter</title>
691
+<programlisting format="linespecific">
692
+...
693
+modparam("rtpengine", "mos_min_pv", "$avp(mos_min)")
694
+...
695
+</programlisting>
696
+		</example>
697
+	</section>
698
+
699
+	<section id="rtpengine.p.mos_min_at_pv">
700
+		<title><varname>mos_min_at_pv</varname> (string)</title>
701
+		<para>
702
+			The name of a pseudovariable to hold the timestamp of when the minimum MOS value
703
+			was encountered during the call, such as <quote>0:30</quote> for 30 seconds
704
+			after the start of the call.
705
+		</para>
706
+		<para>
707
+			There is no default value.
708
+		</para>
709
+		<para>
710
+			This value is filled in after invoking <quote>rtpengine_delete</quote>,
711
+			<quote>rtpengine_query</quote>, or <quote>rtpengine_manage</quote> if the
712
+			command resulted in a deletion of the call (or call branch).
713
+		</para>
714
+		<example>
715
+		<title>Set <varname>mos_min_at_pv</varname> parameter</title>
716
+<programlisting format="linespecific">
717
+...
718
+modparam("rtpengine", "mos_min_at_pv", "$avp(mos_min_at)")
719
+...
720
+</programlisting>
721
+		</example>
722
+	</section>
723
+
724
+	<section id="rtpengine.p.mos_min_packetloss_pv">
725
+		<title><varname>mos_min_packetloss_pv</varname> (string)</title>
726
+		<para>
727
+			The name of a pseudovariable to hold the amount of packetloss in percent
728
+			at the time the minimum MOS value was encountered;
729
+		</para>
730
+		<para>
731
+			There is no default value.
732
+		</para>
733
+		<para>
734
+			This value is filled in after invoking <quote>rtpengine_delete</quote>,
735
+			<quote>rtpengine_query</quote>, or <quote>rtpengine_manage</quote> if the
736
+			command resulted in a deletion of the call (or call branch).
737
+		</para>
738
+		<example>
739
+		<title>Set <varname>mos_min_packetloss_pv</varname> parameter</title>
740
+<programlisting format="linespecific">
741
+...
742
+modparam("rtpengine", "mos_min_packetloss_pv", "$avp(mos_min_packetloss)")
743
+...
744
+</programlisting>
745
+		</example>
746
+	</section>
747
+
748
+	<section id="rtpengine.p.mos_min_jitter_pv">
749
+		<title><varname>mos_min_jitter_pv</varname> (string)</title>
750
+		<para>
751
+			The name of a pseudovariable to hold the amount of jitter in milliseconds
752
+			at the time the minimum MOS value was encountered;
753
+		</para>
754
+		<para>
755
+			There is no default value.
756
+		</para>
757
+		<para>
758
+			This value is filled in after invoking <quote>rtpengine_delete</quote>,
759
+			<quote>rtpengine_query</quote>, or <quote>rtpengine_manage</quote> if the
760
+			command resulted in a deletion of the call (or call branch).
761
+		</para>
762
+		<example>
763
+		<title>Set <varname>mos_min_jitter_pv</varname> parameter</title>
764
+<programlisting format="linespecific">
765
+...
766
+modparam("rtpengine", "mos_min_jitter_pv", "$avp(mos_min_jitter)")
767
+...
768
+</programlisting>
769
+		</example>
770
+	</section>
771
+
772
+	<section id="rtpengine.p.mos_min_roundtrip_pv">
773
+		<title><varname>mos_min_roundtrip_pv</varname> (string)</title>
774
+		<para>
775
+			The name of a pseudovariable to hold the packet round-trip time in milliseconds
776
+			at the time the minimum MOS value was encountered;
777
+		</para>
778
+		<para>
779
+			There is no default value.
780
+		</para>
781
+		<para>
782
+			This value is filled in after invoking <quote>rtpengine_delete</quote>,
783
+			<quote>rtpengine_query</quote>, or <quote>rtpengine_manage</quote> if the
784
+			command resulted in a deletion of the call (or call branch).
785
+		</para>
786
+		<example>
787
+		<title>Set <varname>mos_min_roundtrip_pv</varname> parameter</title>
788
+<programlisting format="linespecific">
789
+...
790
+modparam("rtpengine", "mos_min_roundtrip_pv", "$avp(mos_min_roundtrip)")
791
+...
792
+</programlisting>
793
+		</example>
794
+	</section>
795
+
796
+
797
+	<section id="rtpengine.p.mos_max_pv">
798
+		<title><varname>mos_max_pv</varname> (string)</title>
799
+		<para>
800
+			The name of a pseudovariable to hold the maximum encountered MOS value for the call.
801
+			The value typically has a range of 1.0 through 5.0.
802
+		</para>
803
+		<para>
804
+			There is no default value.
805
+		</para>
806
+		<para>
807
+			This value is filled in after invoking<quote>rtpengine_delete</quote>,
808
+			<quote>rtpengine_query</quote>, or <quote>rtpengine_manage</quote> if the
809
+			command resulted in a deletion of the call (or call branch).
810
+		</para>
811
+		<example>
812
+		<title>Set <varname>mos_max_pv</varname> parameter</title>
813
+<programlisting format="linespecific">
814
+...
815
+modparam("rtpengine", "mos_max_pv", "$avp(mos_max)")
816
+...
817
+</programlisting>
818
+		</example>
819
+	</section>
820
+
821
+	<section id="rtpengine.p.mos_max_at_pv">
822
+		<title><varname>mos_max_at_pv</varname> (string)</title>
823
+		<para>
824
+			The name of a pseudovariable to hold the timestamp of when the maximum MOS value
825
+			was encountered during the call, such as <quote>0:30</quote> for 30 seconds
826
+			after the start of the call.
827
+		</para>
828
+		<para>
829
+			There is no default value.
830
+		</para>
831
+		<para>
832
+			This value is filled in after invoking <quote>rtpengine_delete</quote>,
833
+			<quote>rtpengine_query</quote>, or <quote>rtpengine_manage</quote> if the
834
+			command resulted in a deletion of the call (or call branch).
835
+		</para>
836
+		<example>
837
+		<title>Set <varname>mos_max_at_pv</varname> parameter</title>
838
+<programlisting format="linespecific">
839
+...
840
+modparam("rtpengine", "mos_max_at_pv", "$avp(mos_max_at)")
841
+...
842
+</programlisting>
843
+		</example>
844
+	</section>
845
+
846
+	<section id="rtpengine.p.mos_max_packetloss_pv">
847
+		<title><varname>mos_max_packetloss_pv</varname> (string)</title>
848
+		<para>
849
+			The name of a pseudovariable to hold the amount of packetloss in percent
850
+			at the time the maximum MOS value was encountered;
851
+		</para>
852
+		<para>
853
+			There is no default value.
854
+		</para>
855
+		<para>
856
+			This value is filled in after invoking <quote>rtpengine_delete</quote>,
857
+			<quote>rtpengine_query</quote>, or <quote>rtpengine_manage</quote> if the
858
+			command resulted in a deletion of the call (or call branch).
859
+		</para>
860
+		<example>
861
+		<title>Set <varname>mos_max_packetloss_pv</varname> parameter</title>
862
+<programlisting format="linespecific">
863
+...
864
+modparam("rtpengine", "mos_max_packetloss_pv", "$avp(mos_max_packetloss)")
865
+...
866
+</programlisting>
867
+		</example>
868
+	</section>
869
+
870
+	<section id="rtpengine.p.mos_max_jitter_pv">
871
+		<title><varname>mos_max_jitter_pv</varname> (string)</title>
872
+		<para>
873
+			The name of a pseudovariable to hold the amount of jitter in milliseconds
874
+			at the time the maximum MOS value was encountered;
875
+		</para>
876
+		<para>
877
+			There is no default value.
878
+		</para>
879
+		<para>
880
+			This value is filled in after invoking <quote>rtpengine_delete</quote>,
881
+			<quote>rtpengine_query</quote>, or <quote>rtpengine_manage</quote> if the
882
+			command resulted in a deletion of the call (or call branch).
883
+		</para>
884
+		<example>
885
+		<title>Set <varname>mos_max_jitter_pv</varname> parameter</title>
886
+<programlisting format="linespecific">
887
+...
888
+modparam("rtpengine", "mos_max_jitter_pv", "$avp(mos_max_jitter)")
889
+...
890
+</programlisting>
891
+		</example>
892
+	</section>
893
+
894
+	<section id="rtpengine.p.mos_max_roundtrip_pv">
895
+		<title><varname>mos_max_roundtrip_pv</varname> (string)</title>
896
+		<para>
897
+			The name of a pseudovariable to hold the packet round-trip time in milliseconds
898
+			at the time the maximum MOS value was encountered;
899
+		</para>
900
+		<para>
901
+			There is no default value.
902
+		</para>
903
+		<para>
904
+			This value is filled in after invoking <quote>rtpengine_delete</quote>,
905
+			<quote>rtpengine_query</quote>, or <quote>rtpengine_manage</quote> if the
906
+			command resulted in a deletion of the call (or call branch).
907
+		</para>
908
+		<example>
909
+		<title>Set <varname>mos_max_roundtrip_pv</varname> parameter</title>
910
+<programlisting format="linespecific">
911
+...
912
+modparam("rtpengine", "mos_max_roundtrip_pv", "$avp(mos_max_roundtrip)")
913
+...
914
+</programlisting>
915
+		</example>
916
+	</section>
917
+
918
+	<section id="rtpengine.p.mos_average_pv">
919
+		<title><varname>mos_average_pv</varname> (string)</title>
920
+		<para>
921
+			The name of a pseudovariable to hold the average (median) MOS value for the call.
922
+			The value typically has a range of 1.0 through 5.0.
923
+		</para>
924
+		<para>
925
+			There is no default value.
926
+		</para>
927
+		<para>
928
+			This value is filled in after invoking<quote>rtpengine_delete</quote>,
929
+			<quote>rtpengine_query</quote>, or <quote>rtpengine_manage</quote> if the
930
+			command resulted in a deletion of the call (or call branch).
931
+		</para>
932
+		<example>
933
+		<title>Set <varname>mos_average_pv</varname> parameter</title>
934
+<programlisting format="linespecific">
935
+...
936
+modparam("rtpengine", "mos_average_pv", "$avp(mos_average)")
937
+...
938
+</programlisting>
939
+		</example>
940
+	</section>
941
+
942
+	<section id="rtpengine.p.mos_average_packetloss_pv">
943
+		<title><varname>mos_average_packetloss_pv</varname> (string)</title>
944
+		<para>
945
+			The name of a pseudovariable to hold the average (median) amount of packetloss
946
+			in percent
947
+			present throughout the call.
948
+		</para>
949
+		<para>
950
+			There is no default value.
951
+		</para>
952
+		<para>
953
+			This value is filled in after invoking <quote>rtpengine_delete</quote>,
954
+			<quote>rtpengine_query</quote>, or <quote>rtpengine_manage</quote> if the
955
+			command resulted in a deletion of the call (or call branch).
956
+		</para>
957
+		<example>
958
+		<title>Set <varname>mos_average_packetloss_pv</varname> parameter</title>
959
+<programlisting format="linespecific">
960
+...
961
+modparam("rtpengine", "mos_average_packetloss_pv", "$avp(mos_average_packetloss)")
962
+...
963
+</programlisting>
964
+		</example>
965
+	</section>
966
+
967
+	<section id="rtpengine.p.mos_average_jitter_pv">
968
+		<title><varname>mos_average_jitter_pv</varname> (string)</title>
969
+		<para>
970
+			The name of a pseudovariable to hold the average (median) amount of jitter
971
+			in milliseconds
972
+			present throughout the call.
973
+		</para>
974
+		<para>
975
+			There is no default value.
976
+		</para>
977
+		<para>
978
+			This value is filled in after invoking <quote>rtpengine_delete</quote>,
979
+			<quote>rtpengine_query</quote>, or <quote>rtpengine_manage</quote> if the
980
+			command resulted in a deletion of the call (or call branch).
981
+		</para>
982
+		<example>
983
+		<title>Set <varname>mos_average_jitter_pv</varname> parameter</title>
984
+<programlisting format="linespecific">
985
+...
986
+modparam("rtpengine", "mos_average_jitter_pv", "$avp(mos_average_jitter)")
987
+...
988
+</programlisting>
989
+		</example>
990
+	</section>
991
+
992
+	<section id="rtpengine.p.mos_average_roundtrip_pv">
993
+		<title><varname>mos_average_roundtrip_pv</varname> (string)</title>
994
+		<para>
995
+			The name of a pseudovariable to hold the average (median) packet round-trip
996
+			time in milliseconds
997
+			present throughout the call.
998
+		</para>
999
+		<para>
1000
+			There is no default value.
1001
+		</para>
1002
+		<para>
1003
+			This value is filled in after invoking <quote>rtpengine_delete</quote>,
1004
+			<quote>rtpengine_query</quote>, or <quote>rtpengine_manage</quote> if the
1005
+			command resulted in a deletion of the call (or call branch).
1006
+		</para>
1007
+		<example>
1008
+		<title>Set <varname>mos_average_roundtrip_pv</varname> parameter</title>
1009
+<programlisting format="linespecific">
1010
+...
1011
+modparam("rtpengine", "mos_average_roundtrip_pv", "$avp(mos_average_roundtrip)")
1012
+...
1013
+</programlisting>
1014
+		</example>
1015
+	</section>
1016
+
1017
+	<section id="rtpengine.p.mos_average_samples_pv">
1018
+		<title><varname>mos_average_samples_pv</varname> (string)</title>
1019
+		<para>
1020
+			The name of a pseudovariable to hold the number of samples used to determine
1021
+			the other <quote>average</quote> MOS data points.
1022
+		</para>
1023
+		<para>
1024
+			There is no default value.
1025
+		</para>
1026
+		<para>
1027
+			This value is filled in after invoking <quote>rtpengine_delete</quote>,
1028
+			<quote>rtpengine_query</quote>, or <quote>rtpengine_manage</quote> if the
1029
+			command resulted in a deletion of the call (or call branch).
1030
+		</para>
1031
+		<example>
1032
+		<title>Set <varname>mos_average_samples_pv</varname> parameter</title>
1033
+<programlisting format="linespecific">
1034
+...
1035
+modparam("rtpengine", "mos_average_samples_pv", "$avp(mos_average_samples)")
1036
+...
1037
+</programlisting>
1038
+		</example>
1039
+	</section>
1040
+
1041
+
1042
+	<section id="rtpengine.p.mos_A_label_pv">
1043
+		<title><varname>mos_A_label_pv</varname> (string)</title>
1044
+		<para>
1045
+			The name of a pseudovariable to hold a custom label used in rtpengine signalling.
1046
+			If set, all the statistics pseudovariables with the <quote>_A</quote> suffix will
1047
+			be filled in
1048
+			with statistics only from the call legs that match the label given in this
1049
+			variable.
1050
+		</para>
1051
+		<para>
1052
+			There is no default value.
1053
+		</para>
1054
+		<example>
1055
+		<title>Set <varname>mos_A_label_pv</varname> parameter</title>
1056
+<programlisting format="linespecific">
1057
+...
1058
+modparam("rtpengine", "mos_A_label_pv", "$avp(mos_A_label)")
1059
+...
1060
+</programlisting>
1061
+		</example>
1062
+	</section>
1063
+
1064
+
1065
+	<section id="rtpengine.p.mos_min_A_pv">
1066
+		<title><varname>mos_min_A_pv</varname> (string)</title>
1067
+		<para>
1068
+			The name of a pseudovariable to hold the minimum encountered MOS value for the call.
1069
+			The value typically has a range of 1.0 through 5.0.
1070
+		</para>
1071
+		<para>
1072
+			There is no default value.
1073
+		</para>
1074
+		<para>
1075
+			This value is filled in after invoking<quote>rtpengine_delete</quote>,
1076
+			<quote>rtpengine_query</quote>, or <quote>rtpengine_manage</quote> if the
1077
+			command resulted in a deletion of the call (or call branch).
1078
+		</para>
1079
+		<para>
1080
+			Only call legs matching the rtpengine label given in the <quote>mos_A_label_pv</quote>
1081
+			will be used in calculating this statistics value.
1082
+		</para>
1083
+		<example>
1084
+		<title>Set <varname>mos_min_A_pv</varname> parameter</title>
1085
+<programlisting format="linespecific">
1086
+...
1087
+modparam("rtpengine", "mos_min_A_pv", "$avp(mos_min_A)")
1088
+...
1089
+</programlisting>
1090
+		</example>
1091
+	</section>
1092
+
1093
+	<section id="rtpengine.p.mos_min_at_A_pv">
1094
+		<title><varname>mos_min_at_A_pv</varname> (string)</title>
1095
+		<para>
1096
+			The name of a pseudovariable to hold the timestamp of when the minimum MOS value
1097
+			was encountered during the call, such as <quote>0:30</quote> for 30 seconds
1098
+			after the start of the call.
1099
+		</para>
1100
+		<para>
1101
+			There is no default value.
1102
+		</para>
1103
+		<para>
1104
+			This value is filled in after invoking <quote>rtpengine_delete</quote>,
1105
+			<quote>rtpengine_query</quote>, or <quote>rtpengine_manage</quote> if the
1106
+			command resulted in a deletion of the call (or call branch).
1107
+		</para>
1108
+		<para>
1109
+			Only call legs matching the rtpengine label given in the <quote>mos_A_label_pv</quote>
1110
+			will be used in calculating this statistics value.
1111
+		</para>
1112
+		<example>
1113
+		<title>Set <varname>mos_min_at_A_pv</varname> parameter</title>
1114
+<programlisting format="linespecific">
1115
+...
1116
+modparam("rtpengine", "mos_min_at_A_pv", "$avp(mos_min_at_A)")
1117
+...
1118
+</programlisting>
1119
+		</example>
1120
+	</section>
1121
+
1122
+	<section id="rtpengine.p.mos_min_packetloss_A_pv">
1123
+		<title><varname>mos_min_packetloss_A_pv</varname> (string)</title>
1124
+		<para>
1125
+			The name of a pseudovariable to hold the amount of packetloss in percent
1126
+			at the time the minimum MOS value was encountered;
1127
+		</para>
1128
+		<para>
1129
+			There is no default value.
1130
+		</para>
1131
+		<para>
1132
+			This value is filled in after invoking <quote>rtpengine_delete</quote>,
1133
+			<quote>rtpengine_query</quote>, or <quote>rtpengine_manage</quote> if the
1134
+			command resulted in a deletion of the call (or call branch).
1135
+		</para>
1136
+		<para>
1137
+			Only call legs matching the rtpengine label given in the <quote>mos_A_label_pv</quote>
1138
+			will be used in calculating this statistics value.
1139
+		</para>
1140
+		<example>
1141
+		<title>Set <varname>mos_min_packetloss_A_pv</varname> parameter</title>
1142
+<programlisting format="linespecific">
1143
+...
1144
+modparam("rtpengine", "mos_min_packetloss_A_pv", "$avp(mos_min_packetloss_A)")
1145
+...
1146
+</programlisting>
1147
+		</example>
1148
+	</section>
1149
+
1150
+	<section id="rtpengine.p.mos_min_jitter_A_pv">
1151
+		<title><varname>mos_min_jitter_A_pv</varname> (string)</title>
1152
+		<para>
1153
+			The name of a pseudovariable to hold the amount of jitter in milliseconds
1154
+			at the time the minimum MOS value was encountered;
1155
+		</para>
1156
+		<para>
1157
+			There is no default value.
1158
+		</para>
1159
+		<para>
1160
+			This value is filled in after invoking <quote>rtpengine_delete</quote>,
1161
+			<quote>rtpengine_query</quote>, or <quote>rtpengine_manage</quote> if the
1162
+			command resulted in a deletion of the call (or call branch).
1163
+		</para>
1164
+		<para>
1165
+			Only call legs matching the rtpengine label given in the <quote>mos_A_label_pv</quote>
1166
+			will be used in calculating this statistics value.
1167
+		</para>
1168
+		<example>
1169
+		<title>Set <varname>mos_min_jitter_A_pv</varname> parameter</title>
1170
+<programlisting format="linespecific">
1171
+...
1172
+modparam("rtpengine", "mos_min_jitter_A_pv", "$avp(mos_min_jitter_A)")
1173
+...
1174
+</programlisting>
1175
+		</example>
1176
+	</section>
1177
+
1178
+	<section id="rtpengine.p.mos_min_roundtrip_A_pv">
1179
+		<title><varname>mos_min_roundtrip_A_pv</varname> (string)</title>
1180
+		<para>
1181
+			The name of a pseudovariable to hold the packet round-trip time in milliseconds
1182
+			at the time the minimum MOS value was encountered;
1183
+		</para>
1184
+		<para>
1185
+			There is no default value.
1186
+		</para>
1187
+		<para>
1188
+			This value is filled in after invoking <quote>rtpengine_delete</quote>,
1189
+			<quote>rtpengine_query</quote>, or <quote>rtpengine_manage</quote> if the
1190
+			command resulted in a deletion of the call (or call branch).
1191
+		</para>
1192
+		<para>
1193
+			Only call legs matching the rtpengine label given in the <quote>mos_A_label_pv</quote>
1194
+			will be used in calculating this statistics value.
1195
+		</para>
1196
+		<example>
1197
+		<title>Set <varname>mos_min_roundtrip_A_pv</varname> parameter</title>
1198
+<programlisting format="linespecific">
1199
+...
1200
+modparam("rtpengine", "mos_min_roundtrip_A_pv", "$avp(mos_min_roundtrip_A)")
1201
+...
1202
+</programlisting>
1203
+		</example>
1204
+	</section>
1205
+
1206
+
1207
+	<section id="rtpengine.p.mos_max_A_pv">
1208
+		<title><varname>mos_max_A_pv</varname> (string)</title>
1209
+		<para>
1210
+			The name of a pseudovariable to hold the maximum encountered MOS value for the call.
1211
+			The value typically has a range of 1.0 through 5.0.
1212
+		</para>
1213
+		<para>
1214
+			There is no default value.
1215
+		</para>
1216
+		<para>
1217
+			This value is filled in after invoking<quote>rtpengine_delete</quote>,
1218
+			<quote>rtpengine_query</quote>, or <quote>rtpengine_manage</quote> if the
1219
+			command resulted in a deletion of the call (or call branch).
1220
+		</para>
1221
+		<para>
1222
+			Only call legs matching the rtpengine label given in the <quote>mos_A_label_pv</quote>
1223
+			will be used in calculating this statistics value.
1224
+		</para>
1225
+		<example>
1226
+		<title>Set <varname>mos_max_A_pv</varname> parameter</title>
1227
+<programlisting format="linespecific">
1228
+...
1229
+modparam("rtpengine", "mos_max_A_pv", "$avp(mos_max_A)")
1230
+...
1231
+</programlisting>
1232
+		</example>
1233
+	</section>
1234
+
1235
+	<section id="rtpengine.p.mos_max_at_A_pv">
1236
+		<title><varname>mos_max_at_A_pv</varname> (string)</title>
1237
+		<para>
1238
+			The name of a pseudovariable to hold the timestamp of when the maximum MOS value
1239
+			was encountered during the call, such as <quote>0:30</quote> for 30 seconds
1240
+			after the start of the call.
1241
+		</para>
1242
+		<para>
1243
+			There is no default value.
1244
+		</para>
1245
+		<para>
1246
+			This value is filled in after invoking <quote>rtpengine_delete</quote>,
1247
+			<quote>rtpengine_query</quote>, or <quote>rtpengine_manage</quote> if the
1248
+			command resulted in a deletion of the call (or call branch).
1249
+		</para>
1250
+		<para>
1251
+			Only call legs matching the rtpengine label given in the <quote>mos_A_label_pv</quote>
1252
+			will be used in calculating this statistics value.
1253
+		</para>
1254
+		<example>
1255
+		<title>Set <varname>mos_max_at_A_pv</varname> parameter</title>
1256
+<programlisting format="linespecific">
1257
+...
1258
+modparam("rtpengine", "mos_max_at_A_pv", "$avp(mos_max_at_A)")
1259
+...
1260
+</programlisting>
1261
+		</example>
1262
+	</section>
1263
+
1264
+	<section id="rtpengine.p.mos_max_packetloss_A_pv">
1265
+		<title><varname>mos_max_packetloss_A_pv</varname> (string)</title>
1266
+		<para>
1267
+			The name of a pseudovariable to hold the amount of packetloss in percent
1268
+			at the time the maximum 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_max_packetloss_A_pv</varname> parameter</title>
1284
+<programlisting format="linespecific">
1285
+...
1286
+modparam("rtpengine", "mos_max_packetloss_A_pv", "$avp(mos_max_packetloss_A)")
1287
+...
1288
+</programlisting>
1289
+		</example>
1290
+	</section>
1291
+
1292
+	<section id="rtpengine.p.mos_max_jitter_A_pv">
1293
+		<title><varname>mos_max_jitter_A_pv</varname> (string)</title>
1294
+		<para>
1295
+			The name of a pseudovariable to hold the amount of jitter in milliseconds
1296
+			at the time the maximum MOS value was encountered;
1297
+		</para>
1298
+		<para>
1299
+			There is no default value.
1300
+		</para>
1301
+		<para>
1302
+			This value is filled in after invoking <quote>rtpengine_delete</quote>,
1303
+			<quote>rtpengine_query</quote>, or <quote>rtpengine_manage</quote> if the
1304
+			command resulted in a deletion of the call (or call branch).
1305
+		</para>
1306
+		<para>
1307
+			Only call legs matching the rtpengine label given in the <quote>mos_A_label_pv</quote>
1308
+			will be used in calculating this statistics value.
1309
+		</para>
1310
+		<example>
1311
+		<title>Set <varname>mos_max_jitter_A_pv</varname> parameter</title>
1312
+<programlisting format="linespecific">
1313
+...
1314
+modparam("rtpengine", "mos_max_jitter_A_pv", "$avp(mos_max_jitter_A)")
1315
+...
1316
+</programlisting>
1317
+		</example>
1318
+	</section>
1319
+
1320
+	<section id="rtpengine.p.mos_max_roundtrip_A_pv">
1321
+		<title><varname>mos_max_roundtrip_A_pv</varname> (string)</title>
1322
+		<para>
1323
+			The name of a pseudovariable to hold the packet round-trip time in milliseconds
1324
+			at the time the maximum MOS value was encountered;
1325
+		</para>
1326
+		<para>
1327
+			There is no default value.
1328
+		</para>
1329
+		<para>
1330
+			This value is filled in after invoking <quote>rtpengine_delete</quote>,
1331
+			<quote>rtpengine_query</quote>, or <quote>rtpengine_manage</quote> if the
1332
+			command resulted in a deletion of the call (or call branch).
1333
+		</para>
1334
+		<para>
1335
+			Only call legs matching the rtpengine label given in the <quote>mos_A_label_pv</quote>
1336
+			will be used in calculating this statistics value.
1337
+		</para>
1338
+		<example>
1339
+		<title>Set <varname>mos_max_roundtrip_A_pv</varname> parameter</title>
1340
+<programlisting format="linespecific">
1341
+...
1342
+modparam("rtpengine", "mos_max_roundtrip_A_pv", "$avp(mos_max_roundtrip_A)")
1343
+...
1344
+</programlisting>
1345
+		</example>
1346
+	</section>
1347
+
1348
+	<section id="rtpengine.p.mos_average_A_pv">
1349
+		<title><varname>mos_average_A_pv</varname> (string)</title>
1350
+		<para>
1351
+			The name of a pseudovariable to hold the average (median) MOS value for the call.
1352
+			The value typically has a range of 1.0 through 5.0.
1353
+		</para>
1354
+		<para>
1355
+			There is no default value.
1356
+		</para>
1357
+		<para>
1358
+			This value is filled in after invoking<quote>rtpengine_delete</quote>,
1359
+			<quote>rtpengine_query</quote>, or <quote>rtpengine_manage</quote> if the
1360
+			command resulted in a deletion of the call (or call branch).
1361
+		</para>
1362
+		<para>
1363
+			Only call legs matching the rtpengine label given in the <quote>mos_A_label_pv</quote>
1364
+			will be used in calculating this statistics value.
1365
+		</para>
1366
+		<example>
1367
+		<title>Set <varname>mos_average_A_pv</varname> parameter</title>
1368
+<programlisting format="linespecific">
1369
+...
1370
+modparam("rtpengine", "mos_average_A_pv", "$avp(mos_average_A)")
1371
+...
1372
+</programlisting>
1373
+		</example>
1374
+	</section>
1375
+
1376
+	<section id="rtpengine.p.mos_average_packetloss_A_pv">
1377
+		<title><varname>mos_average_packetloss_A_pv</varname> (string)</title>
1378
+		<para>
1379
+			The name of a pseudovariable to hold the average (median) amount of packetloss
1380
+			in percent
1381
+			present throughout the call.
1382
+		</para>
1383
+		<para>
1384
+			There is no default value.
1385
+		</para>
1386
+		<para>
1387
+			This value is filled in after invoking <quote>rtpengine_delete</quote>,
1388
+			<quote>rtpengine_query</quote>, or <quote>rtpengine_manage</quote> if the
1389
+			command resulted in a deletion of the call (or call branch).
1390
+		</para>
1391
+		<para>
1392
+			Only call legs matching the rtpengine label given in the <quote>mos_A_label_pv</quote>
1393
+			will be used in calculating this statistics value.
1394
+		</para>
1395
+		<example>
1396
+		<title>Set <varname>mos_average_packetloss_A_pv</varname> parameter</title>
1397
+<programlisting format="linespecific">
1398
+...
1399
+modparam("rtpengine", "mos_average_packetloss_A_pv", "$avp(mos_average_packetloss_A)")
1400
+...
1401
+</programlisting>
1402
+		</example>
1403
+	</section>
1404
+
1405
+	<section id="rtpengine.p.mos_average_jitter_A_pv">
1406
+		<title><varname>mos_average_jitter_A_pv</varname> (string)</title>
1407
+		<para>
1408
+			The name of a pseudovariable to hold the average (median) amount of jitter
1409
+			in milliseconds
1410
+			present throughout the call.
1411
+		</para>
1412
+		<para>
1413
+			There is no default value.
1414
+		</para>
1415
+		<para>
1416
+			This value is filled in after invoking <quote>rtpengine_delete</quote>,
1417
+			<quote>rtpengine_query</quote>, or <quote>rtpengine_manage</quote> if the
1418
+			command resulted in a deletion of the call (or call branch).
1419
+		</para>
1420
+		<para>
1421
+			Only call legs matching the rtpengine label given in the <quote>mos_A_label_pv</quote>
1422
+			will be used in calculating this statistics value.
1423
+		</para>
1424
+		<example>
1425
+		<title>Set <varname>mos_average_jitter_A_pv</varname> parameter</title>
1426
+<programlisting format="linespecific">
1427
+...
1428
+modparam("rtpengine", "mos_average_jitter_A_pv", "$avp(mos_average_jitter_A)")
1429
+...
1430
+</programlisting>
1431
+		</example>
1432
+	</section>
1433
+
1434
+	<section id="rtpengine.p.mos_average_roundtrip_A_pv">
1435
+		<title><varname>mos_average_roundtrip_A_pv</varname> (string)</title>
1436
+		<para>
1437
+			The name of a pseudovariable to hold the average (median) packet round-trip
1438
+			time in milliseconds
1439
+			present throughout the call.
1440
+		</para>
1441
+		<para>
1442
+			There is no default value.
1443
+		</para>
1444
+		<para>
1445
+			This value is filled in after invoking <quote>rtpengine_delete</quote>,
1446
+			<quote>rtpengine_query</quote>, or <quote>rtpengine_manage</quote> if the
1447
+			command resulted in a deletion of the call (or call branch).
1448
+		</para>
1449
+		<para>
1450
+			Only call legs matching the rtpengine label given in the <quote>mos_A_label_pv</quote>
1451
+			will be used in calculating this statistics value.
1452
+		</para>
1453
+		<example>
1454
+		<title>Set <varname>mos_average_roundtrip_A_pv</varname> parameter</title>
1455
+<programlisting format="linespecific">
1456
+...
1457
+modparam("rtpengine", "mos_average_roundtrip_A_pv", "$avp(mos_average_roundtrip_A)")
1458
+...
1459
+</programlisting>
1460
+		</example>
1461
+	</section>
1462
+
1463
+	<section id="rtpengine.p.mos_average_samples_A_pv">
1464
+		<title><varname>mos_average_samples_A_pv</varname> (string)</title>
1465
+		<para>
1466
+			The name of a pseudovariable to hold the number of samples used to determine
1467
+			the other <quote>average</quote> MOS data points.
1468
+		</para>
1469
+		<para>
1470
+			There is no default value.
1471
+		</para>
1472
+		<para>
1473
+			This value is filled in after invoking <quote>rtpengine_delete</quote>,
1474
+			<quote>rtpengine_query</quote>, or <quote>rtpengine_manage</quote> if the
1475
+			command resulted in a deletion of the call (or call branch).
1476
+		</para>
1477
+		<para>
1478
+			Only call legs matching the rtpengine label given in the <quote>mos_A_label_pv</quote>
1479
+			will be used in calculating this statistics value.
1480
+		</para>
1481
+		<example>
1482
+		<title>Set <varname>mos_average_samples_A_pv</varname> parameter</title>
1483
+<programlisting format="linespecific">
1484
+...
1485
+modparam("rtpengine", "mos_average_samples_A_pv", "$avp(mos_average_samples_A)")
1486
+...
1487
+</programlisting>
1488
+		</example>
1489
+	</section>
1490
+
1491
+
1492
+	<section id="rtpengine.p.mos_B_label_pv">
1493
+		<title><varname>mos_B_label_pv</varname> (string)</title>
1494
+		<para>
1495
+			The name of a pseudovariable to hold a custom label used in rtpengine signalling.
1496
+			If set, all the statistics pseudovariables with the <quote>_B</quote> suffix will
1497
+			be filled in
1498
+			with statistics only from the call legs that match the label given in this
1499
+			variable.
1500
+		</para>
1501
+		<para>
1502
+			There is no default value.
1503
+		</para>
1504
+		<example>
1505
+		<title>Set <varname>mos_B_label_pv</varname> parameter</title>
1506
+<programlisting format="linespecific">
1507
+...
1508
+modparam("rtpengine", "mos_B_label_pv", "$avp(mos_B_label)")
1509
+...
1510
+</programlisting>
1511
+		</example>
1512
+	</section>
1513
+
1514
+
1515
+	<section id="rtpengine.p.mos_min_B_pv">
1516
+		<title><varname>mos_min_B_pv</varname> (string)</title>
1517
+		<para>
1518
+			The name of a pseudovariable to hold the minimum encountered MOS value for the call.
1519
+			The value typically has a range of 1.0 through 5.0.
1520
+		</para>
1521
+		<para>
1522
+			There is no default value.
1523
+		</para>
1524
+		<para>
1525
+			This value is filled in after invoking<quote>rtpengine_delete</quote>,
1526
+			<quote>rtpengine_query</quote>, or <quote>rtpengine_manage</quote> if the
1527
+			command resulted in a deletion of the call (or call branch).
1528
+		</para>
1529
+		<para>
1530
+			Only call legs matching the rtpengine label given in the <quote>mos_B_label_pv</quote>
1531
+			will be used in calculating this statistics value.
1532
+		</para>
1533
+		<example>
1534
+		<title>Set <varname>mos_min_B_pv</varname> parameter</title>
1535
+<programlisting format="linespecific">
1536
+...
1537
+modparam("rtpengine", "mos_min_B_pv", "$avp(mos_min_B)")
1538
+...
1539
+</programlisting>
1540
+		</example>
674 1541
 	</section>
675 1542
 
1543
+	<section id="rtpengine.p.mos_min_at_B_pv">
1544
+		<title><varname>mos_min_at_B_pv</varname> (string)</title>
1545
+		<para>
1546
+			The name of a pseudovariable to hold the timestamp of when the minimum MOS value
1547
+			was encountered during the call, such as <quote>0:30</quote> for 30 seconds
1548
+			after the start of the call.
1549
+		</para>
1550
+		<para>
1551
+			There is no default value.
1552
+		</para>
1553
+		<para>
1554
+			This value is filled in after invoking <quote>rtpengine_delete</quote>,
1555
+			<quote>rtpengine_query</quote>, or <quote>rtpengine_manage</quote> if the
1556
+			command resulted in a deletion of the call (or call branch).
1557
+		</para>
1558
+		<para>
1559
+			Only call legs matching the rtpengine label given in the <quote>mos_B_label_pv</quote>
1560
+			will be used in calculating this statistics value.
1561
+		</para>
1562
+		<example>
1563
+		<title>Set <varname>mos_min_at_B_pv</varname> parameter</title>
1564
+<programlisting format="linespecific">
1565
+...
1566
+modparam("rtpengine", "mos_min_at_B_pv", "$avp(mos_min_at_B)")
1567
+...
1568
+</programlisting>
1569
+		</example>
1570
+	</section>
1571
+
1572
+	<section id="rtpengine.p.mos_min_packetloss_B_pv">
1573
+		<title><varname>mos_min_packetloss_B_pv</varname> (string)</title>
1574
+		<para>
1575
+			The name of a pseudovariable to hold the amount of packetloss in percent
1576
+			at the time the minimum MOS value was encountered;
1577
+		</para>
1578
+		<para>
1579
+			There is no default value.
1580
+		</para>
1581
+		<para>
1582
+			This value is filled in after invoking <quote>rtpengine_delete</quote>,
1583
+			<quote>rtpengine_query</quote>, or <quote>rtpengine_manage</quote> if the
1584
+			command resulted in a deletion of the call (or call branch).
1585
+		</para>
1586
+		<para>
1587
+			Only call legs matching the rtpengine label given in the <quote>mos_B_label_pv</quote>
1588
+			will be used in calculating this statistics value.
1589
+		</para>
1590
+		<example>
1591
+		<title>Set <varname>mos_min_packetloss_B_pv</varname> parameter</title>
1592
+<programlisting format="linespecific">
1593
+...
1594
+modparam("rtpengine", "mos_min_packetloss_B_pv", "$avp(mos_min_packetloss_B)")
1595
+...
1596
+</programlisting>
1597
+		</example>
1598
+	</section>
1599
+
1600
+	<section id="rtpengine.p.mos_min_jitter_B_pv">
1601
+		<title><varname>mos_min_jitter_B_pv</varname> (string)</title>
1602
+		<para>
1603
+			The name of a pseudovariable to hold the amount of jitter in milliseconds
1604
+			at the time the minimum MOS value was encountered;
1605
+		</para>
1606
+		<para>
1607
+			There is no default value.
1608
+		</para>
1609
+		<para>
1610
+			This value is filled in after invoking <quote>rtpengine_delete</quote>,
1611
+			<quote>rtpengine_query</quote>, or <quote>rtpengine_manage</quote> if the
1612
+			command resulted in a deletion of the call (or call branch).
1613
+		</para>
1614
+		<para>
1615
+			Only call legs matching the rtpengine label given in the <quote>mos_B_label_pv</quote>
1616
+			will be used in calculating this statistics value.
1617
+		</para>
1618
+		<example>
1619
+		<title>Set <varname>mos_min_jitter_B_pv</varname> parameter</title>
1620
+<programlisting format="linespecific">
1621
+...
1622
+modparam("rtpengine", "mos_min_jitter_B_pv", "$avp(mos_min_jitter_B)")
1623
+...
1624
+</programlisting>
1625
+		</example>
1626
+	</section>
1627
+
1628
+	<section id="rtpengine.p.mos_min_roundtrip_B_pv">
1629
+		<title><varname>mos_min_roundtrip_B_pv</varname> (string)</title>
1630
+		<para>
1631
+			The name of a pseudovariable to hold the packet round-trip time in milliseconds
1632
+			at the time the minimum MOS value was encountered;
1633
+		</para>
1634
+		<para>
1635
+			There is no default value.
1636
+		</para>
1637
+		<para>
1638
+			This value is filled in after invoking <quote>rtpengine_delete</quote>,
1639
+			<quote>rtpengine_query</quote>, or <quote>rtpengine_manage</quote> if the
1640
+			command resulted in a deletion of the call (or call branch).
1641
+		</para>
1642
+		<para>
1643
+			Only call legs matching the rtpengine label given in the <quote>mos_B_label_pv</quote>
1644
+			will be used in calculating this statistics value.
1645
+		</para>
1646
+		<example>
1647
+		<title>Set <varname>mos_min_roundtrip_B_pv</varname> parameter</title>
1648
+<programlisting format="linespecific">
1649
+...
1650
+modparam("rtpengine", "mos_min_roundtrip_B_pv", "$avp(mos_min_roundtrip_B)")
1651
+...
1652
+</programlisting>
1653
+		</example>
1654
+	</section>
1655
+
1656
+
1657
+	<section id="rtpengine.p.mos_max_B_pv">
1658
+		<title><varname>mos_max_B_pv</varname> (string)</title>
1659
+		<para>
1660
+			The name of a pseudovariable to hold the maximum encountered MOS value for the call.
1661
+			The value typically has a range of 1.0 through 5.0.
1662
+		</para>
1663
+		<para>
1664
+			There is no default value.
1665
+		</para>
1666
+		<para>
1667
+			This value is filled in after invoking<quote>rtpengine_delete</quote>,
1668
+			<quote>rtpengine_query</quote>, or <quote>rtpengine_manage</quote> if the
1669
+			command resulted in a deletion of the call (or call branch).
1670
+		</para>
1671
+		<para>
1672
+			Only call legs matching the rtpengine label given in the <quote>mos_B_label_pv</quote>
1673
+			will be used in calculating this statistics value.
1674
+		</para>
1675
+		<example>
1676
+		<title>Set <varname>mos_max_B_pv</varname> parameter</title>
1677
+<programlisting format="linespecific">
1678
+...
1679
+modparam("rtpengine", "mos_max_B_pv", "$avp(mos_max_B)")
1680
+...
1681
+</programlisting>
1682
+		</example>
1683
+	</section>
1684
+
1685
+	<section id="rtpengine.p.mos_max_at_B_pv">
1686
+		<title><varname>mos_max_at_B_pv</varname> (string)</title>
1687
+		<para>
1688
+			The name of a pseudovariable to hold the timestamp of when the maximum MOS value
1689
+			was encountered during the call, such as <quote>0:30</quote> for 30 seconds
1690
+			after the start of the call.
1691
+		</para>
1692
+		<para>
1693
+			There is no default value.
1694
+		</para>
1695
+		<para>
1696
+			This value is filled in after invoking <quote>rtpengine_delete</quote>,
1697
+			<quote>rtpengine_query</quote>, or <quote>rtpengine_manage</quote> if the
1698
+			command resulted in a deletion of the call (or call branch).
1699
+		</para>
1700
+		<para>
1701
+			Only call legs matching the rtpengine label given in the <quote>mos_B_label_pv</quote>
1702
+			will be used in calculating this statistics value.
1703
+		</para>
1704
+		<example>
1705
+		<title>Set <varname>mos_max_at_B_pv</varname> parameter</title>
1706
+<programlisting format="linespecific">
1707
+...
1708
+modparam("rtpengine", "mos_max_at_B_pv", "$avp(mos_max_at_B)")
1709
+...
1710
+</programlisting>
1711
+		</example>
1712
+	</section>
1713
+
1714
+	<section id="rtpengine.p.mos_max_packetloss_B_pv">
1715
+		<title><varname>mos_max_packetloss_B_pv</varname> (string)</title>
1716
+		<para>
1717
+			The name of a pseudovariable to hold the amount of packetloss in percent
1718
+			at the time the maximum MOS value was encountered;
1719
+		</para>
1720
+		<para>
1721
+			There is no default value.
1722
+		</para>
1723
+		<para>
1724
+			This value is filled in after invoking <quote>rtpengine_delete</quote>,
1725
+			<quote>rtpengine_query</quote>, or <quote>rtpengine_manage</quote> if the
1726
+			command resulted in a deletion of the call (or call branch).
1727
+		</para>
1728
+		<para>
1729
+			Only call legs matching the rtpengine label given in the <quote>mos_B_label_pv</quote>
1730
+			will be used in calculating this statistics value.
1731
+		</para>
1732
+		<example>
1733
+		<title>Set <varname>mos_max_packetloss_B_pv</varname> parameter</title>
1734
+<programlisting format="linespecific">
1735
+...
1736
+modparam("rtpengine", "mos_max_packetloss_B_pv", "$avp(mos_max_packetloss_B)")
1737
+...
1738
+</programlisting>
1739
+		</example>
1740
+	</section>
1741
+
1742
+	<section id="rtpengine.p.mos_max_jitter_B_pv">
1743
+		<title><varname>mos_max_jitter_B_pv</varname> (string)</title>
1744
+		<para>
1745
+			The name of a pseudovariable to hold the amount of jitter in milliseconds
1746
+			at the time the maximum MOS value was encountered;
1747
+		</para>
1748
+		<para>
1749
+			There is no default value.
1750
+		</para>
1751
+		<para>
1752
+			This value is filled in after invoking <quote>rtpengine_delete</quote>,
1753
+			<quote>rtpengine_query</quote>, or <quote>rtpengine_manage</quote> if the
1754
+			command resulted in a deletion of the call (or call branch).
1755
+		</para>
1756
+		<para>
1757
+			Only call legs matching the rtpengine label given in the <quote>mos_B_label_pv</quote>
1758
+			will be used in calculating this statistics value.
1759
+		</para>
1760
+		<example>
1761
+		<title>Set <varname>mos_max_jitter_B_pv</varname> parameter</title>
1762
+<programlisting format="linespecific">
1763
+...
1764
+modparam("rtpengine", "mos_max_jitter_B_pv", "$avp(mos_max_jitter_B)")
1765
+...
1766
+</programlisting>
1767
+		</example>
1768
+	</section>
1769
+
1770
+	<section id="rtpengine.p.mos_max_roundtrip_B_pv">
1771
+		<title><varname>mos_max_roundtrip_B_pv</varname> (string)</title>
1772
+		<para>
1773
+			The name of a pseudovariable to hold the packet round-trip time in milliseconds
1774
+			at the time the maximum MOS value was encountered;
1775
+		</para>
1776
+		<para>
1777
+			There is no default value.
1778
+		</para>
1779
+		<para>
1780
+			This value is filled in after invoking <quote>rtpengine_delete</quote>,
1781
+			<quote>rtpengine_query</quote>, or <quote>rtpengine_manage</quote> if the
1782
+			command resulted in a deletion of the call (or call branch).
1783
+		</para>
1784
+		<para>
1785
+			Only call legs matching the rtpengine label given in the <quote>mos_B_label_pv</quote>
1786
+			will be used in calculating this statistics value.
1787
+		</para>
1788
+		<example>
1789
+		<title>Set <varname>mos_max_roundtrip_B_pv</varname> parameter</title>
1790
+<programlisting format="linespecific">
1791
+...
1792
+modparam("rtpengine", "mos_max_roundtrip_B_pv", "$avp(mos_max_roundtrip_B)")
1793
+...
1794
+</programlisting>
1795
+		</example>
1796
+	</section>
1797
+
1798
+	<section id="rtpengine.p.mos_average_B_pv">
1799
+		<title><varname>mos_average_B_pv</varname> (string)</title>
1800
+		<para>
1801
+			The name of a pseudovariable to hold the average (median) MOS value for the call.
1802
+			The value typically has a range of 1.0 through 5.0.
1803
+		</para>
1804
+		<para>
1805
+			There is no default value.
1806
+		</para>
1807
+		<para>
1808
+			This value is filled in after invoking<quote>rtpengine_delete</quote>,
1809
+			<quote>rtpengine_query</quote>, or <quote>rtpengine_manage</quote> if the
1810
+			command resulted in a deletion of the call (or call branch).
1811
+		</para>
1812
+		<para>
1813
+			Only call legs matching the rtpengine label given in the <quote>mos_B_label_pv</quote>
1814
+			will be used in calculating this statistics value.
1815
+		</para>
1816
+		<example>
1817
+		<title>Set <varname>mos_average_B_pv</varname> parameter</title>
1818
+<programlisting format="linespecific">
1819
+...
1820
+modparam("rtpengine", "mos_average_B_pv", "$avp(mos_average_B)")
1821
+...
1822
+</programlisting>
1823
+		</example>
1824
+	</section>
1825
+
1826
+	<section id="rtpengine.p.mos_average_packetloss_B_pv">
1827
+		<title><varname>mos_average_packetloss_B_pv</varname> (string)</title>
1828
+		<para>
1829
+			The name of a pseudovariable to hold the average (median) amount of packetloss
1830
+			in percent
1831
+			present throughout the call.
1832
+		</para>
1833
+		<para>
1834
+			There is no default value.
1835
+		</para>
1836
+		<para>
1837
+			This value is filled in after invoking <quote>rtpengine_delete</quote>,
1838
+			<quote>rtpengine_query</quote>, or <quote>rtpengine_manage</quote> if the
1839
+			command resulted in a deletion of the call (or call branch).
1840
+		</para>
1841
+		<para>
1842
+			Only call legs matching the rtpengine label given in the <quote>mos_B_label_pv</quote>
1843
+			will be used in calculating this statistics value.
1844
+		</para>
1845
+		<example>
1846
+		<title>Set <varname>mos_average_packetloss_B_pv</varname> parameter</title>
1847
+<programlisting format="linespecific">
1848
+...
1849
+modparam("rtpengine", "mos_average_packetloss_B_pv", "$avp(mos_average_packetloss_B)")
1850
+...
1851
+</programlisting>
1852
+		</example>
1853
+	</section>
1854
+
1855
+	<section id="rtpengine.p.mos_average_jitter_B_pv">
1856
+		<title><varname>mos_average_jitter_B_pv</varname> (string)</title>
1857
+		<para>
1858
+			The name of a pseudovariable to hold the average (median) amount of jitter
1859
+			in milliseconds
1860
+			present throughout the call.
1861
+		</para>
1862
+		<para>
1863
+			There is no default value.
1864
+		</para>
1865
+		<para>
1866
+			This value is filled in after invoking <quote>rtpengine_delete</quote>,
1867
+			<quote>rtpengine_query</quote>, or <quote>rtpengine_manage</quote> if the
1868
+			command resulted in a deletion of the call (or call branch).
1869
+		</para>
1870
+		<para>
1871
+			Only call legs matching the rtpengine label given in the <quote>mos_B_label_pv</quote>
1872
+			will be used in calculating this statistics value.
1873
+		</para>
1874
+		<example>
1875
+		<title>Set <varname>mos_average_jitter_B_pv</varname> parameter</title>
1876
+<programlisting format="linespecific">
1877
+...
1878
+modparam("rtpengine", "mos_average_jitter_B_pv", "$avp(mos_average_jitter_B)")
1879
+...
1880
+</programlisting>
1881
+		</example>
1882
+	</section>
1883
+
1884
+	<section id="rtpengine.p.mos_average_roundtrip_B_pv">
1885
+		<title><varname>mos_average_roundtrip_B_pv</varname> (string)</title>
1886
+		<para>
1887
+			The name of a pseudovariable to hold the average (median) packet round-trip
1888
+			time in milliseconds
1889
+			present throughout the call.
1890
+		</para>
1891
+		<para>
1892
+			There is no default value.
1893
+		</para>
1894
+		<para>
1895
+			This value is filled in after invoking <quote>rtpengine_delete</quote>,
1896
+			<quote>rtpengine_query</quote>, or <quote>rtpengine_manage</quote> if the
1897
+			command resulted in a deletion of the call (or call branch).
1898
+		</para>
1899
+		<para>
1900
+			Only call legs matching the rtpengine label given in the <quote>mos_B_label_pv</quote>
1901
+			will be used in calculating this statistics value.
1902
+		</para>
1903
+		<example>
1904
+		<title>Set <varname>mos_average_roundtrip_B_pv</varname> parameter</title>
1905
+<programlisting format="linespecific">
1906
+...
1907
+modparam("rtpengine", "mos_average_roundtrip_B_pv", "$avp(mos_average_roundtrip_B)")
1908
+...
1909
+</programlisting>
1910
+		</example>
1911
+	</section>
1912
+
1913
+	<section id="rtpengine.p.mos_average_samples_B_pv">
1914
+		<title><varname>mos_average_samples_B_pv</varname> (string)</title>
1915
+		<para>
1916
+			The name of a pseudovariable to hold the number of samples used to determine
1917
+			the other <quote>average</quote> MOS data points.
1918
+		</para>
1919
+		<para>
1920
+			There is no default value.
1921
+		</para>
1922
+		<para>
1923
+			This value is filled in after invoking <quote>rtpengine_delete</quote>,
1924
+			<quote>rtpengine_query</quote>, or <quote>rtpengine_manage</quote> if the
1925
+			command resulted in a deletion of the call (or call branch).
1926
+		</para>
1927
+		<para>
1928
+			Only call legs matching the rtpengine label given in the <quote>mos_B_label_pv</quote>
1929
+			will be used in calculating this statistics value.
1930
+		</para>
1931
+		<example>
1932
+		<title>Set <varname>mos_average_samples_B_pv</varname> parameter</title>
1933
+<programlisting format="linespecific">
1934
+...
1935
+modparam("rtpengine", "mos_average_samples_B_pv", "$avp(mos_average_samples_B)")
1936
+...
1937
+</programlisting>
1938
+		</example>
1939
+	</section>
676 1940
 
1941
+	</section>
677 1942
 
678 1943
 
679 1944
 	<section>
... ...
@@ -1081,6 +2346,7 @@ onreply_route[2]
1081 2346
 		</title>
1082 2347
 		<para>
1083 2348
 		Tears down the RTPProxy session for the current call.
2349
+		This populates the statistics pseudovariables (such <quote>mos_min_pv</quote> etc).
1084 2350
 		</para>
1085 2351
 		<para>
1086 2352
 		See rtpengine_offer() function description above for the meaning of the
... ...
@@ -1095,6 +2361,30 @@ onreply_route[2]
1095 2361
 ...
1096 2362
 rtpengine_delete();
1097 2363
 ...
2364
+</programlisting>
2365
+		</example>
2366
+	</section>
2367
+	<section id="rtpengine.f.rtpengine_query">
2368
+		<title>
2369
+		<function moreinfo="none">rtpengine_query([flags])</function>
2370
+		</title>
2371
+		<para>
2372
+		Queries the &rtp; proxy about the current status and statistics of a running
2373
+		call. This populates the statistics pseudovariables (such <quote>mos_min_pv</quote> etc).
2374
+		</para>
2375
+		<para>
2376
+		See rtpengine_offer() function description above for the meaning of the
2377
+		parameters. Note that not all flags make sense for a <quote>query</quote>.
2378
+		</para>
2379
+		<para>
2380
+		This function can be used from ANY_ROUTE.
2381
+		</para>
2382
+		<example>
2383
+		<title><function>rtpengine_query</function> usage</title>
2384
+		<programlisting format="linespecific">
2385
+...
2386
+rtpengine_query();
2387
+...
1098 2388
 </programlisting>
1099 2389
 		</example>
1100 2390
 	</section>
... ...
@@ -128,6 +128,41 @@ static const char *command_strings[] = {
128 128
 	[OP_PING]		= "ping",
129 129
 };
130 130
 
131
+struct minmax_mos_stats {
132
+	str mos_param;
133
+	str at_param;
134
+	str packetloss_param;
135
+	str jitter_param;
136
+	str roundtrip_param;
137
+	str samples_param;
138
+
139
+	pv_elem_t *mos_pv;
140
+	pv_elem_t *at_pv;
141
+	pv_elem_t *packetloss_pv;
142
+	pv_elem_t *jitter_pv;
143
+	pv_elem_t *roundtrip_pv;
144
+	pv_elem_t *samples_pv;
145
+};
146
+struct minmax_mos_label_stats {
147
+	int got_any_pvs;
148
+
149
+	str label_param;
150
+	pv_elem_t *label_pv;
151
+
152
+	struct minmax_mos_stats min,
153
+				max,
154
+				average;
155
+};
156
+struct minmax_stats_vals {
157
+	long long mos;
158
+	long long at;
159
+	long long packetloss;
160
+	long long jitter;
161
+	long long roundtrip;
162
+	long long samples;
163
+	long long avg_samples; /* our own running count to average the averages */
164
+};
165
+
131 166
 static char *gencookie();
132 167
 static int rtpp_test(struct rtpp_node*, int, int);
133 168
 static int start_recording_f(struct sip_msg *, char *, char *);
... ...
@@ -135,6 +170,7 @@ static int rtpengine_answer1_f(struct sip_msg *, char *, char *);
135 170
 static int rtpengine_offer1_f(struct sip_msg *, char *, char *);
136 171
 static int rtpengine_delete1_f(struct sip_msg *, char *, char *);
137 172
 static int rtpengine_manage1_f(struct sip_msg *, char *, char *);
173
+static int rtpengine_query1_f(struct sip_msg *, char *, char *);
138 174
 
139 175
 static int parse_flags(struct ng_flags_parse *, struct sip_msg *, enum rtpe_operation *, const char *);
140 176
 
... ...
@@ -167,6 +203,9 @@ static int rtpp_test_ping(struct rtpp_node *node);
167 203
 /* Pseudo-Variables */
168 204
 static int pv_get_rtpstat_f(struct sip_msg *, pv_param_t *, pv_value_t *);
169 205
 static int set_rtp_inst_pvar(struct sip_msg *msg, const str * const uri);
206
+static int pv_parse_var(str *inp, pv_elem_t **outp, int *got_any);
207
+static int mos_label_stats_parse(struct minmax_mos_label_stats *mmls);
208
+static void parse_call_stats(bencode_item_t *, struct sip_msg *);
170 209
 
171 210
 static int rtpengine_allow_op = 0;
172 211
 static struct rtpp_node **queried_nodes_ptr = NULL;
... ...
@@ -223,11 +262,16 @@ typedef struct rtpp_set_link {
223 262
 /* tm */
224 263
 static struct tm_binds tmb;
225 264
 
226
-/*0-> disabled, 1 ->enabled*/
227
-unsigned int *natping_state=0;
228
-