GithubHelp home page GithubHelp logo

carlosroberto555 / callcentermonitor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from silentindark/callcentermonitor

0.0 1.0 0.0 444 KB

Monitor de colas asterisk con memcached

License: MIT License

PHP 5.39% CSS 0.23% JavaScript 94.22% HTML 0.17%

callcentermonitor's Introduction

CallCenterMonitor

Es una aplicación php web para monitorear colas en Issabel/Asterisk. Funciona para canales definidos como operadores directamente con el tipo de tecnología, ej: SIP/201, IAX/301.

Utiliza memcached para guardar los datos en memoria y minimizar de esa manera las consultas al AMI de Asterisk, el proceso es:

Debe existir el usuario y grupo asterisk en el S.O.

  1. Procesar de datos:

    Consulta al AMI -> Procesar datos de las colas -> Guardar datos a memoria

  2. Presentación de datos mediante aplicación web MVC:

    Lectura de datos desde memoria -> Presentación web de los datos.

Instalacion (Centos 7)

Instalar utilitarios:

yum install memcached libmemcached php-pecl-memcached composer httpd php

Clonar la aplicación:

cd /opt
git clone https://github.com/neovoice/CallCenterMonitor.git
ln -s /opt/CallCenterMonitor/QueueMonitor /var/www/html/QueueMonitor
chown -R asterisk. /opt/CallCenterMonitor
chown -R asterisk. /var/www/html/QueueMonitor

Editar /etc/sysconfig/memcached y modificar la línea OPTIONS para quedar así:

OPTIONS="-l 127.0.0.1 -U 0"**

Habilitar e iniciar el servicio memcached:

systemctl enable --now memcached

Preparar la aplicación:

su - asterisk
cd /opt/CallCenterMonitor
composer update

Editar la clase de conexión al AMI para incluir un comando, con vim abrir el fichero /opt/CallCenterMonitor/vendor/welltime/phpagi/src/phpagi-asmanager.php y localizar el texto:

    function Command($command, $actionid=NULL)
    {
      $parameters = array('Command'=>$command);
      if($actionid) $parameters['ActionID'] = $actionid;
      return $this->send_request('Command', $parameters);
    }

Agregar a continuación y guardar:

   /**
    * Core Show Channels
    *
    * @link http://www.voip-info.org/wiki-Asterisk+Manager+API+Action+ZapShowChannels
    * @param string $actionid message matching variable
    */
    function CoreShowChannels($actionid=NULL)
    {
      if($actionid)
        return $this->send_request('CoreShowChannels', array('ActionID'=>$actionid));
      else
        return $this->send_request('CoreShowChannels');
    }

Crear el servicio de lectura de información:

cp /opt/CallCenterMonitor/callcentermonitor.service /etc/systemd/system/
systemctl daemon-reload
systemctl enable --now callcentermonitor

Únicamente para Issabel, habilitar el htaccess en la carpeta QueueMonitor. Editar el fichero /etc/httpd/conf.d/issabel-htaccess.conf y agregar al final del mismo:

<Directory "/var/www/html/QueueMonitor">
    AllowOverride All
</Directory>

Recargar apache para incluir la librería memcached y las modificaciones de configuración:

systemctl reload httpd

Uso

Ingresar al url web, Ej: http://127.0.0.1/QueueMonitor/

ejemplo

Colaboración

Este proyecto está abierto a contribuciones y mejoras por quien desee aportar al mismo.

Licencia

MIT

callcentermonitor's People

Contributors

carlosroberto555 avatar neovoice 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.