On this page |
๐ What’s about
This scenario occurs if you decide to install the push gateway on the same machine (even if we suggest to use an other machine.
METTERE IMMAGINE
๐ Docker Compose File
In this paragraph we’ll analyse the file da correggere perchè aperta solo 5060 per udp e non tcp E MANCA 9998 PER TLS
file that you need to download and launch, but before running the file you need to follow the requirements published below -In the file you will find as directives:
push-gateway for notification system
redis for cache
redisinsight for dashboard
drachtio for the stack SIP. In this case you must consider that in SIP protocol the used default ports are 5060 (for UDP/TCP) and 5061 (for TLS), but on XCALLY the Stack SIP is already present with Asterisk. So for the Stack SIP it’s necessary to insert other ports (a 9999 for UDP/TCP and 9998 for TLS)
command: drachtio --contact "sip:*:9999;transport=udp --external-ip 0.0.0.0" ports: - 9999:9999/udp - 9999:9999
As you can see in the file, as system and container ports, you can indicate the desired ones but they must be identical (e.g. 9999:9999) and you need to insert the same number port after sip (e.g. sip:*:9999).
Moreover as external-ip you have to replace 0.0.0.0 with your public IP with which your system exits
volumes configuration
logging data for logs file
restart : always = if the container crashes, it automatically restarts
networks section
FILE SSH METTI DOMINIO E IP
Requirements
AGGIUNGERE REQUISITI HARDWARE CON ES. 2 CPU E 4 GB DI RAM PIETRO
Mancano le info relative alle caratteristiche del server che deve ospitare il container col push-gateway, quale hardware, ecc
To successfully run the docker-compose.yml file, ensure the following requirements are met:
Docker Engine: Must be installed on the system where you want to run the containers.
AGGIUNGERE COMANDO SE SIAMO SU SCENARIO 1 - SE SCENARIO 1 GIà INSTALLATO IN XCALLY
Se usi altro sistema operativo tieni conto dei comandi di quel sistema operativo
Docker Compose: Ensure Docker Compose is installed, as the docker-compose.yml file will be used to manage the containers.
DI DEFAULT GIà INSTALLATO CON docker - v e docker compose version per vedere se installati
Environment Variables Configuration:
Some environment variables are required for the services to function correctly. Make sure to configure them properly before running the docker-compose.yml.
The necessary environment variables are: RICOPIARE DA FILEDEBUG_LEVEL
: Debug level for the push gateway.TOKEN_KEY
: Token key for authentication.TOKEN_KEY_ID
: Token key ID.TOKEN_TEAM_ID
: Team ID of the token.DRACHTIO_HOST
: Host address of the Drachtio server.DRACHTIO_PORT
: Port of the Drachtio server.DRACHTIO_SECRET
: Secret for the Drachtio server
Ensure these values are set and ready before running the docker-compose.yml.
For the standard configuration, it is highly recommended to have push gateway on a machine separate from XCALLY (Installing the push gateway on the same machine as XCALLY is recommended for testing only, and in that case follow the procedure reported below)
PER I PARTNER O CLIENTI CON + MACCHINE, SE TIENI SEPARATI LO STESSO PUSH GATEWAY SI PUò USARE PER PIù CLIENTI, IN PIù PER RAGIONI SICUREZZA è ISOLATO
๐ก Running the docker-compose.yml File
To run the docker-compose.yml file, follow these steps:
Configure Environment Variables:
Download and open the docker-compose.yml file with a text editor. As installation path, you need to install it come utente root passo a motion e ti sposti in /home/motion ( creando una cartella all’interno nominata push-gateway) :
CARICATO FILE NUOVO INVIATO VIA MAIL - file da correggere perchè aperta solo 5060 per udp e non tcpModify the listed environment variables in the "Requirements" section with appropriate values.
PRENDERE DA FILE
Run the Docker Compose Command:
Open a terminal or command prompt.
Navigate to the directory where the docker-compose.yml file is located.
Run the following command to start the containers:
docker compose up -d
Verify Container Startup:
After running the command, Docker Compose will start the containers in the background.
You can verify the status of the containers by running the command:
docker compose ps
I 4 PACCHETTI
Ensure all services listed in the docker-compose.yml file are running correctly.
Access RedisInsight:
Once running, you can access the RedisInsight web interface by opening your browser and navigating to:
http://serverIP:5540
SERVE PER VISUALIZZARE CONTENUTO DELLA CACHE. è CACHE DASHBOARD, DI DEFAUTL CREATA SENZA DB = add redis database
host : redis
porta da non cambiare di default
alias come vuoi
test connection
aggiungi database
si vedranno TUTTE CHIAVI MEMORIZZATE IN MEMORIA
Use the default credentials (if any) to log in to RedisInsight and monitor the Redis instance
Using the Services:
The services are now running and ready to be used.
You can interact with the push gateway, the Redis server, and the Drachtio server as required.
Configure the firewall to accept requests arriving on ports:
5540 for Redisinsight: optional if you want to reach the service from the web
5060 for Drachtio (mandatory to make it work)
5061 for Drachtio TLS (mandatory to make it work)
๐ How to stop the Containers
To stop and remove the containers (preserving the data), run the following command in the same directory as the docker-compose.yml file:
docker compose down
This command will stop and remove all containers associated with the docker-compose.yml file.
These instructions should guide you through the process of running the provided docker-compose.yml file.
If you encounter any issues during the execution or have additional questions, please don't hesitate to ask for assistance.
Otherwise, to remove the whole stack (including data):
Instead, to remove the single container:
โก๏ธ How to restart the container
<service name>
is the name assigned within the docker-compose.yml e.g. service drachtio
To recreate the single container:
๐๏ธ How to view logs or status
To view container logs:
docker logs <container name>
To view container status:
docker stats
To access a container:
SE DEVI ESPORRE ALL’ESTERNO CAMBIARE PORTA
FILE SSH METTI DOMINIO E IP
๐ฅ How to configure Mobile Agents
In this scenario, when you create Mobile Agents in Staff Section you will need to specify your Push Gateway Address with the correct port.
In Staff → Agents → Edit Mobile Agent → Mobile App section → Mobile App Push Gateway you need to specify the push gateway address, that in this case your IP/XCALLY server address (the same machine you are using) + the specific port used for push gateway (e.g. myxcallyaddress/9999)
To use TLS protocol, being a secure protocol that requires a certificate, the domain must be that of the certificate, so in this field you can apply only the certified domain and not the IP