Browse Source

rtpproxy: aliased rtpproxy_destroy() to unforce_rtp_proxy()

Daniel-Constantin Mierla 14 years ago
parent
commit
41df497150
3 changed files with 80 additions and 63 deletions
  1. 65 59
      modules/rtpproxy/README
  2. 12 4
      modules/rtpproxy/doc/rtpproxy_admin.xml
  3. 3 0
      modules/rtpproxy/rtpproxy.c

+ 65 - 59
modules/rtpproxy/README

@@ -24,13 +24,13 @@ Edited by
 
 Sas Ovidiu
 
-   Copyright © 2003-2008 Sippy Software, Inc.
+   Copyright © 2003-2008 Sippy Software, Inc.
 
-   Copyright © 2005 voice-system.ro
+   Copyright © 2005 voice-system.ro
 
-   Copyright © 2009 TuTPro Inc.
+   Copyright © 2009 TuTPro Inc.
 
-   Copyright © 2010 VoIPEmbedded Inc.
+   Copyright © 2010 VoIPEmbedded Inc.
    Revision History
    Revision $Revision$ $Date$
      __________________________________________________________________
@@ -61,13 +61,14 @@ Sas Ovidiu
               5.1. set_rtp_proxy_set()
               5.2. rtpproxy_offer([flags [, ip_address]])
               5.3. rtpproxy_answer([flags [, ip_address]])
-              5.4. unforce_rtp_proxy()
-              5.5. rtpproxy_manage([flags [, ip_address]])
-              5.6. rtpproxy_stream2uac(prompt_name, count),
+              5.4. rtpproxy_destroy()
+              5.5. unforce_rtp_proxy()
+              5.6. rtpproxy_manage([flags [, ip_address]])
+              5.7. rtpproxy_stream2uac(prompt_name, count),
                       rtpproxy_stream2uas(prompt_name, count)
 
-              5.7. rtpproxy_stop_stream2uac(), rtpproxy_stop_stream2uas()
-              5.8. start_recording()
+              5.8. rtpproxy_stop_stream2uac(), rtpproxy_stop_stream2uas()
+              5.9. start_recording()
 
         6. Exported Pseudo Variables
 
@@ -92,7 +93,7 @@ Sas Ovidiu
    1.8. fix_nated_contact usage
    1.9. rtpproxy_offer usage
    1.10. rtpproxy_answer usage
-   1.11. unforce_rtp_proxy usage
+   1.11. rtpproxy_destroy usage
    1.12. rtpproxy_manage usage
    1.13. rtpproxy_stream2xxx usage
    1.14. start_recording usage
@@ -126,13 +127,14 @@ Chapter 1. Admin Guide
         5.1. set_rtp_proxy_set()
         5.2. rtpproxy_offer([flags [, ip_address]])
         5.3. rtpproxy_answer([flags [, ip_address]])
-        5.4. unforce_rtp_proxy()
-        5.5. rtpproxy_manage([flags [, ip_address]])
-        5.6. rtpproxy_stream2uac(prompt_name, count),
+        5.4. rtpproxy_destroy()
+        5.5. unforce_rtp_proxy()
+        5.6. rtpproxy_manage([flags [, ip_address]])
+        5.7. rtpproxy_stream2uac(prompt_name, count),
                 rtpproxy_stream2uas(prompt_name, count)
 
-        5.7. rtpproxy_stop_stream2uac(), rtpproxy_stop_stream2uas()
-        5.8. start_recording()
+        5.8. rtpproxy_stop_stream2uac(), rtpproxy_stop_stream2uas()
+        5.9. start_recording()
 
    6. Exported Pseudo Variables
 
@@ -162,7 +164,7 @@ Chapter 1. Admin Guide
    load-balancing will be performed over a set and the user has the
    ability to choose what set should be used. The set is selected via its
    id - the id being defined along with the set. Refer to the
-   "rtpproxy_sock" module parameter definition for syntax description.
+   “rtpproxy_sock� module parameter definition for syntax description.
 
    The balancing inside a set is done automatically by the module based on
    the weight of each rtpproxy from the set.
@@ -210,7 +212,7 @@ Chapter 1. Admin Guide
    Definition of socket(s) used to connect to (a set) RTPProxy. It may
    specify a UNIX socket or an IPv4/IPv6 UDP socket.
 
-   Default value is "NONE" (disabled).
+   Default value is “NONE� (disabled).
 
    Example 1.1. Set rtpproxy_sock parameter
 ...
@@ -232,7 +234,7 @@ modparam("rtpproxy", "rtpproxy_sock",
    will not attempt to establish communication to RTPProxy for
    rtpproxy_disable_tout seconds.
 
-   Default value is "60".
+   Default value is “60�.
 
    Example 1.2. Set rtpproxy_disable_tout parameter
 ...
@@ -243,7 +245,7 @@ modparam("rtpproxy", "rtpproxy_disable_tout", 20)
 
    Timeout value in waiting for reply from RTPProxy.
 
-   Default value is "1".
+   Default value is “1�.
 
    Example 1.3. Set rtpproxy_tout parameter
 ...
@@ -255,7 +257,7 @@ modparam("rtpproxy", "rtpproxy_tout", 2)
    How many times rtpproxy should retry to send and receive after timeout
    was generated.
 
-   Default value is "5".
+   Default value is “5�.
 
    Example 1.4. Set rtpproxy_retr parameter
 ...
@@ -267,7 +269,7 @@ modparam("rtpproxy", "rtpproxy_retr", 2)
    Socket to be forced in communicating to RTPProxy. It makes sense only
    for UDP communication. If no one specified, the OS will choose.
 
-   Default value is "NULL".
+   Default value is “NULL�.
 
    Example 1.5. Set force_socket parameter
 ...
@@ -285,7 +287,7 @@ Note
 
    The string must be a complete SDP line, including the EOH (\r\n).
 
-   Default value is "a=nortpproxy:yes\r\n".
+   Default value is “a=nortpproxy:yes\r\n�.
 
    Example 1.6. Set nortpproxy_str parameter
 ...
@@ -300,7 +302,7 @@ modparam("rtpproxy", "nortpproxy_str", "a=sdpmangled:yes\r\n")
    If it is an empty string, no timeout socket will be transmitted to the
    RTP-Proxy.
 
-   Default value is "" (nothing).
+   Default value is “� (nothing).
 
    Example 1.7. Set timeout_socket parameter
 ...
@@ -312,13 +314,14 @@ modparam("nathelper", "timeout_socket", "xmlrpc:http://127.0.0.1:8000/RPC2")
    5.1. set_rtp_proxy_set()
    5.2. rtpproxy_offer([flags [, ip_address]])
    5.3. rtpproxy_answer([flags [, ip_address]])
-   5.4. unforce_rtp_proxy()
-   5.5. rtpproxy_manage([flags [, ip_address]])
-   5.6. rtpproxy_stream2uac(prompt_name, count),
+   5.4. rtpproxy_destroy()
+   5.5. unforce_rtp_proxy()
+   5.6. rtpproxy_manage([flags [, ip_address]])
+   5.7. rtpproxy_stream2uac(prompt_name, count),
           rtpproxy_stream2uas(prompt_name, count)
 
-   5.7. rtpproxy_stop_stream2uac(), rtpproxy_stop_stream2uas()
-   5.8. start_recording()
+   5.8. rtpproxy_stop_stream2uac(), rtpproxy_stop_stream2uas()
+   5.9. start_recording()
 
 5.1.  set_rtp_proxy_set()
 
@@ -344,7 +347,7 @@ rtpproxy_offer();
      * flags - flags to turn on some features.
           + a - flags that UA from which message is received doesn't
             support symmetric RTP. (automatically sets the 'r' flag)
-          + l - force "lookup", that is, only rewrite SDP when
+          + l - force “lookup�, that is, only rewrite SDP when
             corresponding session is already exists in the RTP proxy. By
             default is on when the session is to be completed.
           + i, e - these flags specify the direction of the SIP message.
@@ -438,19 +441,22 @@ onreply_route[2]
 
    See rtpproxy_offer() function example above for example.
 
-5.4.  unforce_rtp_proxy()
+5.4.  rtpproxy_destroy()
 
    Tears down the RTPProxy session for the current call.
 
-   This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE,
-   FAILURE_ROUTE, BRANCH_ROUTE.
+   This function can be used from ANY_ROUTE.
 
-   Example 1.11. unforce_rtp_proxy usage
+   Example 1.11. rtpproxy_destroy usage
 ...
-unforce_rtp_proxy();
+rtpproxy_destroy();
 ...
 
-5.5.  rtpproxy_manage([flags [, ip_address]])
+5.5.  unforce_rtp_proxy()
+
+   Same as rtpproxy_destroy().
+
+5.6.  rtpproxy_manage([flags [, ip_address]])
 
    Manage the RTPProxy session - it combines the functionality of
    rtpproxy_offer(), rtpproxy_answer() and unfroce_rtpproxy(), detecting
@@ -477,7 +483,7 @@ unforce_rtp_proxy();
 rtpproxy_manage();
 ...
 
-5.6.  rtpproxy_stream2uac(prompt_name, count),
+5.7.  rtpproxy_stream2uac(prompt_name, count),
 rtpproxy_stream2uas(prompt_name, count)
 
    Instruct the RTPproxy to stream prompt/announcement pre-encoded with
@@ -520,7 +526,7 @@ rtpproxy_stream2uas(prompt_name, count)
     };
 ...
 
-5.7.  rtpproxy_stop_stream2uac(), rtpproxy_stop_stream2uas()
+5.8.  rtpproxy_stop_stream2uac(), rtpproxy_stop_stream2uas()
 
    Stop streaming of announcement/prompt/MOH started previously by the
    respective rtpproxy_stream2xxx. The uac/uas suffix selects whose
@@ -529,7 +535,7 @@ rtpproxy_stream2uas(prompt_name, count)
 
    These functions can be used from REQUEST_ROUTE, ONREPLY_ROUTE.
 
-5.8.  start_recording()
+5.9.  start_recording()
 
    This command will send a signal to the RTP-Proxy to record the RTP
    stream on the RTP-Proxy.
@@ -594,45 +600,45 @@ $ kamctl fifo nh_show_rtpp
 
 Chapter 2. Frequently Asked Questions
 
-   2.1. What happend with "rtpproxy_disable" parameter?
+   2.1. What happend with “rtpproxy_disable� parameter?
    2.2. Where can I find more about Kamailio?
    2.3. Where can I post a question about this module?
    2.4. How can I report a bug?
 
    2.1.
 
-   What happend with "rtpproxy_disable" parameter?
+       What happend with “rtpproxy_disable� parameter?
 
-   It was removed as it became obsolete - now "rtpproxy_sock" can take
-   empty value to disable the rtpproxy functionality.
+       It was removed as it became obsolete - now “rtpproxy_sock� can take
+       empty value to disable the rtpproxy functionality.
 
    2.2.
 
-   Where can I find more about Kamailio?
+       Where can I find more about Kamailio?
 
-   Take a look at http://www.kamailio.org/.
+       Take a look at http://www.kamailio.org/.
 
    2.3.
 
-   Where can I post a question about this module?
+       Where can I post a question about this module?
 
-   First at all check if your question was already answered on one of our
-   mailing lists:
-     * User Mailing List -
-       http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
-     * Developer Mailing List -
-       http://lists.kamailio.org/cgi-bin/mailman/listinfo/devel
+       First at all check if your question was already answered on one of our
+       mailing lists:
+         * User Mailing List -
+           http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
+         * Developer Mailing List -
+           http://lists.kamailio.org/cgi-bin/mailman/listinfo/devel
 
-   E-mails regarding any stable Kamailio release should be sent to
-   <[email protected]> and e-mails regarding development versions
-   should be sent to <[email protected]>.
+       E-mails regarding any stable Kamailio release should be sent to
+       <[email protected]> and e-mails regarding development versions
+       should be sent to <[email protected]>.
 
-   If you want to keep the mail private, send it to
-   <[email protected]>.
+       If you want to keep the mail private, send it to
+       <[email protected]>.
 
    2.4.
 
-   How can I report a bug?
+       How can I report a bug?
 
-   Please follow the guidelines provided at:
-   http://sourceforge.net/tracker/?group_id=139143.
+       Please follow the guidelines provided at:
+       http://sourceforge.net/tracker/?group_id=139143.

+ 12 - 4
modules/rtpproxy/doc/rtpproxy_admin.xml

@@ -433,23 +433,31 @@ onreply_route[2]
         </section>
 	<section>
 		<title>
-		<function moreinfo="none">unforce_rtp_proxy()</function>
+		<function moreinfo="none">rtpproxy_destroy()</function>
 		</title>
 		<para>
 		Tears down the RTPProxy session for the current call.
 		</para>
 		<para>
-		This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE, FAILURE_ROUTE, BRANCH_ROUTE.
+		This function can be used from ANY_ROUTE.
 		</para>
 		<example>
-		<title><function>unforce_rtp_proxy</function> usage</title>
+		<title><function>rtpproxy_destroy</function> usage</title>
 		<programlisting format="linespecific">
 ...
-unforce_rtp_proxy();
+rtpproxy_destroy();
 ...
 </programlisting>
 		</example>
 	</section>
+	<section>
+		<title>
+		<function moreinfo="none">unforce_rtp_proxy()</function>
+		</title>
+		<para>
+			Same as rtpproxy_destroy().
+		</para>
+	</section>
 
     <section>
         <title>

+ 3 - 0
modules/rtpproxy/rtpproxy.c

@@ -353,6 +353,9 @@ static cmd_export_t cmds[] = {
 	{"unforce_rtp_proxy",  (cmd_function)unforce_rtp_proxy_f,    0,
 		0, 0,
 		ANY_ROUTE},
+	{"rtpproxy_destroy",   (cmd_function)unforce_rtp_proxy_f,    0,
+		0, 0,
+		ANY_ROUTE},
 	{"start_recording",    (cmd_function)start_recording_f,      0,
 		0, 0,
 		ANY_ROUTE },