[OpenSIPS-Users] rtpstats for $ft and $tt

Răzvan Crainea razvan at opensips.org
Thu Feb 13 07:51:39 UTC 2025


Hi, Alberto!

Can you please also print the $rtpequery [1] and check if you have a 
JSON available? Also, are you calling these prints after the BYE is 
processed (by loose_route/match_dialog), or are you expecting them 
during other in-dialog requests?

[1] https://opensips.org/docs/modules/3.4.x/rtpengine#pv_rtpstat

Best regards,

Răzvan Crainea
OpenSIPS Core Developer / SIPhub CTO
http://www.opensips-solutions.com / https://www.siphub.com

On 2/11/25 6:10 PM, Alberto wrote:
> Hi all,
> 
> Another day, another question.
> I'm trying to get separate stats from rtpengine for the inbound and
> outbound legs.
> 
> I use opensips 3.4.8 and rtpengine 12.5.1.20
> 
> I call on rtpengine like this:
> 
> rtpengine_manage("RTP/AVP generate-rtcp trust-address replace-origin
> replace-session-connection");
> 
> Then I also have this:
> 
>   274       xlog("L_NOTICE", "[ln $cfg_line] rtpstat: $rtpstat\n");
>   275       xlog("L_NOTICE", "[ln $cfg_line] rtpstat(MOS-average):
> $rtpstat(MOS-average)\n");
>   276       xlog("L_NOTICE", "[ln $cfg_line] (rtpstat(MOS-average)[$ft]):
> $(rtpstat(MOS-average)[$ft])\n");
>   277       xlog("L_NOTICE", "[ln $cfg_line] (rtpstat(MOS-average)[$tt]):
> $(rtpstat(MOS-average)[$tt])\n");
>   278       xlog("L_NOTICE", "[ln $cfg_line] rtpstat(jitter-average):
> $rtpstat(jitter-average)\n");
>   279       xlog("L_NOTICE", "[ln $cfg_line] (rtpstat(jitter-average)[$ft]):
> $(rtpstat(jitter-average)[$ft])\n");
>   280       xlog("L_NOTICE", "[ln $cfg_line] (rtpstat(jitter-average)[$tt]):
> $(rtpstat(jitter-average)[$tt])\n");
>   281       xlog("L_NOTICE", "[ln $cfg_line] rtpstat(roundtrip-average):
> $rtpstat(roundtrip-average)\n");
>   282       xlog("L_NOTICE", "[ln $cfg_line]
> (rtpstat(roundtrip-average)[$ft]): $(rtpstat(roundtrip-average)[$ft])\n");
>   283       xlog("L_NOTICE", "[ln $cfg_line]
> (rtpstat(roundtrip-average)[$tt]): $(rtpstat(roundtrip-average)[$tt])\n");
>   284       xlog("L_NOTICE", "[ln $cfg_line] rtpstat(packetloss-average):
> $rtpstat(packetloss-average)\n");
>   285       xlog("L_NOTICE", "[ln $cfg_line]
> (rtpstat(packetloss-average)[$ft]): $(rtpstat(packetloss-average)[$ft])\n");
>   286       xlog("L_NOTICE", "[ln $cfg_line]
> (rtpstat(packetloss-average)[$tt]): $(rtpstat(packetloss-average)[$tt])\n");
> 
> 
> But the output is as follow:
> 
> Feb 11 15:56:15 test-sbc01 opensips[383682]: Feb 11 15:56:14 [383682]
> NOTICE:[ln 274] rtpstat: RTP: 1428288 bytes, 8304 packets, 0 errors; RTCP:
> 20560 bytes, 188 packets, 0 errors
> Feb 11 15:56:15 test-sbc01 opensips[383682]: Feb 11 15:56:14 [383682]
> NOTICE:[ln 275] rtpstat(MOS-average): 43
> Feb 11 15:56:15 test-sbc01 opensips[383682]: Feb 11 15:56:14 [383682]
> NOTICE:[ln 276]
> (rtpstat(MOS-average)[4bd58220-a450-41fb-8eea-77e3cdd6950a]): <null>
> Feb 11 15:56:15 test-sbc01 opensips[383682]: Feb 11 15:56:14 [383682]
> NOTICE:[ln 277] (rtpstat(MOS-average)[Qr8FX3QU0B70S]): <null>
> Feb 11 15:56:15 test-sbc01 opensips[383682]: Feb 11 15:56:14 [383682]
> NOTICE:[ln 278] rtpstat(jitter-average): 0
> Feb 11 15:56:15 test-sbc01 opensips[383682]: Feb 11 15:56:14 [383682]
> NOTICE:[ln 279]
> (rtpstat(jitter-average)[4bd58220-a450-41fb-8eea-77e3cdd6950a]): <null>
> Feb 11 15:56:15 test-sbc01 opensips[383682]: Feb 11 15:56:14 [383682]
> NOTICE:[ln 280] (rtpstat(jitter-average)[Qr8FX3QU0B70S]): <null>
> Feb 11 15:56:15 test-sbc01 opensips[383682]: Feb 11 15:56:14 [383682]
> NOTICE:[ln 281] rtpstat(roundtrip-average): 14683
> Feb 11 15:56:15 test-sbc01 opensips[383682]: Feb 11 15:56:14 [383682]
> NOTICE:[ln 282]
> (rtpstat(roundtrip-average)[4bd58220-a450-41fb-8eea-77e3cdd6950a]): <null>
> Feb 11 15:56:15 test-sbc01 opensips[383682]: Feb 11 15:56:14 [383682]
> NOTICE:[ln 283] (rtpstat(roundtrip-average)[Qr8FX3QU0B70S]): <null>
> Feb 11 15:56:15 test-sbc01 opensips[383682]: Feb 11 15:56:14 [383682]
> NOTICE:[ln 284] rtpstat(packetloss-average): 0
> Feb 11 15:56:15 test-sbc01 opensips[383682]: Feb 11 15:56:14 [383682]
> NOTICE:[ln 285]
> (rtpstat(packetloss-average)[4bd58220-a450-41fb-8eea-77e3cdd6950a]): <null>
> Feb 11 15:56:15 test-sbc01 opensips[383682]: Feb 11 15:56:14 [383682]
> NOTICE:[ln 286] (rtpstat(packetloss-average)[Qr8FX3QU0B70S]): <null>
> 
> Is there anything else I have to do to make this work?
> 
> Thanks
> 
> 
> Hi all,
> 
> Another day, another question.
> I'm trying to get separate stats from rtpengine for the inbound and 
> outbound legs.
> 
> I use opensips 3.4.8 and rtpengine 12.5.1.20
> 
> I call on rtpengine like this:
> 
> rtpengine_manage("RTP/AVP generate-rtcp trust-address replace-origin 
> replace-session-connection");
> 
> Then I also have this:
> 
>   274       xlog("L_NOTICE", "[ln $cfg_line] rtpstat: $rtpstat\n");
>   275       xlog("L_NOTICE", "[ln $cfg_line] rtpstat(MOS-average): 
> $rtpstat(MOS-average)\n");
>   276       xlog("L_NOTICE", "[ln $cfg_line] (rtpstat(MOS-average) 
> [$ft]): $(rtpstat(MOS-average)[$ft])\n");
>   277       xlog("L_NOTICE", "[ln $cfg_line] (rtpstat(MOS-average) 
> [$tt]): $(rtpstat(MOS-average)[$tt])\n");
>   278       xlog("L_NOTICE", "[ln $cfg_line] rtpstat(jitter-average): 
> $rtpstat(jitter-average)\n");
>   279       xlog("L_NOTICE", "[ln $cfg_line] (rtpstat(jitter-average) 
> [$ft]): $(rtpstat(jitter-average)[$ft])\n");
>   280       xlog("L_NOTICE", "[ln $cfg_line] (rtpstat(jitter-average) 
> [$tt]): $(rtpstat(jitter-average)[$tt])\n");
>   281       xlog("L_NOTICE", "[ln $cfg_line] rtpstat(roundtrip-average): 
> $rtpstat(roundtrip-average)\n");
>   282       xlog("L_NOTICE", "[ln $cfg_line] (rtpstat(roundtrip-average) 
> [$ft]): $(rtpstat(roundtrip-average)[$ft])\n");
>   283       xlog("L_NOTICE", "[ln $cfg_line] (rtpstat(roundtrip-average) 
> [$tt]): $(rtpstat(roundtrip-average)[$tt])\n");
>   284       xlog("L_NOTICE", "[ln $cfg_line] rtpstat(packetloss- 
> average): $rtpstat(packetloss-average)\n");
>   285       xlog("L_NOTICE", "[ln $cfg_line] (rtpstat(packetloss- 
> average)[$ft]): $(rtpstat(packetloss-average)[$ft])\n");
>   286       xlog("L_NOTICE", "[ln $cfg_line] (rtpstat(packetloss- 
> average)[$tt]): $(rtpstat(packetloss-average)[$tt])\n");
> 
> 
> But the output is as follow:
> 
> Feb 11 15:56:15 test-sbc01 opensips[383682]: Feb 11 15:56:14 [383682] 
> NOTICE:[ln 274] rtpstat: RTP: 1428288 bytes, 8304 packets, 0 errors; 
> RTCP: 20560 bytes, 188 packets, 0 errors
> Feb 11 15:56:15 test-sbc01 opensips[383682]: Feb 11 15:56:14 [383682] 
> NOTICE:[ln 275] rtpstat(MOS-average): 43
> Feb 11 15:56:15 test-sbc01 opensips[383682]: Feb 11 15:56:14 [383682] 
> NOTICE:[ln 276] (rtpstat(MOS-average)[4bd58220- 
> a450-41fb-8eea-77e3cdd6950a]): <null>
> Feb 11 15:56:15 test-sbc01 opensips[383682]: Feb 11 15:56:14 [383682] 
> NOTICE:[ln 277] (rtpstat(MOS-average)[Qr8FX3QU0B70S]): <null>
> Feb 11 15:56:15 test-sbc01 opensips[383682]: Feb 11 15:56:14 [383682] 
> NOTICE:[ln 278] rtpstat(jitter-average): 0
> Feb 11 15:56:15 test-sbc01 opensips[383682]: Feb 11 15:56:14 [383682] 
> NOTICE:[ln 279] (rtpstat(jitter-average)[4bd58220- 
> a450-41fb-8eea-77e3cdd6950a]): <null>
> Feb 11 15:56:15 test-sbc01 opensips[383682]: Feb 11 15:56:14 [383682] 
> NOTICE:[ln 280] (rtpstat(jitter-average)[Qr8FX3QU0B70S]): <null>
> Feb 11 15:56:15 test-sbc01 opensips[383682]: Feb 11 15:56:14 [383682] 
> NOTICE:[ln 281] rtpstat(roundtrip-average): 14683
> Feb 11 15:56:15 test-sbc01 opensips[383682]: Feb 11 15:56:14 [383682] 
> NOTICE:[ln 282] (rtpstat(roundtrip-average)[4bd58220- 
> a450-41fb-8eea-77e3cdd6950a]): <null>
> Feb 11 15:56:15 test-sbc01 opensips[383682]: Feb 11 15:56:14 [383682] 
> NOTICE:[ln 283] (rtpstat(roundtrip-average)[Qr8FX3QU0B70S]): <null>
> Feb 11 15:56:15 test-sbc01 opensips[383682]: Feb 11 15:56:14 [383682] 
> NOTICE:[ln 284] rtpstat(packetloss-average): 0
> Feb 11 15:56:15 test-sbc01 opensips[383682]: Feb 11 15:56:14 [383682] 
> NOTICE:[ln 285] (rtpstat(packetloss-average)[4bd58220- 
> a450-41fb-8eea-77e3cdd6950a]): <null>
> Feb 11 15:56:15 test-sbc01 opensips[383682]: Feb 11 15:56:14 [383682] 
> NOTICE:[ln 286] (rtpstat(packetloss-average)[Qr8FX3QU0B70S]): <null>
> 
> Is there anything else I have to do to make this work?
> 
> Thanks
> 
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users




More information about the Users mailing list