<!-- Kamailio Pull Request Template -->
<!--
IMPORTANT:
- for detailed contributing guidelines, read:
https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md
- pull requests must be done to master branch, unless they are backports
of fixes from master branch to a stable branch
- backports to stable branches must be done with 'git cherry-pick -x ...'
- code is contributed under BSD for core and main components (tm, sl, auth, tls)
- code is contributed GPLv2 or a compatible license for the other components
- GPL code is contributed with OpenSSL licensing exception
-->
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [*] Commit message has the format required by CONTRIBUTING guide
- [*] Commits are split per component (core, individual modules, libs, utils, ...)
- [*] Each component has a single commit (if not, squash them into one commit)
- [*] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [*] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [*] PR should be backported to stable branches
- [*] Tested changes locally
- [*] Related to issue #4232
#### Description
not all versions of rtpengine sends a key SSRC per stream. For those that do not the same information can be found in ingress SSRCs. Add logic to check for the SSRC value there if the SSRC key is not present.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4233
-- Commit Summary --
* rtpengine: improve compatibility of rtpengine per call leg stats parsing
-- File Changes --
M src/modules/rtpengine/rtpengine.c (19)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4233.patchhttps://github.com/kamailio/kamailio/pull/4233.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4233
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4233(a)github.com>
tsearle created an issue (kamailio/kamailio#4232)
### Description
For getting A and B leg QoS stats, Kamailio expects there to be a SSRC key inside the Stream object.
However some versions of rtpengine (tested with mr13.3.1.1) do not send this key. Looking at the master version of rtpengine, I see this key has been added to correspond to ingress SSRCs[0].
This patch adds a checking ingress SSRCs[0] as a fallback if SSRC
### Troubleshooting
#### Reproduction
use kamailio 6.0.1 and rtpengine mr13.3.1.1 using baresip as the calling and called party
the following in the kamailio.cfg
```
modparam("rtpengine", "mos_A_label_pv", "$avp(mos_A_label)")
#The name of a pseudovariable to hold the minimum encountered MOS value for the call. The value typically has a range of 1.0 through 5.0.
modparam("rtpengine", "mos_min_A_pv", "$avp(mos_min_mos_A)")
#The name of a pseudovariable to hold the amount of packetloss in percent at the time the minimum MOS value was encountered;
modparam("rtpengine", "mos_min_packetloss_A_pv", "$avp(mos_min_packetloss_A)")
#The name of a pseudovariable to hold the amount of jitter in milliseconds at the time the minimum MOS value was encountered;
modparam("rtpengine", "mos_min_jitter_A_pv", "$avp(mos_min_jitter_A)")
#The name of a pseudovariable to hold the packet round-trip time in microseconds at the time the minimum MOS value was encountered;
modparam("rtpengine", "mos_min_roundtrip_A_pv", "$avp(mos_min_roundtrip_A)")
#The name of a pseudovariable to hold the maximum encountered MOS value for the call. The value typically has a range of 1.0 through 5.0.
modparam("rtpengine", "mos_max_A_pv", "$avp(mos_max_mos_A)")
#The name of a pseudovariable to hold the amount of packetloss in percent at the time the maximum MOS value was encountered;
modparam("rtpengine", "mos_max_packetloss_A_pv", "$avp(mos_max_packetloss_A)")
#The name of a pseudovariable to hold the amount of jitter in milliseconds at the time the maximum MOS value was encountered;
modparam("rtpengine", "mos_max_jitter_A_pv", "$avp(mos_max_jitter_A)")
#The name of a pseudovariable to hold the packet round-trip time in microseconds at the time the maximum MOS value was encountered;
modparam("rtpengine", "mos_max_roundtrip_A_pv", "$avp(mos_max_roundtrip_A)")
#The name of a pseudovariable to hold the average (median) MOS value for the call. The value typically has a range of 1.0 through 5.0.
modparam("rtpengine", "mos_average_A_pv", "$avp(mos_average_mos_A)")
#The name of a pseudovariable to hold the average (median) amount of packetloss in percent present throughout the call.
modparam("rtpengine", "mos_average_packetloss_A_pv", "$avp(mos_average_packetloss_A)")
#The name of a pseudovariable to hold the average (median) amount of jitter in milliseconds present throughout the call.
modparam("rtpengine", "mos_average_jitter_A_pv", "$avp(mos_average_jitter_A)")
#The name of a pseudovariable to hold the average (median) packet round-trip time in microseconds present throughout the call.
modparam("rtpengine", "mos_average_roundtrip_A_pv", "$avp(mos_average_roundtrip_A)")
modparam("rtpengine", "mos_B_label_pv", "$avp(mos_B_label)")
#The name of a pseudovariable to hold the minimum encountered MOS value for the call. The value typically has a range of 1.0 through 5.0.
modparam("rtpengine", "mos_min_B_pv", "$avp(mos_min_mos_B)")
#The name of a pseudovariable to hold the amount of packetloss in percent at the time the minimum MOS value was encountered;
modparam("rtpengine", "mos_min_packetloss_B_pv", "$avp(mos_min_packetloss_B)")
#The name of a pseudovariable to hold the amount of jitter in milliseconds at the time the minimum MOS value was encountered;
modparam("rtpengine", "mos_min_jitter_B_pv", "$avp(mos_min_jitter_B)")
#The name of a pseudovariable to hold the packet round-trip time in microseconds at the time the minimum MOS value was encountered;
modparam("rtpengine", "mos_min_roundtrip_B_pv", "$avp(mos_min_roundtrip_B)")
#The name of a pseudovariable to hold the maximum encountered MOS value for the call. The value typically has a range of 1.0 through 5.0.
modparam("rtpengine", "mos_max_B_pv", "$avp(mos_max_mos_B)")
#The name of a pseudovariable to hold the amount of packetloss in percent at the time the maximum MOS value was encountered;
modparam("rtpengine", "mos_max_packetloss_B_pv", "$avp(mos_max_packetloss_B)")
#The name of a pseudovariable to hold the amount of jitter in milliseconds at the time the maximum MOS value was encountered;
modparam("rtpengine", "mos_max_jitter_B_pv", "$avp(mos_max_jitter_B)")
#The name of a pseudovariable to hold the packet round-trip time in microseconds at the time the maximum MOS value was encountered;
modparam("rtpengine", "mos_max_roundtrip_B_pv", "$avp(mos_max_roundtrip_B)")
#The name of a pseudovariable to hold the average (median) MOS value for the call. The value typically has a range of 1.0 through 5.0.
modparam("rtpengine", "mos_average_B_pv", "$avp(mos_average_mos_B)")
#The name of a pseudovariable to hold the average (median) amount of packetloss in percent present throughout the call.
modparam("rtpengine", "mos_average_packetloss_B_pv", "$avp(mos_average_packetloss_B)")
#The name of a pseudovariable to hold the average (median) amount of jitter in milliseconds present throughout the call.
modparam("rtpengine", "mos_average_jitter_B_pv", "$avp(mos_average_jitter_B)")
#The name of a pseudovariable to hold the average (median) packet round-trip time in microseconds present throughout the call.
modparam("rtpengine", "mos_average_roundtrip_B_pv", "$avp(mos_average_roundtrip_B)")
```
#### Debugging Data
<!--
If you got a core dump, use gdb to extract troubleshooting data - full backtrace,
local variables and the list of the code at the issue location.
gdb /path/to/kamailio /path/to/corefile
bt full
info locals
list
If you are familiar with gdb, feel free to attach more of what you consider to
be relevant.
-->
```
(paste your debugging data here)
```
#### Log Messages
```
May 07 06:12:56 tst-ec1-blue-app-116 /usr/sbin/kamailio[3299]: { "level": "DEBUG", "module": "rtpengine", "file": "rtpengine.c", "line": 3684, "function": "rtpp_function_call", "callid": "3df537fef966eb1a", "logprefix": "{BYE <null> 10.152.8.37 3df537fef966eb1a } ", "message": "rtpengine hash table remove entry for callen=16 callid=3df537fef966eb1a viabranch=" }
May 07 06:12:56 tst-ec1-blue-app-116 /usr/sbin/kamailio[3299]: { "level": "DEBUG", "module": "rtpengine", "file": "rtpengine.c", "line": 4508, "function": "parse_call_stats_1", "callid": "3df537fef966eb1a", "logprefix": "{BYE <null> 10.152.8.37 3df537fef966eb1a } ", "message": "rtpengine: looking for label 'Aleg_label'" }
May 07 06:12:56 tst-ec1-blue-app-116 /usr/sbin/kamailio[3299]: { "level": "DEBUG", "module": "rtpengine", "file": "rtpengine.c", "line": 4514, "function": "parse_call_stats_1", "callid": "3df537fef966eb1a", "logprefix": "{BYE <null> 10.152.8.37 3df537fef966eb1a } ", "message": "rtpengine: XXX got tags" }
May 07 06:12:56 tst-ec1-blue-app-116 /usr/sbin/kamailio[3299]: { "level": "DEBUG", "module": "rtpengine", "file": "rtpengine.c", "line": 4517, "function": "parse_call_stats_1", "callid": "3df537fef966eb1a", "logprefix": "{BYE <null> 10.152.8.37 3df537fef966eb1a } ", "message": "rtpengine: XXX got tag" }
May 07 06:12:56 tst-ec1-blue-app-116 /usr/sbin/kamailio[3299]: { "level": "DEBUG", "module": "rtpengine", "file": "rtpengine.c", "line": 4522, "function": "parse_call_stats_1", "callid": "3df537fef966eb1a", "logprefix": "{BYE <null> 10.152.8.37 3df537fef966eb1a } ", "message": "rtpengine: XXX got label Aleg_label" }
May 07 06:12:56 tst-ec1-blue-app-116 /usr/sbin/kamailio[3299]: { "level": "DEBUG", "module": "rtpengine", "file": "rtpengine.c", "line": 4525, "function": "parse_call_stats_1", "callid": "3df537fef966eb1a", "logprefix": "{BYE <null> 10.152.8.37 3df537fef966eb1a } ", "message": "rtpengine: XXX label match" }
May 07 06:12:56 tst-ec1-blue-app-116 /usr/sbin/kamailio[3299]: { "level": "DEBUG", "module": "rtpengine", "file": "rtpengine.c", "line": 4530, "function": "parse_call_stats_1", "callid": "3df537fef966eb1a", "logprefix": "{BYE <null> 10.152.8.37 3df537fef966eb1a } ", "message": "rtpengine: XXX got medias" }
May 07 06:12:56 tst-ec1-blue-app-116 /usr/sbin/kamailio[3299]: { "level": "DEBUG", "module": "rtpengine", "file": "rtpengine.c", "line": 4532, "function": "parse_call_stats_1", "callid": "3df537fef966eb1a", "logprefix": "{BYE <null> 10.152.8.37 3df537fef966eb1a } ", "message": "rtpengine: XXX got media" }
May 07 06:12:56 tst-ec1-blue-app-116 /usr/sbin/kamailio[3299]: { "level": "DEBUG", "module": "rtpengine", "file": "rtpengine.c", "line": 4537, "function": "parse_call_stats_1", "callid": "3df537fef966eb1a", "logprefix": "{BYE <null> 10.152.8.37 3df537fef966eb1a } ", "message": "rtpengine: XXX got streams" }
May 07 06:12:56 tst-ec1-blue-app-116 /usr/sbin/kamailio[3299]: { "level": "DEBUG", "module": "rtpengine", "file": "rtpengine.c", "line": 4542, "function": "parse_call_stats_1", "callid": "3df537fef966eb1a", "logprefix": "{BYE <null> 10.152.8.37 3df537fef966eb1a } ", "message": "rtpengine: XXX got stream type 4" }
May 07 06:12:56 tst-ec1-blue-app-116 /usr/sbin/kamailio[3299]: { "level": "DEBUG", "module": "rtpengine", "file": "rtpengine.c", "line": 4543, "function": "parse_call_stats_1", "callid": "3df537fef966eb1a", "logprefix": "{BYE <null> 10.152.8.37 3df537fef966eb1a } ", "message": "rtpengine: XXX stream child 'local port'" }
May 07 06:12:56 tst-ec1-blue-app-116 /usr/sbin/kamailio[3299]: { "level": "DEBUG", "module": "rtpengine", "file": "rtpengine.c", "line": 4546, "function": "parse_call_stats_1", "callid": "3df537fef966eb1a", "logprefix": "{BYE <null> 10.152.8.37 3df537fef966eb1a } ", "message": "rtpengine: XXX stream child val type 2" }
May 07 06:12:56 tst-ec1-blue-app-116 /usr/sbin/kamailio[3299]: { "level": "DEBUG", "module": "rtpengine", "file": "rtpengine.c", "line": 4517, "function": "parse_call_stats_1", "callid": "3df537fef966eb1a", "logprefix": "{BYE <null> 10.152.8.37 3df537fef966eb1a } ", "message": "rtpengine: XXX got tag" }
May 07 06:12:56 tst-ec1-blue-app-116 /usr/sbin/kamailio[3299]: { "level": "DEBUG", "module": "rtpengine", "file": "rtpengine.c", "line": 4522, "function": "parse_call_stats_1", "callid": "3df537fef966eb1a", "logprefix": "{BYE <null> 10.152.8.37 3df537fef966eb1a } ", "message": "rtpengine: XXX got label Bleg_label" }
May 07 06:12:56 tst-ec1-blue-app-116 /usr/sbin/kamailio[3299]: { "level": "DEBUG", "module": "rtpengine", "file": "rtpengine.c", "line": 4508, "function": "parse_call_stats_1", "callid": "3df537fef966eb1a", "logprefix": "{BYE <null> 10.152.8.37 3df537fef966eb1a } ", "message": "rtpengine: looking for label 'Bleg_label'" }
May 07 06:12:56 tst-ec1-blue-app-116 /usr/sbin/kamailio[3299]: { "level": "DEBUG", "module": "rtpengine", "file": "rtpengine.c", "line": 4514, "function": "parse_call_stats_1", "callid": "3df537fef966eb1a", "logprefix": "{BYE <null> 10.152.8.37 3df537fef966eb1a } ", "message": "rtpengine: XXX got tags" }
May 07 06:12:56 tst-ec1-blue-app-116 /usr/sbin/kamailio[3299]: { "level": "DEBUG", "module": "rtpengine", "file": "rtpengine.c", "line": 4517, "function": "parse_call_stats_1", "callid": "3df537fef966eb1a", "logprefix": "{BYE <null> 10.152.8.37 3df537fef966eb1a } ", "message": "rtpengine: XXX got tag" }
May 07 06:12:56 tst-ec1-blue-app-116 /usr/sbin/kamailio[3299]: { "level": "DEBUG", "module": "rtpengine", "file": "rtpengine.c", "line": 4522, "function": "parse_call_stats_1", "callid": "3df537fef966eb1a", "logprefix": "{BYE <null> 10.152.8.37 3df537fef966eb1a } ", "message": "rtpengine: XXX got label Aleg_label" }
May 07 06:12:56 tst-ec1-blue-app-116 /usr/sbin/kamailio[3299]: { "level": "DEBUG", "module": "rtpengine", "file": "rtpengine.c", "line": 4517, "function": "parse_call_stats_1", "callid": "3df537fef966eb1a", "logprefix": "{BYE <null> 10.152.8.37 3df537fef966eb1a } ", "message": "rtpengine: XXX got tag" }
May 07 06:12:56 tst-ec1-blue-app-116 /usr/sbin/kamailio[3299]: { "level": "DEBUG", "module": "rtpengine", "file": "rtpengine.c", "line": 4522, "function": "parse_call_stats_1", "callid": "3df537fef966eb1a", "logprefix": "{BYE <null> 10.152.8.37 3df537fef966eb1a } ", "message": "rtpengine: XXX got label Bleg_label" }
May 07 06:12:56 tst-ec1-blue-app-116 /usr/sbin/kamailio[3299]: { "level": "DEBUG", "module": "rtpengine", "file": "rtpengine.c", "line": 4525, "function": "parse_call_stats_1", "callid": "3df537fef966eb1a", "logprefix": "{BYE <null> 10.152.8.37 3df537fef966eb1a } ", "message": "rtpengine: XXX label match" }
May 07 06:12:56 tst-ec1-blue-app-116 /usr/sbin/kamailio[3299]: { "level": "DEBUG", "module": "rtpengine", "file": "rtpengine.c", "line": 4530, "function": "parse_call_stats_1", "callid": "3df537fef966eb1a", "logprefix": "{BYE <null> 10.152.8.37 3df537fef966eb1a } ", "message": "rtpengine: XXX got medias" }
May 07 06:12:56 tst-ec1-blue-app-116 /usr/sbin/kamailio[3299]: { "level": "DEBUG", "module": "rtpengine", "file": "rtpengine.c", "line": 4532, "function": "parse_call_stats_1", "callid": "3df537fef966eb1a", "logprefix": "{BYE <null> 10.152.8.37 3df537fef966eb1a } ", "message": "rtpengine: XXX got media" }
May 07 06:12:56 tst-ec1-blue-app-116 /usr/sbin/kamailio[3299]: { "level": "DEBUG", "module": "rtpengine", "file": "rtpengine.c", "line": 4537, "function": "parse_call_stats_1", "callid": "3df537fef966eb1a", "logprefix": "{BYE <null> 10.152.8.37 3df537fef966eb1a } ", "message": "rtpengine: XXX got streams" }
May 07 06:12:56 tst-ec1-blue-app-116 /usr/sbin/kamailio[3299]: { "level": "DEBUG", "module": "rtpengine", "file": "rtpengine.c", "line": 4542, "function": "parse_call_stats_1", "callid": "3df537fef966eb1a", "logprefix": "{BYE <null> 10.152.8.37 3df537fef966eb1a } ", "message": "rtpengine: XXX got stream type 4" }
May 07 06:12:56 tst-ec1-blue-app-116 /usr/sbin/kamailio[3299]: { "level": "DEBUG", "module": "rtpengine", "file": "rtpengine.c", "line": 4543, "function": "parse_call_stats_1", "callid": "3df537fef966eb1a", "logprefix": "{BYE <null> 10.152.8.37 3df537fef966eb1a } ", "message": "rtpengine: XXX stream child 'local port'" }
May 07 06:12:56 tst-ec1-blue-app-116 /usr/sbin/kamailio[3299]: { "level": "DEBUG", "module": "rtpengine", "file": "rtpengine.c", "line": 4546, "function": "parse_call_stats_1", "callid": "3df537fef966eb1a", "logprefix": "{BYE <null> 10.152.8.37 3df537fef966eb1a } ", "message": "rtpengine: XXX stream child val type 2" }
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4232
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4232(a)github.com>
Module: kamailio
Branch: master
Commit: 2e20c74fb03f2442cde5f3f69989a0ed914f542c
URL: https://github.com/kamailio/kamailio/commit/2e20c74fb03f2442cde5f3f69989a0e…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2025-05-06T14:38:02+02:00
app_jsdt: doc - fix section tags for loaddir
---
Modified: src/modules/app_jsdt/doc/app_jsdt_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/2e20c74fb03f2442cde5f3f69989a0e…
Patch: https://github.com/kamailio/kamailio/commit/2e20c74fb03f2442cde5f3f69989a0e…
---
diff --git a/src/modules/app_jsdt/doc/app_jsdt_admin.xml b/src/modules/app_jsdt/doc/app_jsdt_admin.xml
index 6d139c29428..bbf2148b9b4 100644
--- a/src/modules/app_jsdt/doc/app_jsdt_admin.xml
+++ b/src/modules/app_jsdt/doc/app_jsdt_admin.xml
@@ -107,35 +107,31 @@ modparam("app_jsdt", "load", "/usr/local/etc/kamailio/js/myscript.js")
</programlisting>
</example>
</section>
- <section>
- <title>Parameters</title>
- <section id="app_jsdt.p.loaddir">
- <title>
- <varname>loaddir</varname> (str)
- </title>
- <para>
- Set the path to the folder containing JavaScript files to be loaded at startup. All
- .js files in the folder will be loaded and combined into a single javascript script.
- Then you can use jsdt_run(function, params) to execute a function from the
- script at runtime. If you use it for KEMI configuration,
- then it has to include the required functions.
- </para>
- <para>
- <emphasis>
- Default value is <quote>null</quote>.
- </emphasis>
- </para>
- <example>
- <title>
- Set <varname>loaddir</varname> parameter
- </title>
- <programlisting format="linespecific">
- ...
- modparam("app_jsdt", "loaddir", "/usr/local/etc/kamailio/js")
- ...
- </programlisting>
- </example>
- </section>
+ <section id="app_jsdt.p.loaddir">
+ <title><varname>loaddir</varname> (str)</title>
+ <para>
+ Set the path to the folder containing JavaScript files to be loaded at startup. All
+ .js files in the folder will be loaded and combined into a single javascript script.
+ Then you can use jsdt_run(function, params) to execute a function from the
+ script at runtime. If you use it for KEMI configuration,
+ then it has to include the required functions.
+ </para>
+ <para>
+ <emphasis>
+ Default value is <quote>null</quote>.
+ </emphasis>
+ </para>
+ <example>
+ <title>
+ Set <varname>loaddir</varname> parameter
+ </title>
+ <programlisting format="linespecific">
+...
+modparam("app_jsdt", "loaddir", "/usr/local/etc/kamailio/js")
+...
+</programlisting>
+ </example>
+ </section>
<section id="app_jsdt.p.mode">
<title><varname>mode</varname> (int)</title>
<para>
@@ -328,4 +324,3 @@ request_route {
</programlisting>
</section>
</chapter>
-