paxha/laravel-asterisk

laravel package for asterisk development

1.0.5 2022-04-02 11:54 UTC

This package is auto-updated.

Last update: 2024-12-05 16:51:53 UTC


README

Total Downloads Latest Stable Version License

Introduction

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 or docker.

Installation

composer require paxha/laravel-asterisk

Configuration

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
    │   ...

License

Laravel Asterisk is open-sourced software licensed under the MIT license.