– Kamailio SIP Server –

Kamailio (OpenSER)'s Presence Module

Kamailio 3.1.x

There is a complete tutorial for SIP SIMPLE presence using the embedded XCAP server, newly added in Kamailio 3.1.x:

Kamailio 1.5.x or 3.0.x

Kamailio (OpenSER) 1.5.x and Kamailio (OpenSER) 3.0.x include in the default config what is needed to have a SIMPLE presence server - to enable it you have to:

  • in 1.5.x: run a sed command over cfg file
  • in 3.0.x: edit cfg file and define WITH_PRESENCE

Read the top of config file for instructions.

Kamailio (OpenSER 1.3)'s Presence Module

Presence Diagram (click to enlarge)

  1. PRESENCE module- a general, event package independent Subscribe, Publish handler – Notify generator according to RFCs 3265 and 3903
  2. 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)
  3. XCAP_CLIENT module- an XCAP client interface with data retrieving functionality only, for OpenSER modules.

Presence_xml and xcap_client interaction(when integrated_xcap_client parameter is not set)

Presence_xml module assumes that in the database table 'xcap' there is always the newest version of an xcap document that he has previously sent a request for to xcap_client module. When a searched document is not found in the table, a request is sent to the xcap_client module, saying it to retrieve the document from the xcap server in future synchronize the version in the database table with that on the server.

Other configuration possibilities

The chart shows the interactions when no restrictions are imposed. There is however the possibility to configure the modules so that some connections are no longer needed or some other appear.

  1. Presence module
    • fallback2db: the database is also queried for Subscribe dialog information, assuming that there might be others stored there besides the ones from the servers cache, when more servers share the same database.
  2. Presence_xml module
    • force_active: the connection with xcap_client module disappears; no query for rules doc- all subscriptions are allowed.
    • integrated_xcap_server: again the connection with xcap_client module disappears; the module only queries the database table which should be filled by the xcap_server and if no record is found then supposes that it does not exist on the server.
  3. Xcap_client
    • periodical_query: if this parameter is unset ( set to 0 ), then the connection from xcap_client to the XCAP server for query for updates disappears. In this case, the xcap_client module expects to receive a MI command from the server when an update occurs.

Kamailio (OpenSER) 1.2's Presence Module

This is a new implementation of a Presence Server for OpenSER. It is a new module named presence – to see details about it look at “Module exports” chapter.

The source code is now in CVS, you can browse online the readme file for module at http://www.kamailio.org/docs/modules/devel/presence.html.

Sample configuration files are provided in “Configuration file” chapter. Before starting Presence Server, you have to create required tables presented in “Database tables” chapter.

Module exports

Configuration file

Database Tables

PRESENCE Module Readme

This is a new development, please provide any feedback you may have to devel@kamailio.org. During the development it was tested extensively with XTen X-Lite v3.0.

This site should collect user's experience to make the deployment of new Presence Server easier.

At this moment it works only in DB mode, there is no caching, all data is stored in database.

Frequently Asked Questions

Experiences using Presence with different devices

ChangeLog

2006-10-13: renamed module parameters in sl and presence to 'totag_avpid'
            the source code has been imported in the CVS

2006-09-26: - new column in 'presentity' table: 'received_time' allows to detect last PUBLISH request
            to be able to overcome problems with broken clients which send PUBLISH refresh without
            SIP-Etag header.
            - you have to recreate 'presentity' table and download again the tarball of Kamailio (OpenSER).

2006-09-24: Initial release