GithubHelp home page GithubHelp logo

drtr0jan / asterisk-consul-module Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sboily/asterisk-consul-module

0.0 0.0 0.0 244 KB

Register Asterisk on consul

License: GNU General Public License v3.0

Makefile 6.67% C 69.60% HCL 1.60% Shell 1.05% Python 13.23% Dockerfile 7.85%

asterisk-consul-module's Introduction

Consul discovery module for Asterisk

This provides a discovery consul resource for Asterisk, which allows you to use the a discovery service like consul with Asterisk. This module use the consul REST API. It works with asterisk versions 13.x or later

Requirements

Installation

$ make
$ make install

To install the sample configuration file, issue the following command after the 'make install' command:

$ make samples

Configuration

Read the config sample.

If you want to enable the http check, to need to enable the http interface on Asterisk (http.conf) and it need to be accessible by consul.

To use

Loading module

asterisk -r
CLI> modules unload res_discovery_consul.so
CLI> modules load res_discovery_consul.so

Show settings on CLI

asterisk -r
CLI> discovery show settings

To enable or disable maintenance mode

asterisk -r
CLI> discovery set maintenance on
CLI> discovery set maintenance off

Roadmap

Docker

Edit the sample to have the good configuration. To build image to test with docker.

docker build -t asterisk-consul .
docker run -it asterisk-consul bash
asterisk

UDP issue

If you have UDP issue run this command.

docker run --net=host --privileged --rm cap10morgan/conntrack -D -p udp

Docker-compose

docker-compose build --no-cache
docker-compose up -d
docker-compose scale asterisk=5

HA webi (xivo/xivo)

http://your_ip:1936/

Consul webi (token: the_one_ring)

http://your_ip:8500/ui

ARI interface (xivo/xivo)

http://your_ip:8888/ari

Schema

Asterisk Consul screenshot Asterisk Consul Kamailio screenshot

Integration Tests

To execute the integration tests

cd integration_tests
pip install -r test-requirements.txt
make test-setup
make test

asterisk-consul-module's People

Contributors

dwagin avatar lebauce avatar pc-m avatar sboily 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.