Presence server configuration
This page contains information about the configuration of the presence server and how to set the proxy to communicate with it. If you don't know what the presence server is, you should visit the feature page concerning the presence server before going further.
Launching the presence server
Using SystemD
Simply use the following command to start the service:
Don't forget to enable the service if you want it to start at system boot-up:
Invoking Flexisip directly
Presence server configuration
At startup, the presence server reads all the parameters in the [global] section (except network settings) and the parameters in the [presence-server] section.
Basic configuration
# Make the server to listen on localhost and port 5065
transports=sip:127.0.0.1:5065;transport=tcp
# Expire time used for PUBLISH requests emitted by the server.
expires=600
Long-term presence configuration
transports=sip:127.0.0.1:5065;transport=tcp
expires=600
long-term-enabled=yes
Long-term presence feature use the same parameters as the Authentication module for user database access. So all the parameters concerning the user database in the module::Authentication section must be set to have the long-term presence working.
db-implementation=soci
soci-backend=mysql
soci-connection-string=db=mydb user=user password='pass' host=myhost.com
soci-password-request=<your custom SQL request>
If you need alias support, you have to set soci-users-with-phones-request along with the SQL request for user passwords.
Enabling Resource Lists feature (RFC 4662)
To enable the server known resource list feature, you just need to specify connection information to a MySQL/MariaDB database which does the matching between a list name and a list of SIP identities.
transports=sip:127.0.0.1:5065;transport=tcp
expires=600
rls-database-connection=db=mydb user=user password='pass' host=myhost.com
rls-database-request=<your custom SQL request>
Configure the proxy to communicate with a presence server instance
Presence servers are not designed to be used directly with user agents, but they are to be placed behind a SIP proxy. In order to make the Flexisip proxy forward presence-related requests (SUBSCRIBE / NOTIFY) to a presence server, the module::Presence must be enabled and a SIP URI going to the presence server must be set.
enabled=true
presence-server=sip:127.0.0.1:5065;transport=tcp