|
@@ -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
|
|
@@ -113,20 +113,22 @@ Chapter 1. Admin Guide
|
|
1. Overview
|
|
1. Overview
|
|
|
|
|
|
This module offer the functionality of a presence user agent client,
|
|
This module offer the functionality of a presence user agent client,
|
|
- sending Subscribe and Publish messages. It's a core part of Kamailio's
|
|
|
|
- SIP presence package, implementing SIMPLE and various shared line
|
|
|
|
- appearance implementations.
|
|
|
|
-
|
|
|
|
- It can be used with the following modules: pua_mi and pua_usrloc,
|
|
|
|
- pua_bla and pua_xmpp. The pua_mi offer the possibility to publish any
|
|
|
|
- kind of information or subscribing to a resource through the manager
|
|
|
|
- interface. The pua_usrloc module calls a function exported by pua
|
|
|
|
- modules to publish elementary presence information, such as basic
|
|
|
|
- status "open" or "closed", for clients that do not implement
|
|
|
|
- client-to-server presence. Through pua_bla , BRIDGED LINE APPEARANCE
|
|
|
|
- features are added to openser. The pua_xmpp module represents a gateway
|
|
|
|
- between SIP and XMPP, so that jabber and SIP clients can exchange
|
|
|
|
- presence information.
|
|
|
|
|
|
+ sending SUBSCRIBE and PUBLISH SIP messages. It's a core part of
|
|
|
|
+ Kamailio's SIP presence package, implementing SIMPLE and various shared
|
|
|
|
+ line appearance implementations.
|
|
|
|
+
|
|
|
|
+ It can be used with the following modules: pua_mi, pua_usrloc, pua_bla,
|
|
|
|
+ pua_dialoginfo, pua_reginfo and pua_xmpp. The pua_mi module offer the
|
|
|
|
+ possibility to publish any kind of information or subscribing to a
|
|
|
|
+ resource through the manager interface. The pua_usrloc module calls a
|
|
|
|
+ function exported by pua modules to publish elementary presence
|
|
|
|
+ information, such as basic status "open" or "closed", for clients that
|
|
|
|
+ do not implement client-to-server presence. Through pua_bla , BRIDGED
|
|
|
|
+ LINE APPEARANCE features are added to Kamailio The pua_xmpp module
|
|
|
|
+ represents a gateway between SIP and XMPP, so that jabber and SIP
|
|
|
|
+ clients can exchange presence information. The pua_reginfo modules
|
|
|
|
+ presents registration information from the usrloc module using the
|
|
|
|
+ reginfo event package.
|
|
|
|
|
|
The module supports 2 modes of operation. In the first a cache is used
|
|
The module supports 2 modes of operation. In the first a cache is used
|
|
to store the presentity list and writes to database on timer to be able
|
|
to store the presentity list and writes to database on timer to be able
|
|
@@ -169,11 +171,11 @@ Chapter 1. Admin Guide
|
|
|
|
|
|
3.1. hash_size (int)
|
|
3.1. hash_size (int)
|
|
|
|
|
|
- The size of the hash table used for storing Subscribe and Publish
|
|
|
|
|
|
+ The size of the hash table used for storing SUBSCRIBE and PUBLISH
|
|
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
|
|
...
|
|
...
|
|
@@ -184,7 +186,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
|
|
...
|
|
...
|
|
@@ -195,7 +197,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
|
|
...
|
|
...
|
|
@@ -206,7 +208,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
|
|
...
|
|
...
|
|
@@ -218,7 +220,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
|
|
...
|
|
...
|
|
@@ -232,7 +234,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
|
|
...
|
|
...
|
|
@@ -252,16 +254,16 @@ modparam("pua", "outbound_proxy", "sip:outbound.example.com")
|
|
|
|
|
|
3.8. dlginfo_increase_version (int)
|
|
3.8. dlginfo_increase_version (int)
|
|
|
|
|
|
- When sending PUBLISHs for Event: dialog, the body contains an XML
|
|
|
|
- document according to RFC 4235. This XML document contains a version
|
|
|
|
- attribute to easily detect changes in the dialog state. By setting this
|
|
|
|
- parameter, the pua module parses the XML document and sets the version
|
|
|
|
- attribute to the proper value. If the receiver of the PUBLISH does not
|
|
|
|
- care about the version parameter (e.g. like Kamailio
|
|
|
|
|
|
+ When sending PUBLISH messages for Event: dialog, the body contains an
|
|
|
|
+ XML document according to RFC 4235. This XML document contains a
|
|
|
|
+ version attribute to easily detect changes in the dialog state. By
|
|
|
|
+ setting this parameter, the pua module parses the XML document and sets
|
|
|
|
+ the version attribute to the proper value. If the receiver of the
|
|
|
|
+ PUBLISH does not care about the version parameter (e.g. like Kamailio
|
|
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
|
|
...
|
|
...
|
|
@@ -270,8 +272,8 @@ modparam("pua", "dlginfo_increase_version", 1)
|
|
|
|
|
|
3.9. reginfo_increase_version (int)
|
|
3.9. reginfo_increase_version (int)
|
|
|
|
|
|
- When sending PUBLISHs for Event: reg, the body contains an XML document
|
|
|
|
- according to RFC 4235(?). This XML document contains a version
|
|
|
|
|
|
+ When sending PUBLISH messages for Event: reg, the body contains an XML
|
|
|
|
+ document according to RFC 4235(?). This XML document contains a version
|
|
attribute to easily detect changes in the registration state. By
|
|
attribute to easily detect changes in the registration state. By
|
|
setting this parameter, the pua module parses the XML document and sets
|
|
setting this parameter, the pua module parses the XML document and sets
|
|
the version attribute to the proper value. If the receiver of the
|
|
the version attribute to the proper value. If the receiver of the
|
|
@@ -279,7 +281,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
|
|
...
|
|
...
|
|
@@ -293,7 +295,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
|
|
...
|
|
...
|
|
@@ -310,7 +312,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
|
|
...
|
|
...
|
|
@@ -332,7 +334,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),
|
|
@@ -357,7 +359,7 @@ if(method=="NOTIFY")
|
|
|
|
|
|
5.1. pua_cleanup
|
|
5.1. pua_cleanup
|
|
|
|
|
|
-5.1. pua_cleanup
|
|
|
|
|
|
+5.1. pua_cleanup
|
|
|
|
|
|
Manually triggers the cleanup functions for the pua table. Useful if
|
|
Manually triggers the cleanup functions for the pua table. Useful if
|
|
you have set update_period to zero or less.
|
|
you have set update_period to zero or less.
|
|
@@ -392,7 +394,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.
|
|
@@ -408,7 +410,7 @@ typedef struct pua_api {
|
|
} pua_api_t;
|
|
} pua_api_t;
|
|
...
|
|
...
|
|
|
|
|
|
-2. send_publish
|
|
|
|
|
|
+2. send_publish
|
|
|
|
|
|
Field type:
|
|
Field type:
|
|
...
|
|
...
|
|
@@ -448,7 +450,7 @@ typedef struct publ_info
|
|
}publ_info_t;
|
|
}publ_info_t;
|
|
...
|
|
...
|
|
|
|
|
|
-3. send_subscribe
|
|
|
|
|
|
+3. send_subscribe
|
|
|
|
|
|
Field type:
|
|
Field type:
|
|
...
|
|
...
|
|
@@ -487,7 +489,7 @@ typedef struct subs_info
|
|
}subs_info_t;
|
|
}subs_info_t;
|
|
...
|
|
...
|
|
|
|
|
|
-4. is_dialog
|
|
|
|
|
|
+4. is_dialog
|
|
|
|
|
|
Field type:
|
|
Field type:
|
|
...
|
|
...
|
|
@@ -506,7 +508,7 @@ typedef int (*query_dialog_t)(ua_pres_t* presentity);
|
|
}
|
|
}
|
|
...
|
|
...
|
|
|
|
|
|
-5. register_puacb
|
|
|
|
|
|
+5. register_puacb
|
|
|
|
|
|
Field type:
|
|
Field type:
|
|
...
|
|
...
|
|
@@ -535,7 +537,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:
|
|
...
|
|
...
|
|
@@ -553,8 +555,8 @@ typedef int (*add_pua_event_t)(int ev_flag, char* name,
|
|
|
|
|
|
This function allows registering new events to the pua module. Now
|
|
This function allows registering new events to the pua module. Now
|
|
there are 4 events supported by the pua module: presence,
|
|
there are 4 events supported by the pua module: presence,
|
|
- presence;winfo, message-summary, dialog;sla. These events are
|
|
|
|
- registered from within the pua module.
|
|
|
|
|
|
+ presence;winfo, message-summary, dialog;sla, application/reginfo+xml.
|
|
|
|
+ These events are registered from within the pua module.
|
|
|
|
|
|
Filed type for process_body:
|
|
Filed type for process_body:
|
|
...
|
|
...
|