Explorar o código

pua_reginfo: documented the parameter for reginfo_handle_notify()

- reported in FS#340
Daniel-Constantin Mierla %!s(int64=12) %!d(string=hai) anos
pai
achega
89969601d6
Modificáronse 2 ficheiros con 42 adicións e 48 borrados
  1. 35 45
      modules/pua_reginfo/README
  2. 7 3
      modules/pua_reginfo/doc/pua_reginfo_admin.xml

+ 35 - 45
modules/pua_reginfo/README

@@ -10,7 +10,7 @@ Carsten Bock
 
 
    <[email protected]>
    <[email protected]>
 
 
-   Copyright © 2011 Carsten Bock, [email protected],
+   Copyright © 2011 Carsten Bock, [email protected],
    http://www.ng-voice.com
    http://www.ng-voice.com
      __________________________________________________________________
      __________________________________________________________________
 
 
@@ -27,25 +27,23 @@ Carsten Bock
         3. Parameters
         3. Parameters
 
 
               3.1. default_domain(str)
               3.1. default_domain(str)
-              3.2. default_domain(str)
-              3.3. publish_reginfo(int)
-              3.4. outbound_proxy(str)
-              3.5. server_address(str)
+              3.2. publish_reginfo(int)
+              3.3. outbound_proxy(str)
+              3.4. server_address(str)
 
 
         4. Functions
         4. Functions
 
 
-              4.1. reginfo_handle_notify
+              4.1. reginfo_handle_notify(uldomain)
               4.2. reginfo_subscribe(uri[, expires])
               4.2. reginfo_subscribe(uri[, expires])
 
 
    List of Examples
    List of Examples
 
 
    1.1. Set default_domain parameter
    1.1. Set default_domain parameter
-   1.2. Set default_domain parameter
-   1.3. Set publish_reginfo parameter
-   1.4. Set outbound_proxy parameter
-   1.5. Set server_address parameter
-   1.6. reginfo_handle_notify usage
-   1.7. reginfo_subscribe usage
+   1.2. Set publish_reginfo parameter
+   1.3. Set outbound_proxy parameter
+   1.4. Set server_address parameter
+   1.5. reginfo_handle_notify usage
+   1.6. reginfo_subscribe usage
 
 
 Chapter 1. Admin Guide
 Chapter 1. Admin Guide
 
 
@@ -60,14 +58,13 @@ Chapter 1. Admin Guide
    3. Parameters
    3. Parameters
 
 
         3.1. default_domain(str)
         3.1. default_domain(str)
-        3.2. default_domain(str)
-        3.3. publish_reginfo(int)
-        3.4. outbound_proxy(str)
-        3.5. server_address(str)
+        3.2. publish_reginfo(int)
+        3.3. outbound_proxy(str)
+        3.4. server_address(str)
 
 
    4. Functions
    4. Functions
 
 
-        4.1. reginfo_handle_notify
+        4.1. reginfo_handle_notify(uldomain)
         4.2. reginfo_subscribe(uri[, expires])
         4.2. reginfo_subscribe(uri[, expires])
 
 
 1. Overview
 1. Overview
@@ -115,69 +112,59 @@ Chapter 1. Admin Guide
 3. Parameters
 3. Parameters
 
 
    3.1. default_domain(str)
    3.1. default_domain(str)
-   3.2. default_domain(str)
-   3.3. publish_reginfo(int)
-   3.4. outbound_proxy(str)
-   3.5. server_address(str)
+   3.2. publish_reginfo(int)
+   3.3. outbound_proxy(str)
+   3.4. server_address(str)
 
 
 3.1. default_domain(str)
 3.1. default_domain(str)
 
 
    The default domain for the registered users to be used when
    The default domain for the registered users to be used when
    constructing the uri for the registrar callback.
    constructing the uri for the registrar callback.
 
 
-   Default value is “NULL�.
+   Default value is "NULL".
 
 
    Example 1.1. Set default_domain parameter
    Example 1.1. Set default_domain parameter
 ...
 ...
 modparam("pua_bla", "default_domain", "kamailio.org")
 modparam("pua_bla", "default_domain", "kamailio.org")
 ...
 ...
 
 
-3.2. default_domain(str)
-
-   The domain to be used to publish information about a user.
-
-   Example 1.2. Set default_domain parameter
-...
-modparam("pua_reginfo", "default_domain", "kamailio.org")
-...
-
-3.3. publish_reginfo(int)
+3.2. publish_reginfo(int)
 
 
    Whether or not to generate PUBLISH requests.
    Whether or not to generate PUBLISH requests.
 
 
-   Default value is “1� (enabled).
+   Default value is "1" (enabled).
 
 
-   Example 1.3. Set publish_reginfo parameter
+   Example 1.2. Set publish_reginfo parameter
 ...
 ...
 modparam("pua_reginfo", "publish_reginfo", 0)
 modparam("pua_reginfo", "publish_reginfo", 0)
 ...
 ...
 
 
-3.4. outbound_proxy(str)
+3.3. outbound_proxy(str)
 
 
    The outbound_proxy uri to be used when sending Subscribe requests.
    The outbound_proxy uri to be used when sending Subscribe requests.
 
 
-   Default value is “NULL�.
+   Default value is "NULL".
 
 
-   Example 1.4. Set outbound_proxy parameter
+   Example 1.3. Set outbound_proxy parameter
 ...
 ...
 modparam("pua_reginfo", "outbound_proxy", "sip:[email protected]")
 modparam("pua_reginfo", "outbound_proxy", "sip:[email protected]")
 ...
 ...
 
 
-3.5. server_address(str)
+3.4. server_address(str)
 
 
    The IP address of the server.
    The IP address of the server.
 
 
-   Example 1.5. Set server_address parameter
+   Example 1.4. Set server_address parameter
 ...
 ...
 modparam("pua_reginfo", "server_address", "sip:[email protected]")
 modparam("pua_reginfo", "server_address", "sip:[email protected]")
 ...
 ...
 
 
 4. Functions
 4. Functions
 
 
-   4.1. reginfo_handle_notify
+   4.1. reginfo_handle_notify(uldomain)
    4.2. reginfo_subscribe(uri[, expires])
    4.2. reginfo_subscribe(uri[, expires])
 
 
-4.1.  reginfo_handle_notify
+4.1. reginfo_handle_notify(uldomain)
 
 
    This function processes received "NOTIFY"-requests and updates the
    This function processes received "NOTIFY"-requests and updates the
    local registry accordingly.
    local registry accordingly.
@@ -185,20 +172,23 @@ modparam("pua_reginfo", "server_address", "sip:[email protected]")
    This method does not create any SIP-Reponse, this has to be done the
    This method does not create any SIP-Reponse, this has to be done the
    script-writer.
    script-writer.
 
 
+   The parameter has to correspond to user location table (domain) where
+   to store the record.
+
    Return codes:
    Return codes:
      * 2 - contacts successfully updated, but no more contacts online now.
      * 2 - contacts successfully updated, but no more contacts online now.
        1 - contacts successfully updated and at at least one contact still
        1 - contacts successfully updated and at at least one contact still
        registered.
        registered.
        -1 - Invalid NOTIFY or other error (see log-file)
        -1 - Invalid NOTIFY or other error (see log-file)
 
 
-   Example 1.6. reginfo_handle_notify usage
+   Example 1.5. reginfo_handle_notify usage
 ...
 ...
 if(is_method("NOTIFY"))
 if(is_method("NOTIFY"))
-        if (reginfo_handle_notify())
+        if (reginfo_handle_notify("location"))
                 send_reply("202", "Accepted");
                 send_reply("202", "Accepted");
 ...
 ...
 
 
-4.2.  reginfo_subscribe(uri[, expires])
+4.2. reginfo_subscribe(uri[, expires])
 
 
    This function will subscribe for reginfo-information at the given
    This function will subscribe for reginfo-information at the given
    server URI.
    server URI.
@@ -209,7 +199,7 @@ if(is_method("NOTIFY"))
        expires - Expiration date for this subscription, in seconds
        expires - Expiration date for this subscription, in seconds
        (default 3600)
        (default 3600)
 
 
-   Example 1.7. reginfo_subscribe usage
+   Example 1.6. reginfo_subscribe usage
 ...
 ...
 route {
 route {
         t_on_reply("1");
         t_on_reply("1");

+ 7 - 3
modules/pua_reginfo/doc/pua_reginfo_admin.xml

@@ -157,9 +157,9 @@ modparam("pua_reginfo", "server_address", "sip:[email protected]")
 	</section>	
 	</section>	
 	<section>
 	<section>
 		<title>Functions</title>
 		<title>Functions</title>
-		<section>
+		<section id="pua_reginfo.f.reginfo_handle_notify">
 			<title>
 			<title>
-				<function moreinfo="none">reginfo_handle_notify</function>
+				<function moreinfo="none">reginfo_handle_notify(uldomain)</function>
 			</title>
 			</title>
 			<para>
 			<para>
 				This function processes received "NOTIFY"-requests and updates
 				This function processes received "NOTIFY"-requests and updates
@@ -169,6 +169,10 @@ modparam("pua_reginfo", "server_address", "sip:[email protected]")
 				This method does not create any SIP-Reponse, this has to be done
 				This method does not create any SIP-Reponse, this has to be done
 				the script-writer.
 				the script-writer.
 			</para>
 			</para>
+			<para>
+				The parameter has to correspond to user location table (domain)
+				where to store the record.
+			</para>
 			<para>Return codes:</para>
 			<para>Return codes:</para>
 			<itemizedlist>
 			<itemizedlist>
 			<listitem>
 			<listitem>
@@ -191,7 +195,7 @@ modparam("pua_reginfo", "server_address", "sip:[email protected]")
 				<programlisting format="linespecific">
 				<programlisting format="linespecific">
 ...
 ...
 if(is_method("NOTIFY")) 
 if(is_method("NOTIFY")) 
-	if (reginfo_handle_notify())
+	if (reginfo_handle_notify("location"))
 		send_reply("202", "Accepted");
 		send_reply("202", "Accepted");
 ...
 ...
 				</programlisting>
 				</programlisting>