Module: kamailio Branch: master Commit: 53846fa2016a0adec915310dd3181f01d103f9f5 URL: https://github.com/kamailio/kamailio/commit/53846fa2016a0adec915310dd3181f01...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2021-08-27T13:03:09+02:00
rtpproxy: aliased $rtppstat to $rtpstat
- can be useful when playing with rtpengine in same config
---
Modified: src/modules/rtpproxy/doc/rtpproxy_admin.xml Modified: src/modules/rtpproxy/rtpproxy.c
---
Diff: https://github.com/kamailio/kamailio/commit/53846fa2016a0adec915310dd3181f01... Patch: https://github.com/kamailio/kamailio/commit/53846fa2016a0adec915310dd3181f01...
---
diff --git a/src/modules/rtpproxy/doc/rtpproxy_admin.xml b/src/modules/rtpproxy/doc/rtpproxy_admin.xml index 536d7c6d0a..efc6b18e31 100644 --- a/src/modules/rtpproxy/doc/rtpproxy_admin.xml +++ b/src/modules/rtpproxy/doc/rtpproxy_admin.xml @@ -856,25 +856,31 @@ start_recording(); </section>
<section> - <title>Exported Pseudo Variables</title> - <section id="rtpproxy.pv.rtpstat"> - <title><function moreinfo="none">$rtpstat</function></title> + <title>Exported Variables</title> + <section id="rtpproxy.pv.rtppstat"> + <title><function moreinfo="none">$rtppstat</function></title> <para> Returns the RTP-Statistics from the RTP-Proxy. The RTP-Statistics from the RTP-Proxy are provided as a string and it does contain several packet-counters. The statistics must be retrieved before the session is deleted (before <function>unforce_rtpproxy()</function>). + It is the output of RTPProxy 'Q' command. </para>
<example> - <title>$rtpstat-Usage</title> + <title>$rtppstat Usage</title> <programlisting format="linespecific"> ... - append_hf("X-RTP-Statistics: $rtpstat\r\n"); + append_hf("X-RTP-Statistics: $rtppstat\r\n"); ... </programlisting> </example> </section> - + <section id="rtpproxy.pv.rtpstat"> + <title><function moreinfo="none">$rtpstat</function></title> + <para> + Same as $rtppstat. + </para> + </section> </section>
<section> diff --git a/src/modules/rtpproxy/rtpproxy.c b/src/modules/rtpproxy/rtpproxy.c index bd2eb5368d..46184310c4 100644 --- a/src/modules/rtpproxy/rtpproxy.c +++ b/src/modules/rtpproxy/rtpproxy.c @@ -144,7 +144,7 @@ static int child_init(int); static void mod_destroy(void);
/* Pseudo-Variables */ -static int pv_get_rtpstat_f(struct sip_msg *, pv_param_t *, pv_value_t *); +static int pv_get_rtppstat_f(struct sip_msg *, pv_param_t *, pv_value_t *);
static int rtpproxy_disable_tout = 60; static int rtpproxy_retr = 5; @@ -250,7 +250,9 @@ static cmd_export_t cmds[] = {
static pv_export_t mod_pvs[] = { {{"rtpstat", (sizeof("rtpstat")-1)}, /* RTP-Statistics */ - PVT_OTHER, pv_get_rtpstat_f, 0, 0, 0, 0, 0}, + PVT_OTHER, pv_get_rtppstat_f, 0, 0, 0, 0, 0}, + {{"rtppstat", (sizeof("rtppstat")-1)}, /* RTP-Statistics */ + PVT_OTHER, pv_get_rtppstat_f, 0, 0, 0, 0, 0}, {{0, 0}, 0, 0, 0, 0, 0, 0, 0} };
@@ -2729,7 +2731,7 @@ static int start_recording_f(struct sip_msg* msg, char *foo, char *bar) * Returns the current RTP-Statistics from the RTP-Proxy */ static int -pv_get_rtpstat_f(struct sip_msg *msg, pv_param_t *param, +pv_get_rtppstat_f(struct sip_msg *msg, pv_param_t *param, pv_value_t *res) { str ret_val = {0, 0};