A VoIP application, that controls and manages Asterisk (PBX).
Handle 6000 registered extensions
Handle 1800 concurrent calls
High Availability
Laravel - is a web application framework with expressive, elegant syntax
Mysql - is an open-source relational database management system
Asterisk - an open-source framework for building communications applications
Alembic - is a lightweight database migration tool for usage with the SQLAlchemy Database
SIPp - is a free Open Source test tool / traffic generator for the SIP protocol
Docker - is a set of platform as a service products that use OS-level virtualization to deliver software in packages called containers
- Docker 20.10 or higher
- docker-compose 2.7 or higher
- Firewall Configuration
Open required ports
You must open these ports on the docker server host. Because Asterisk service in docker-compose.yml uses Host network and docker can't open a large number of ports in bridge mode yet.
sudo ufw allow 5060,5061/tcp
sudo ufw allow 5060,5061/udp
sudo ufw allow 10000:20000/udp
Clone Repository and move to laravel directory
git clone https://github.com/thinker-amir/VoIP
cd VoIP/laravel
Install Compose Dependencies
./install_composer_dependencies
Create .env File
cp .env.example .env
Config your .env File (example)
vi .env
Set Some Import Variables
HOST_ADDRESS= # Set your host ip or domain ... DB_HOST=mysql
DB_PORT=3306
DB_DATABASE=asterisk
DB_USERNAME=asterisk
DB_PASSWORD=asterisk
FORWARD_DB_PORT=33060
Warning:
It dose not prepare for production environment. Use it only on testing environment.
./vendor/bin/sail up -d
Insert Defaults to Database
create 6000
endpoints (extensions) and sipp extensions for test concurrent calls
./vendor/bin/sail exec laravel php artisan db:seed
Options explanations
Option | Description |
---|---|
-s | Exten |
-d | Controls the length of calls in msec |
-l | Limit simultaneous calls |
-m | Stop and exit after specified tests count |
-r | Scenario execution rate |
See SIPp cheatsheet for more information. |
sail exec sipp sipp <HOST_ADDRESS> -sf REGISTER_SUBSCRIBE_client.xml -inf REGISTER_SUBSCRIBE_client.csv -m 6000 -l 200 -r 200 -d 10000
Change <HOST_ADDRESS> to your docker host address
You should see the result like following picture
sail exec sipp sipp -s 1 <HOST_ADDRESS> -d 20000 -l 1800 -m 1800 -r 200
Change <HOST_ADDRESS> to your docker host address
You should see the result like following picture
Tune performance according to Asterisk's article guide See this link for more information.