Coder Social home page Coder Social logo

callcenter's Introduction

Simple Asterisk callcenter with PHP and Vue.js

Click here for slides from Astricon 2018 presentation (Slideshare)

Deploy

$> ansible-playbook ansible/playbook.yml -i ansible/inventories/production

Server process and frontend

$> php server.php

It will listen to Asterisk AMI on tcp://callcenter.local:5038 and create a Websocket server on tcp://callcenter.local:8080/callcenter

The webpage dashboard is served by builtin Asterisk HTTP server at http://callcenter.local:8088/static/index.html

callcenter.local is added to /etc/hosts

The settings for the server is defined in .env as:

WSSERVERADDRESS=callcenter.local
WSSERVERPORT=8080
ASTERISKSERVER=tcp://localhost:5038
AMI_USERNAME=admin
AMI_PASSWORD=password
REDIS_SERVER=127.0.0.1
ENV=development

The webpage will connect to the websocket server and on connection get the current state of the the backend server process.

Changes from default configuration files in Asterisk:

  • sip.conf
tcpenable=yes
transport=tcp,udp
autocreatepeer=yes

[phones]
type=friend
host=dynamic
port=5060
sipreinvite=no
transport=tcp,udp
secret=password
callevents=yes
directmedia=no
insecure=invite,port
  • manager.d/admin.conf
[admin]
secret = password
read = call,agent,user,security
write = call,command,agent,user,originate
  • http.conf
enabled=yes
bindaddr=0.0.0.0
bindport=8088
enablestatic=yes
redirect= / /static/index.html
  • queues.conf
[q-callcenter]
strategy=random
joinempty=yes
leavewhenempty=no
ringinuse=no

setinterfacevar=yes
setqueueentryvar=yes
setqueuevar=yes

timeout = 60
retry = 10
wrapuptime=15

autopause=yes

reportholdtime=yes
announce-position=yes
announce-holdtime=yes
queue-callswaiting = queue-callswaiting
queue-thankyou = queue-thankyou
queue-youarenext = queue-youarenext
periodic-announce = queue-periodic-announce
periodic-announce-frequency=30
announce-frequency=45
  • extensions.ael

Empty

  • extension.lua

Empty

callcenter's People

Contributors

mor10am avatar morten-amundsen 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.