On this page |
|
📋 What’s about
The XCALLY Flexisip Docker Project aims to build a Docker image based on Debian 12 with Flexisip. Flexisip is a SIP proxy specifically used for handling SIP communications and Apple
Push Notifications for the XCALLY mobile app. This project ensures a simple setup to integrate Flexisip within a Dockerized environment for improved scalability and manageability.
The following directory and file structure is included:
conf/: Contains Flexisip configuration files, Apple Push Notification (APN) certificates, and TLS certificates.
flexisip.conf: Main configuration file for Flexisip. Refer to the official Flexisip Configuration Reference Guide for detailed explanations of configuration parameters.
🔧 Building and Running the Docker Image
To build and run the Docker image for the project, execute the following command in your terminal:
Code Block |
---|
docker compose up -d --build |
The Docker Compose setup includes:
redis: Used for Flexisip's cache management.
redisinsight: A tool to visualize and manage Redis content.
⚙️ Configuration Steps
Retrieve Public IP
Retrieve your public IP address and modify the flexisip.conf
file by updating the following line:
Code Block |
---|
redis-server-domain=your_public_ipv4 |
Add xc-redis Database in RedisInsight
On the first launch, add the xc-redis
database in RedisInsight for Redis cache management
Modify Transports Configuration
Update the transports
line in the flexisip.conf
file with your public and private IPs:
Code Block |
---|
transports=sip:your_public_ipv4:5060;maddr=your_private_ipv4 |
If you are using AWS, you can retrieve the private IP by running the following command:
Code Block |
---|
curl http://169.254.169.254/latest/meta-data/local-ipv4 |
Enable TLS Support
To enable TLS encryption, upload your TLS certificates to the conf/tls
directory and configure their paths in the flexisip.conf
file as shown below:
Code Block |
---|
tls-certificates-file=path_to_cert tls-certificates-private-key=path_to_key |
Update the transports
line to include the TLS port:
Code Block |
---|
transports=sip:your_public_ipv4:5060;maddr=your_private_ipv4 sips:your_domain_name:5061;maddr=your_private_ipv4 |
APN Certificate for Apple Push Notifications
The conf/apn
directory contains the com.xcally.mobile.voip.prod.pem
certificate used for Apple Push Notifications. It is essential to regenerate and share this certificate with clients annually to
ensure continued compatibility and functionality.
➡️ Running and Stopping the Project
To start the project, use the following command:
Code Block |
---|
docker compose up -d --build |
To stop the project, run:
Code Block |
---|
docker compose down |
The xc-flexisip
container is configured to use the host network, which exposes TCP and UDP ports externally. By default, ports 5060
(for SIP) and 5061
(for TLS) are exposed. Modify these
ports in the configuration as required for your XCALLY environment.
👥 XCALLY Agent Mobile Configuration
In the XCALLY mobile agent configuration, set the Push Gateway field with the appropriate domain or IP, followed by the port:
For TCP:
35.180.251.85:5060
For TLS:
flexisip.xcally.com:5061
Remember to configure the correct codec in the Voice section (tab) to ensure proper functionality.
Info |
---|
It is recommended to avoid using the UDP protocol due to potential performance issues and functionality problems, such as CallerID not being displayed correctly in push notifications. |
Logs Management
A log
directory is created to store Flexisip log files. To adjust the log verbosity, modify the loglevel
parameter in the flexisip.conf
file:
Code Block |
---|
log-level=debug |
After making changes to the configuration, restart the xc-flexisip
container to ensure Redis cache consistency and prevent the loss of mobile app registrations.
🔖 Repository Availability
This project is available in our Bitbucket repositoruy at the following link