Просмотр исходного кода

rtpproxy: aliased $rtppstat to $rtpstat

- can be useful when playing with rtpengine in same config
Daniel-Constantin Mierla 4 лет назад
Родитель
Сommit
53846fa201
2 измененных файлов с 17 добавлено и 9 удалено
  1. 12 6
      src/modules/rtpproxy/doc/rtpproxy_admin.xml
  2. 5 3
      src/modules/rtpproxy/rtpproxy.c

+ 12 - 6
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>

+ 5 - 3
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};