Documentation

Documentation.Tutorials-Presence-PresenceServer History

Hide minor edits - Show changes to markup

May 09, 2013, at 01:38 PM by 79.118.227.150 -
Changed lines 1-63 from:

Documentation? -> Presence Tutorial -> Presence Server

Presence Server

written by Anca Vamanu

  1. Features
  2. Architecture
  3. Module Description
  4. Configuration
  5. Database

Features

  • privacy rules with XCAP storage
    • a faster integrated xcap mode that uses a database as an interface with the XCAP server ( works with OpenXCAP )
  • fast caching with periodic update in database
    • a fallback to database mode can be configured useful when more than one server is used for a domain
  • extensible - new events to be handled by the server can be added easily due to the layered architecture

Architecture

Presence Diagram (click to enlarge) http://www.opensips.org/images/presence-schema-small.jpg

Module Description

  • PRESENCE module - a general, event package independent Subscribe, Publish handler Notify generator according to RFCs 3265 and 3903
  • PRESENCE_XML and **PRESENCE_MWI modules - clients for PRESENCE module; register specific events to be handled by PRESENCE module:
    • presence_xml: 'presence'( RFC 3856) , 'presence.winfo' (RFC 3857), 'dialog;sla' (draft-anil-sipping- bla-03.txt)
    • presence_mwi: 'message-summary' (RFC 3842)
  • XCAP_CLIENT module - an XCAP client interface with data retrieving functionality only, for OpenSIPS modules.

Configuration

The architecture in the diagram corresponds to a full configuration, when no restrictions are imposed, with privacy permission rules handling enabled and the use of a general XCAP server. There is the possibility to simplify the scheme according to the needs and resources. This can be done by configuring the modules so that some connections are removed or others appear.

  1. The most simple configuration is a presence server without privacy rules, when anybody is allowed to see the presence status of anybody and there is no need for an xcap server. In this case the xcap part disappears from the scheme. You can see a configuration file example for this case here. This mode of operation is configured by setting the flag force_active which is a module parameter for presence_xml module.
  2. If you want presence privacy rules enabled and you use a XCAP server, but one that communicates with the OpenSIPS Presence Server through a database table ( like OpenXCAP) than you can configure the presence server to work in an integrated xcap sever mode. For this you have to set the integrated_xcap_server parameter from presence_xml module. In this case the scheme simplifies by removing the xcap_client module and having the presence_xml module communicates only with the database. See configuration file example here.
    You will notice in the configuration file that the mi_xmlrpc module is also loaded. The MI interface needs to be activated, so that OpenXCAP can signal to OpenSIPS when a change occurs in the presence rules documents. In this way the changes be effective immediately.The MI command that is sent in this case is 'refreshWatchers'.
  3. If you decide to have a presence server with privacy authorization and not use an integrated xcap server, an improvement can be made in this case also. For a non integrated XCAp server, xcap_client module has to be used and the address of the server( or servers) must be set using the presence_xml modules parameter - xcap_server. The xcap_client module has the task to retrieve XCAP documents from XCAP servers and store them in database. Also the module can be asked to synchronize documents saved in database with those on the server. For this a mean of detecting an update is required. The general mean, that apply to every XCAP server is periodical query. There is however the possibility for the server to signal an update to the module. For this the module has to be able to send refreshXcapDoc MI command when an update occurs. If you are using a XCAP server able to send this command then you can configure the server to work in no periodical query mode. For this you have to unset the xcap_client module parameter periodical_query ( set it to 0).
  4. Another configuration option refers to the way the presence module stores information. The default method is caching with periodical update in database for fast processing. However, if you have more presence servers serving the same domain and sharing the same database, this mode will not work. In this case you need to ensure that the servers will be able to communicate through the database. This can be achieved by setting the presence module parameter fallback2db.

Database

Presence Server requires 4 tables in database:

  1. active_watchers : stores the active Subscribe dialogs
  2. presentity: stores the published information
  3. watchers: stores the subscription status of the watchers
  4. xcap: stores the XCAP documents

The first three tables are only used internally by the server. The xcap table is either used as a communication interface between the XCAP server (if the server is working in 'integrated_xcap' mode) or as a communication means between the xcap_client module which populates the table and presence_xml module which uses that information.

(:commentboxchrono:)

to:

Documentation -> Tutorials -> Presence


OpenSIPS Presence

Note: Most of these instructions relate to 1.4 version. For an up to date tutorial see OpenSIP and OpenXCAP tutorial.

I. Presence Server

  1. Architecture
  2. Module Description
  3. Configuration
  4. Database

II. Presence User Agent Extensions?

  1. pua_usrloc
  2. pua_mi
  3. pua_xmpp
  4. pua_bla
  5. pua_dialoginfo

III.Resource List Server?

  1. Features
  2. Description
  3. Configuration
  4. Database

IV. Slides from the presentation held at VON San Jose, 2008 describing with schemes and examples all presence features in OpenSIPS.

May 09, 2013, at 11:38 AM by 109.99.235.212 -
Changed line 1 from:

Resources -> Documentation -> Presence -> Presence Server

to:

Documentation? -> Presence Tutorial -> Presence Server

April 26, 2013, at 11:29 AM by 109.99.235.212 -
Changed line 41 from:
  1. The most simple configuration is a presence server without privacy rules, when anybody is allowed to see the presence status of anybody and there is no need for an xcap server. In this case the xcap part disappears from the scheme. You can see a configuration file example for this case here?. This mode of operation is configured by setting the flag force_active which is a module parameter for presence_xml module.
to:
  1. The most simple configuration is a presence server without privacy rules, when anybody is allowed to see the presence status of anybody and there is no need for an xcap server. In this case the xcap part disappears from the scheme. You can see a configuration file example for this case here. This mode of operation is configured by setting the flag force_active which is a module parameter for presence_xml module.
April 26, 2013, at 11:28 AM by 109.99.235.212 -
Changed line 43 from:
  1. If you want presence privacy rules enabled and you use a XCAP server, but one that communicates with the OpenSIPS Presence Server through a database table ( like OpenXCAP) than you can configure the presence server to work in an integrated xcap sever mode. For this you have to set the integrated_xcap_server parameter from presence_xml module. In this case the scheme simplifies by removing the xcap_client module and having the presence_xml module communicates only with the database. See configuration file example? here.\\
to:
  1. If you want presence privacy rules enabled and you use a XCAP server, but one that communicates with the OpenSIPS Presence Server through a database table ( like OpenXCAP) than you can configure the presence server to work in an integrated xcap sever mode. For this you have to set the integrated_xcap_server parameter from presence_xml module. In this case the scheme simplifies by removing the xcap_client module and having the presence_xml module communicates only with the database. See configuration file example here.\\
April 26, 2013, at 11:24 AM by 109.99.235.212 -
Changed line 38 from:

The architecture in the diagram? corresponds to a full configuration, when no restrictions are imposed, with privacy permission rules handling enabled and the use of a general XCAP server.

to:

The architecture in the diagram corresponds to a full configuration, when no restrictions are imposed, with privacy permission rules handling enabled and the use of a general XCAP server.

April 24, 2013, at 07:17 PM by 109.99.235.212 -
Changed line 33 from:
  • XCAP_CLIENT module? - an XCAP client interface with data retrieving functionality only, for OpenSIPS modules.
to:
  • XCAP_CLIENT module - an XCAP client interface with data retrieving functionality only, for OpenSIPS modules.
April 24, 2013, at 07:15 PM by 109.99.235.212 -
Changed line 30 from:
to:
April 24, 2013, at 07:13 PM by 109.99.235.212 -
Changed line 29 from:
  • PRESENCE module? - a general, event package independent Subscribe, Publish handler Notify generator according to RFCs 3265 and 3903
to:
  • PRESENCE module - a general, event package independent Subscribe, Publish handler Notify generator according to RFCs 3265 and 3903
April 24, 2013, at 06:41 PM by 109.99.235.212 -
Added lines 1-63:

Resources -> Documentation -> Presence -> Presence Server

Presence Server

written by Anca Vamanu

  1. Features
  2. Architecture
  3. Module Description
  4. Configuration
  5. Database

Features

  • privacy rules with XCAP storage
    • a faster integrated xcap mode that uses a database as an interface with the XCAP server ( works with OpenXCAP )
  • fast caching with periodic update in database
    • a fallback to database mode can be configured useful when more than one server is used for a domain
  • extensible - new events to be handled by the server can be added easily due to the layered architecture

Architecture

Presence Diagram (click to enlarge) http://www.opensips.org/images/presence-schema-small.jpg?

Module Description

  • PRESENCE module? - a general, event package independent Subscribe, Publish handler Notify generator according to RFCs 3265 and 3903
  • PRESENCE_XML and **PRESENCE_MWI modules? - clients for PRESENCE module; register specific events to be handled by PRESENCE module:
    • presence_xml: 'presence'( RFC 3856) , 'presence.winfo' (RFC 3857), 'dialog;sla' (draft-anil-sipping- bla-03.txt)
    • presence_mwi: 'message-summary' (RFC 3842)
  • XCAP_CLIENT module? - an XCAP client interface with data retrieving functionality only, for OpenSIPS modules.

Configuration

The architecture in the diagram? corresponds to a full configuration, when no restrictions are imposed, with privacy permission rules handling enabled and the use of a general XCAP server. There is the possibility to simplify the scheme according to the needs and resources. This can be done by configuring the modules so that some connections are removed or others appear.

  1. The most simple configuration is a presence server without privacy rules, when anybody is allowed to see the presence status of anybody and there is no need for an xcap server. In this case the xcap part disappears from the scheme. You can see a configuration file example for this case here?. This mode of operation is configured by setting the flag force_active which is a module parameter for presence_xml module.
  2. If you want presence privacy rules enabled and you use a XCAP server, but one that communicates with the OpenSIPS Presence Server through a database table ( like OpenXCAP) than you can configure the presence server to work in an integrated xcap sever mode. For this you have to set the integrated_xcap_server parameter from presence_xml module. In this case the scheme simplifies by removing the xcap_client module and having the presence_xml module communicates only with the database. See configuration file example? here.
    You will notice in the configuration file that the mi_xmlrpc module is also loaded. The MI interface needs to be activated, so that OpenXCAP can signal to OpenSIPS when a change occurs in the presence rules documents. In this way the changes be effective immediately.The MI command that is sent in this case is 'refreshWatchers'.
  3. If you decide to have a presence server with privacy authorization and not use an integrated xcap server, an improvement can be made in this case also. For a non integrated XCAp server, xcap_client module has to be used and the address of the server( or servers) must be set using the presence_xml modules parameter - xcap_server. The xcap_client module has the task to retrieve XCAP documents from XCAP servers and store them in database. Also the module can be asked to synchronize documents saved in database with those on the server. For this a mean of detecting an update is required. The general mean, that apply to every XCAP server is periodical query. There is however the possibility for the server to signal an update to the module. For this the module has to be able to send refreshXcapDoc MI command when an update occurs. If you are using a XCAP server able to send this command then you can configure the server to work in no periodical query mode. For this you have to unset the xcap_client module parameter periodical_query ( set it to 0).
  4. Another configuration option refers to the way the presence module stores information. The default method is caching with periodical update in database for fast processing. However, if you have more presence servers serving the same domain and sharing the same database, this mode will not work. In this case you need to ensure that the servers will be able to communicate through the database. This can be achieved by setting the presence module parameter fallback2db.

Database

Presence Server requires 4 tables in database:

  1. active_watchers : stores the active Subscribe dialogs
  2. presentity: stores the published information
  3. watchers: stores the subscription status of the watchers
  4. xcap: stores the XCAP documents

The first three tables are only used internally by the server. The xcap table is either used as a communication interface between the XCAP server (if the server is working in 'integrated_xcap' mode) or as a communication means between the xcap_client module which populates the table and presence_xml module which uses that information.

(:commentboxchrono:)


Page last modified on May 09, 2013, at 01:39 PM