Module: sip-router
Branch: master
Commit: 37e8d6478f677be90178f26ac9348e2f9fd38a58
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=37e8d64…
Author: Hugh Waite <hugh.waite(a)crocodile-rcs.com>
Committer: Hugh Waite <hugh.waite(a)crocodile-rcs.com>
Date: Wed Jan 8 09:45:22 2014 +0000
rtpproxy: Documentation: clarify rtpp_inst_pvar usage
- The instance 'URL' is stored in the pvar
- Added an example usage
---
modules/rtpproxy/README | 59 ++++++++++++++++++------------
modules/rtpproxy/doc/rtpproxy_admin.xml | 19 ++++++++--
2 files changed, 51 insertions(+), 27 deletions(-)
diff --git a/modules/rtpproxy/README b/modules/rtpproxy/README
index 82ecd1e..e8a2094 100644
--- a/modules/rtpproxy/README
+++ b/modules/rtpproxy/README
@@ -103,16 +103,17 @@ Carsten Bock
1.9. Set db_url parameter
1.10. Set table_name parameter
1.11. Set rtp_inst_pvar parameter
- 1.12. set_rtp_proxy_set usage
- 1.13. rtpproxy_offer usage
- 1.14. rtpproxy_answer usage
- 1.15. rtpproxy_destroy usage
- 1.16. rtpproxy_manage usage
- 1.17. rtpproxy_stream2xxx usage
- 1.18. start_recording usage
- 1.19. $rtpstat-Usage
- 1.20. nh_enable_rtpp usage
- 1.21. nh_show_rtpp usage
+ 1.12. rtp_inst_pvar usage
+ 1.13. set_rtp_proxy_set usage
+ 1.14. rtpproxy_offer usage
+ 1.15. rtpproxy_answer usage
+ 1.16. rtpproxy_destroy usage
+ 1.17. rtpproxy_manage usage
+ 1.18. rtpproxy_stream2xxx usage
+ 1.19. start_recording usage
+ 1.20. $rtpstat-Usage
+ 1.21. nh_enable_rtpp usage
+ 1.22. nh_show_rtpp usage
Chapter 1. Admin Guide
@@ -383,9 +384,9 @@ modparam("rtpproxy", "table_name",
"my_rtpp_sets")
4.11. rtp_inst_pvar (string)
- A pseudo variable to store the chosen RTPProxy IP address. If this
- parameter is set, the IP address and port of the instance chosen will
- be stored in the given variable.
+ A pseudo variable to store the chosen RTPProxy address. If this
+ parameter is set, the instance URL will be stored in the given
+ variable.
By default, this parameter is not set.
@@ -394,6 +395,16 @@ modparam("rtpproxy", "table_name",
"my_rtpp_sets")
modparam("rtpproxy", "rtp_inst_pvar",
"$avp(RTP_INSTANCE)")
...
+ Example 1.12. rtp_inst_pvar usage
+modparam("rtpproxy", "rtpproxy_sock",
+ "udp:localhost:12221 udp:localhost:12222")
+modparam("rtpproxy", "rtp_inst_pvar",
"$var(RTP_INSTANCE)")
+...
+rtpproxy_manage("eiro");
+xlog("L_INFO", "Chose rtpp instance $var(RTP_INSTANCE)\n");
+# This will display 'udp:localhost:12222'
+...
+
5. Functions
5.1. set_rtp_proxy_set(setid)
@@ -418,7 +429,7 @@ modparam("rtpproxy", "rtp_inst_pvar",
"$avp(RTP_INSTANCE)")
This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE,
BRANCH_ROUTE.
- Example 1.12. set_rtp_proxy_set usage
+ Example 1.13. set_rtp_proxy_set usage
...
set_rtp_proxy_set("2");
rtpproxy_offer();
@@ -524,7 +535,7 @@ rtpproxy_offer();
This function can be used from ANY_ROUTE.
- Example 1.13. rtpproxy_offer usage
+ Example 1.14. rtpproxy_offer usage
route {
...
if (is_method("INVITE")) {
@@ -568,7 +579,7 @@ onreply_route[2]
This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE,
FAILURE_ROUTE, BRANCH_ROUTE.
- Example 1.14. rtpproxy_answer usage
+ Example 1.15. rtpproxy_answer usage
See rtpproxy_offer() function example above for example.
@@ -604,7 +615,7 @@ onreply_route[2]
unused rtpproxy call when 200 OK is received on a branch,
where rtpproxy is not needed.
- Example 1.15. rtpproxy_destroy usage
+ Example 1.16. rtpproxy_destroy usage
...
rtpproxy_destroy();
...
@@ -638,7 +649,7 @@ rtpproxy_destroy();
This function can be used from ANY_ROUTE.
- Example 1.16. rtpproxy_manage usage
+ Example 1.17. rtpproxy_manage usage
...
rtpproxy_manage();
...
@@ -674,7 +685,7 @@ rtpproxy_manage();
-1 means that it will be streaming in a loop indefinitely, until
the appropriate rtpproxy_stop_stream2xxx is issued.
- Example 1.17. rtpproxy_stream2xxx usage
+ Example 1.18. rtpproxy_stream2xxx usage
...
if (is_method("INVITE")) {
rtpproxy_offer();
@@ -707,7 +718,7 @@ rtpproxy_manage();
This function can be used from REQUEST_ROUTE and ONREPLY_ROUTE.
- Example 1.18. start_recording usage
+ Example 1.19. start_recording usage
...
start_recording();
...
@@ -727,7 +738,7 @@ start_recording();
packet-counters. The statistics must be retrieved before the session
is deleted (before unforce_rtpproxy()).
- Example 1.19. $rtpstat-Usage
+ Example 1.20. $rtpstat-Usage
...
append_hf("X-RTP-Statistics: $rtpstat\r\n");
...
@@ -748,9 +759,9 @@ start_recording();
The second parameter value must be a number in decimal.
NOTE: if a rtpproxy is defined multiple times (in the same or
- diferente sete), all of its instances will be enables/disabled.
+ different sets), all of its instances will be enabled/disabled.
- Example 1.20. nh_enable_rtpp usage
+ Example 1.21. nh_enable_rtpp usage
...
$ kamctl fifo nh_enable_rtpp udp:192.168.2.133:8081 0
...
@@ -762,7 +773,7 @@ $ kamctl fifo nh_enable_rtpp udp:192.168.2.133:8081 0
No parameter.
- Example 1.21. nh_show_rtpp usage
+ Example 1.22. nh_show_rtpp usage
...
$ kamctl fifo nh_show_rtpp
...
diff --git a/modules/rtpproxy/doc/rtpproxy_admin.xml
b/modules/rtpproxy/doc/rtpproxy_admin.xml
index db206f7..a1939c9 100644
--- a/modules/rtpproxy/doc/rtpproxy_admin.xml
+++ b/modules/rtpproxy/doc/rtpproxy_admin.xml
@@ -324,8 +324,8 @@ modparam("rtpproxy", "table_name",
"my_rtpp_sets")
<section>
<title><varname>rtp_inst_pvar</varname> (string)</title>
<para>
- A pseudo variable to store the chosen RTPProxy IP address.
- If this parameter is set, the IP address and port of the instance chosen will be
stored in the given variable.
+ A pseudo variable to store the chosen RTPProxy address.
+ If this parameter is set, the instance URL will be stored in the given variable.
</para>
<para>
By default, this parameter is not set.
@@ -338,6 +338,19 @@ modparam("rtpproxy", "rtp_inst_pvar",
"$avp(RTP_INSTANCE)")
...
</programlisting>
</example>
+ <example>
+ <title><varname>rtp_inst_pvar</varname> usage</title>
+ <programlisting format="linespecific">
+modparam("rtpproxy", "rtpproxy_sock",
+ "udp:localhost:12221 udp:localhost:12222")
+modparam("rtpproxy", "rtp_inst_pvar",
"$var(RTP_INSTANCE)")
+...
+rtpproxy_manage("eiro");
+xlog("L_INFO", "Chose rtpp instance $var(RTP_INSTANCE)\n");
+# This will display 'udp:localhost:12222'
+...
+</programlisting>
+ </example>
</section>
</section>
@@ -855,7 +868,7 @@ start_recording();
</para>
<para>
NOTE: if a rtpproxy is defined multiple times (in the same or
- diferente sete), all of its instances will be enables/disabled.
+ different sets), all of its instances will be enabled/disabled.
</para>
<example>
<title>