[sr-dev] git:master: modules_k/pua: Documented new "pua_cleanup" MI command

Peter Dunkley peter.dunkley at crocodile-rcs.com
Mon Apr 23 20:29:01 CEST 2012


Module: sip-router
Branch: master
Commit: 5ae271e248313fc1a3870cda90a8f3b128f0c105
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=5ae271e248313fc1a3870cda90a8f3b128f0c105

Author: Peter Dunkley <peter.dunkley at crocodile-rcs.com>
Committer: Peter Dunkley <peter.dunkley at crocodile-rcs.com>
Date:   Mon Apr 23 19:26:44 2012 +0100

modules_k/pua: Documented new "pua_cleanup" MI command

---

 modules_k/pua/README            |   67 ++++++++++++++++++++++++++------------
 modules_k/pua/doc/pua_admin.xml |   24 ++++++++++++++
 2 files changed, 70 insertions(+), 21 deletions(-)

diff --git a/modules_k/pua/README b/modules_k/pua/README
index 3ec5266..2451954 100644
--- a/modules_k/pua/README
+++ b/modules_k/pua/README
@@ -8,7 +8,7 @@ Edited by
 
 Anca-Maria Vamanu
 
-   Copyright © 2006 Voice Sistem SRL
+   Copyright © 2006 Voice Sistem SRL
      __________________________________________________________________
 
    Table of Contents
@@ -40,7 +40,11 @@ Anca-Maria Vamanu
 
               4.1. pua_update_contact()
 
-        5. Installation
+        5. MI Commands
+
+              5.1. pua_cleanup
+
+        6. Installation
 
    2. Developer Guide
 
@@ -100,7 +104,11 @@ Chapter 1. Admin Guide
 
         4.1. pua_update_contact()
 
-   5. Installation
+   5. MI Commands
+
+        5.1. pua_cleanup
+
+   6. Installation
 
 1. Overview
 
@@ -165,7 +173,7 @@ Chapter 1. Admin Guide
    information. This parameter will be used as the power of 2 when
    computing table size.
 
-   Default value is "9".
+   Default value is “9”.
 
    Example 1.1. Set hash_size parameter
 ...
@@ -176,7 +184,7 @@ modparam("pua", "hash_size", 11)
 
    Database url.
 
-   Default value is ">mysql://openser:openserrw@localhost/openser".
+   Default value is “>mysql://openser:openserrw@localhost/openser”.
 
    Example 1.2. Set db_url parameter
 ...
@@ -187,7 +195,7 @@ modparam("pua", "db_url" "dbdriver://username:password@dbhost/dbname")
 
    The name of the database table.
 
-   Default value is "pua".
+   Default value is “pua”.
 
    Example 1.3. Set db_table parameter
 ...
@@ -198,7 +206,7 @@ modparam("pua", "db_table", "pua")
 
    The inferior expires limit for both Publish and Subscribe.
 
-   Default value is "0".
+   Default value is “0”.
 
    Example 1.4. Set min_expires parameter
 ...
@@ -210,7 +218,7 @@ modparam("pua", "min_expires", 0)
    The default expires value used in case this information is not
    provisioned.
 
-   Default value is "3600".
+   Default value is “3600”.
 
    Example 1.5. Set default_expires parameter
 ...
@@ -224,7 +232,7 @@ modparam("pua", "default_expires", 3600)
    expired messages. Setting a value less than or equal to zero, disables
    updates.
 
-   Default value is "100".
+   Default value is “100”.
 
    Example 1.6. Set update_period parameter
 ...
@@ -253,7 +261,7 @@ modparam("pua", "outbound_proxy", "sip:outbound.example.com")
    presence_dialoginfo module) it makes no sense to waste CPU resources
    for parsing the XML body and the parameter should be set to 0.
 
-   Default value is "0".
+   Default value is “0”.
 
    Example 1.8. Set dlginfo_increase_version parameter
 ...
@@ -271,7 +279,7 @@ modparam("pua", "dlginfo_increase_version", 1)
    presence_reginfo module) it makes no sense to waste CPU resources for
    parsing the XML body and the parameter should be set to 0.
 
-   Default value is "0".
+   Default value is “0”.
 
    Example 1.9. Set reginfo_increase_version parameter
 ...
@@ -285,7 +293,7 @@ modparam("pua", "reginfo_increase_version", 1)
    in a database, allowing scalability at the expense of speed. Mode 1 is
    reserved.
 
-   Default value is "0".
+   Default value is “0”.
 
    Example 1.10. Set db_mode parameter
 ...
@@ -302,7 +310,7 @@ modparam("pua", "db_mode", 0)
    anyway. Set this parameter to 0 to disable checking of remote contact
    for SUBSCRIBE dialog matching.
 
-   Default value is "1".
+   Default value is “1”.
 
    Example 1.11. Set check_remote_contact parameter
 ...
@@ -324,7 +332,7 @@ modparam("pua", "fetch_rows", 1000)
 
    4.1. pua_update_contact()
 
-4.1. pua_update_contact()
+4.1.  pua_update_contact()
 
    The remote target can be updated by the Contact of a subsequent in
    dialog request. In the PUA watcher case (sending a SUBSCRIBE messages),
@@ -345,7 +353,24 @@ if(method=="NOTIFY")
     pua_update_contact();
 ...
 
-5. Installation
+5. MI Commands
+
+   5.1. pua_cleanup
+
+5.1.  pua_cleanup
+
+   Manually triggers the cleanup functions for the pua table. Useful if
+   you have set update_period to zero or less.
+
+   Name: pua_cleanup
+
+   Parameters: none
+
+   MI FIFO Command Format:
+                :pua_cleanup:fifo_reply
+                _empty_line_
+
+6. Installation
 
    The module requires one table in the Kamailio database: pua. The SQL
    syntax to create it can be found in presence_xml-create.sql script in
@@ -367,7 +392,7 @@ Chapter 2. Developer Guide
    The module provides the following functions that can be used by other
    Kamailio modules.
 
-1. bind_pua(pua_api_t* api)
+1.  bind_pua(pua_api_t* api)
 
    This function binds the pua modules and fills the structure with the
    two exported functions.
@@ -383,7 +408,7 @@ typedef struct pua_api {
 } pua_api_t;
 ...
 
-2. send_publish
+2.  send_publish
 
    Field type:
 ...
@@ -423,7 +448,7 @@ typedef struct publ_info
 }publ_info_t;
 ...
 
-3. send_subscribe
+3.  send_subscribe
 
    Field type:
 ...
@@ -462,7 +487,7 @@ typedef struct subs_info
 }subs_info_t;
 ...
 
-4. is_dialog
+4.  is_dialog
 
    Field type:
 ...
@@ -481,7 +506,7 @@ typedef int  (*query_dialog_t)(ua_pres_t* presentity);
         }
 ...
 
-5. register_puacb
+5.  register_puacb
 
    Field type:
 ...
@@ -510,7 +535,7 @@ typedef int (*register_puacb_t)(int types, pua_cb f, void* param );
 typedef int (pua_cb)(ua_pres_t* hentity, struct sip_msg*);
 ...
 
-6. add_event
+6.  add_event
 
    Field type:
 ...
diff --git a/modules_k/pua/doc/pua_admin.xml b/modules_k/pua/doc/pua_admin.xml
index b8c9752..162db99 100644
--- a/modules_k/pua/doc/pua_admin.xml
+++ b/modules_k/pua/doc/pua_admin.xml
@@ -375,6 +375,30 @@ if(method=="NOTIFY")
 	</section>
 </section>
 
+<section>
+	<title>MI Commands</title>
+	<section>
+	  <title>
+		<function moreinfo="none">pua_cleanup</function>
+	  </title>
+	  <para>
+		Manually triggers the cleanup functions for the pua table.
+		Useful if you have set <varname>update_period</varname> to zero or less.
+	  </para>
+	  <para>
+		Name: <emphasis>pua_cleanup</emphasis>
+	  </para>
+	  <para>Parameters: <emphasis>none</emphasis></para>
+
+	  <para>
+		MI FIFO Command Format:
+	  </para>
+	  <programlisting  format="linespecific">
+		:pua_cleanup:fifo_reply
+		_empty_line_
+	  </programlisting>
+	</section>
+</section>
 
 <section>
 	<title>Installation</title>




More information about the sr-dev mailing list