Ver código fonte

modules_k/pua: Documented new "pua_cleanup" MI command

Peter Dunkley 13 anos atrás
pai
commit
5ae271e248
2 arquivos alterados com 70 adições e 21 exclusões
  1. 46 21
      modules_k/pua/README
  2. 24 0
      modules_k/pua/doc/pua_admin.xml

+ 46 - 21
modules_k/pua/README

@@ -8,7 +8,7 @@ Edited by
 
 
 Anca-Maria Vamanu
 Anca-Maria Vamanu
 
 
-   Copyright © 2006 Voice Sistem SRL
+   Copyright © 2006 Voice Sistem SRL
      __________________________________________________________________
      __________________________________________________________________
 
 
    Table of Contents
    Table of Contents
@@ -40,7 +40,11 @@ Anca-Maria Vamanu
 
 
               4.1. pua_update_contact()
               4.1. pua_update_contact()
 
 
-        5. Installation
+        5. MI Commands
+
+              5.1. pua_cleanup
+
+        6. Installation
 
 
    2. Developer Guide
    2. Developer Guide
 
 
@@ -100,7 +104,11 @@ Chapter 1. Admin Guide
 
 
         4.1. pua_update_contact()
         4.1. pua_update_contact()
 
 
-   5. Installation
+   5. MI Commands
+
+        5.1. pua_cleanup
+
+   6. Installation
 
 
 1. Overview
 1. Overview
 
 
@@ -165,7 +173,7 @@ Chapter 1. Admin Guide
    information. This parameter will be used as the power of 2 when
    information. This parameter will be used as the power of 2 when
    computing table size.
    computing table size.
 
 
-   Default value is "9".
+   Default value is “9�.
 
 
    Example 1.1. Set hash_size parameter
    Example 1.1. Set hash_size parameter
 ...
 ...
@@ -176,7 +184,7 @@ modparam("pua", "hash_size", 11)
 
 
    Database url.
    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
    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.
    The name of the database table.
 
 
-   Default value is "pua".
+   Default value is “pua�.
 
 
    Example 1.3. Set db_table parameter
    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.
    The inferior expires limit for both Publish and Subscribe.
 
 
-   Default value is "0".
+   Default value is “0�.
 
 
    Example 1.4. Set min_expires parameter
    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
    The default expires value used in case this information is not
    provisioned.
    provisioned.
 
 
-   Default value is "3600".
+   Default value is “3600�.
 
 
    Example 1.5. Set default_expires parameter
    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
    expired messages. Setting a value less than or equal to zero, disables
    updates.
    updates.
 
 
-   Default value is "100".
+   Default value is “100�.
 
 
    Example 1.6. Set update_period parameter
    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
    presence_dialoginfo module) it makes no sense to waste CPU resources
    for parsing the XML body and the parameter should be set to 0.
    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
    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
    presence_reginfo module) it makes no sense to waste CPU resources for
    parsing the XML body and the parameter should be set to 0.
    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
    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
    in a database, allowing scalability at the expense of speed. Mode 1 is
    reserved.
    reserved.
 
 
-   Default value is "0".
+   Default value is “0�.
 
 
    Example 1.10. Set db_mode parameter
    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
    anyway. Set this parameter to 0 to disable checking of remote contact
    for SUBSCRIBE dialog matching.
    for SUBSCRIBE dialog matching.
 
 
-   Default value is "1".
+   Default value is “1�.
 
 
    Example 1.11. Set check_remote_contact parameter
    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()
+4.1.  pua_update_contact()
 
 
    The remote target can be updated by the Contact of a subsequent in
    The remote target can be updated by the Contact of a subsequent in
    dialog request. In the PUA watcher case (sending a SUBSCRIBE messages),
    dialog request. In the PUA watcher case (sending a SUBSCRIBE messages),
@@ -345,7 +353,24 @@ if(method=="NOTIFY")
     pua_update_contact();
     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
    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
    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
    The module provides the following functions that can be used by other
    Kamailio modules.
    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
    This function binds the pua modules and fills the structure with the
    two exported functions.
    two exported functions.
@@ -383,7 +408,7 @@ typedef struct pua_api {
 } pua_api_t;
 } pua_api_t;
 ...
 ...
 
 
-2. send_publish
+2.  send_publish
 
 
    Field type:
    Field type:
 ...
 ...
@@ -423,7 +448,7 @@ typedef struct publ_info
 }publ_info_t;
 }publ_info_t;
 ...
 ...
 
 
-3. send_subscribe
+3.  send_subscribe
 
 
    Field type:
    Field type:
 ...
 ...
@@ -462,7 +487,7 @@ typedef struct subs_info
 }subs_info_t;
 }subs_info_t;
 ...
 ...
 
 
-4. is_dialog
+4.  is_dialog
 
 
    Field type:
    Field type:
 ...
 ...
@@ -481,7 +506,7 @@ typedef int  (*query_dialog_t)(ua_pres_t* presentity);
         }
         }
 ...
 ...
 
 
-5. register_puacb
+5.  register_puacb
 
 
    Field type:
    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*);
 typedef int (pua_cb)(ua_pres_t* hentity, struct sip_msg*);
 ...
 ...
 
 
-6. add_event
+6.  add_event
 
 
    Field type:
    Field type:
 ...
 ...

+ 24 - 0
modules_k/pua/doc/pua_admin.xml

@@ -375,6 +375,30 @@ if(method=="NOTIFY")
 	</section>
 	</section>
 </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>
 <section>
 	<title>Installation</title>
 	<title>Installation</title>