Laravel Asterisk provides a Docker powered local development experience for Asterisk in Laravel that is compatible with macOS, Windows (WSL2), and Linux. Other than Docker, no software or libraries are required to be installed on your local computer before using Laravel Asterisk.
Note: This package is considering you are using
sail
ordocker
.
composer require paxha/laravel-asterisk
You have to simply add a service in docker-compose.yml
.
# For more information: https://laravel.com/docs/sail
version: '3'
services:
# ...
asterisk:
build:
context: ./vendor/paxha/laravel-asterisk/runtimes
dockerfile: Dockerfile
args:
MYSQL_PORT: '${FORWARD_DB_PORT:-3306}'
MYSQL_DATABASE: '${DB_DATABASE}'
MYSQL_USER: '${DB_USERNAME}'
MYSQL_PASSWORD: '${DB_PASSWORD}'
image: laravel-asterisk:latest
ports:
- '${SIP_PORT:-5060}:5060/udp'
- '${IAX_PORT:-4569}:4569/udp'
volumes:
- './vendor/paxha/laravel-asterisk/config:/etc/asterisk'
networks:
- sail
depends_on:
- mysql
networks:
sail:
driver: bridge
And then
sail up -d
To publish the asterisk configuration for i.e. /etc/asterisk
sail artisan asterisk:install
You will see the directory for asterisk configurations and modify according to your requirement.
asterisk
│
└───config
│ asterisk.conf
│ modules.conf
│ res_odbc.conf
│ ...
Laravel Asterisk is open-sourced software licensed under the MIT license.