This page contains some keys 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 useful for, 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:

systemctl start flexisip-presence

Don't forget to enable the service if you want it to start on system boot:

systemctl enable flexisip-presence

Invoking Flexisip directly

/opt/belledonne-communications/bin/flexisip --server presence

Presence server configuration

On starting, the presence server reads all the parameters in [global] section (except network settings) and the parameters in [presence-server] section.

Basic configuration

[presence-server]
# 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

[presence-server]
transports=sip:127.0.0.1:5065;transport=tcp
expires=600

long-term-enabled=yes

Long-term presence feature use the same parameters than the Authentication module for user database access. So, all the parameters concerning the user database in module::Authentication section must be set to have the long-term presence working.

[module::Authentication]
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 parameter in addition of 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 that does the matching between a list name and a list of SIP identities.

[presence-server]
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 a Flexisip proxy forwards 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.

[module::Presence]
enabled=true
presence-server=sip:127.0.0.1:5065;transport=tcp
Tags:
Created by François Grisez on 2020/06/02 12:10