|
@@ -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:
|
|
|
...
|