Copyright © 2007 voice-system.ro
Revision History | |
---|---|
Revision $Revision: 1499 $ | $Date: 2007-01-12 14:05:57 +0200 (Fri, 12 Jan 2007) $ |
Table of Contents
List of Examples
The module does specific handling for notify-subscribe events using xml bodies. It is used with the general event handling module, presence. It constructs and adds 3 events to it: presence, presence.winfo, dialog;sla.
This module takes the xcap permission rule documents from xcap_table. The presence permission rules are interpreted according to the specifications in RFC 4745 and RFC 5025.
The following modules must be loaded before this module:
a database module.
presence.
sl.
xcap_client.
Only compulsory if not using an integrated xcap server (if 'integrated_xcap_server' parameter is not set).
The database url.
Default value is “mysql://opensips:opensipsrw@localhost/osips”.
Example 1.1. Set db_url
parameter
... modparam("presence_xml", "db_url", "dbdriver://username:password@dbhost/dbname") ...
The name of the db table where XCAP documents are stored.
Default value is “xcap”.
This parameter is used for permissions when handling Subscribe messages. If set to 1, subscription state is considered active and the presentity is not queried for permissions(should be set to 1 if not using an xcap server). Otherwise,the xcap server is queried and the subscription states is according to user defined permission rules. If no rules are defined for a certain watcher, the subscriptions remains in pending state and the Notify sent will have no body.
Note: When switching from one value to another, the watchers table must be emptied.
Default value is “0”.
Setting this parameter to 1 enables the features described in RFC 4827. It gives the possibility to have a permanent state notified to the users even in the case in which the phone is not online. The presence document is taken from the xcap server and aggregated together with the other presence information, if any exist, for each Notify that is sent to the watchers. It is also possible to have information notified even if not issuing any Publish (useful for services such as email, SMS, MMS).
Default value is “0”.
Example 1.4. Set pidf_manipulation
parameter
... modparam("presence_xml", "pidf_manipulation", 1) ...
This parameter is a flag for the type of XCAP server or servers used. If integrated ones, like XCAP-lite from AG Projects, with direct access to database table, the parameter should be set to a positive value. Apart from updating in xcap table, the integrated server must send an MI command refershWatchers [pres_uri] [event] when a user modifies a rules document.
Otherwise, it uses xcap_client module to fetch documents from the XCAP servers with HTTP requests.
Default value is “0”.
Example 1.5. Set integrated_xcap_server
parameter
... modparam("presence_xml", "integrated_xcap_server", 1) ...
The address of the xcap servers used for storage. This parameter is compulsory if the integrated_xcap_server parameter is not set. It can be set more that once, to construct an address list of trusted XCAP servers.
Example 1.6. Set xcap_server
parameter
... modparam("presence_xml", "xcap_server", "xcap_server.example.org") modparam("presence_xml", "xcap_server", "xcap_server.ag.org") ...
The module requires 1 table in OpenSIPS database: xcap. The SQL syntax to create it can be found in presence-create.sql script in the database directories in the opensips/scripts folder. You can also find the complete database documentation on the project webpage, http://www.opensips.org/html/docs/db/db-schema-1.4.x.html.