Giter VIP home page Giter VIP logo

asterisk-docker's Introduction

Hibou - Asterisk Docker

This Dockerfile provides an easy way to get Asterisk up and running on Docker based infrastructure.

Branches are named after Asterisk major releases. Tags provide minor releases.

Main Features

  • Modern features such as PJSIP
  • Ability to send email through msmtp

Usage

You will likely want to create a docker-compose.yml file with something similar to this.

docker-compose.yml:

version: '2'
services:
  asterisk:
    image: hibou/asterisk:14
    ports:
     - "192.168.100.10:5060:5060/udp"
     - "192.168.100.10:5060:5060/tcp"
     - "192.168.100.10:10000-10099:10000-10099/udp"
     - "192.168.100.10:8088:8088"
     - "192.168.100.10:8089:8089"
    volumes:
     - "./var/conf/msmtprc:/etc/msmtprc"
     - "./var/conf/asterisk:/etc/asterisk"
     - "./var/data/asterisk:/var/lib/asterisk"
     - "./var/data/asterisk-spool:/var/spool/asterisk"
     - "./var/ssl:/ssl"
    networks:
      default:
        ipv4_address: 10.1.2.10

networks:
  default:
    ipam:
      config:
      - subnet: 10.1.2.0/24

This assumes a lot, but should provide a reasonable structure for things like your Asterisk configuration (/etc/asterisk) and setting up a static IP for the container in its own subnet for easier NAT workarounds.

This setup is flexible enough to provide custom IVR's, inbound SIP Trunks, both SIP based phones and WebRTC clients, and voicemail via email.

Initial Configuration

When you first start working, you may want access to the default configuration and data directories. Simply mount them somewhere else on the system and then copy the existing directories into your external ones.

volumes:

- "./var/conf/asterisk:/ic"
- "./var/data/asterisk:/id"
- "./var/data/asterisk-spool:/ids"

docker-compose run --rm asterisk bash -c "cp -R /etc/asterisk/* /ic && cp -R /var/lib/asterisk/* /id && cp -R /var/spool/asterisk/* /ids

You can create a configuration file for msmtp like the following.:

defaults
auth on
tls on
tls_certcheck off
logfile /var/log/msmtp.log

account default
host mail.your.domain
port 587
from [email protected]
user [email protected]
password yoursecretpassword

Customization

Obviously you will want to edit your /etc/asterisk/ files, especially rtp.conf to match ports from the outside world.

License

Hibou maintains this project solely at its own will and provides no warranty.

This project -- Copyright Hibou Corp. 2016.

Asterisk is distributed under the GPLv2

Asterisk -- Copyright Digium Inc.

asterisk-docker's People

Contributors

jaredkipe avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.