Giter Club home page Giter Club logo

voip's Introduction

VoIP Application


INTRODUCTION

A VoIP application, that controls and manages Asterisk (PBX).

GOALS

Handle 6000 registered extensions
Handle 1800 concurrent calls
High Availability

TOOLS USED

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

RQUIREMENTS

  • 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

INSTALLATION FROM SOURCE

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.

RUN THE APPLICATION

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

RUN Stress Testing with SIPp

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.

REGISTER 6000 EXTENSIONS

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 alt text

CREATE 1800 CONCURRENT CALLS

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 alt text

Reference Asterisk Performance Tuning

Tune performance according to Asterisk's article guide See this link for more information.

voip's People

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.