There is a complete tutorial for SIP SIMPLE presence using the embedded XCAP server, newly added in Kamailio 3.1.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:
Read the top of config file for instructions.
Presence Diagram (click to enlarge)
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.
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.
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.
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