Git Product home page Git Product logo

queue-tip's Introduction

=========================================================
Queue-Tip
Copyright (c) 2008 Jayson Vaughn ([email protected])
Distributed under the terms of the GNU General Public License.
==========================================================

About
-----
Queue-Tip is an Asterisk Queue Monitoring and reporting tool
using Adhearsion and designed with the Ruby on Rails framework.

Features include:
  - Real-time, live view, of Asterisk queues updated seamlessly using Javascript 
  - Queue stats are collected in real-time using Adhearsion 
  - Load Asterisk's queue_log file into a database
  - Run reports on agent and queue stats.  
  - Partition agents in to "groups" for reporting needs..
  - Export reports in csv format


Requirements 
------------
In order to run Queue-Tip you will need:
  - ruby (>= 1.8)
  - rubygems
  - rails (>= 2.3)
  - adhearsion (>= 0.8.1)
  - fastercsv rubygem


Asterisk Manager Interface Setup
--------------------------------
Make sure that the Asterisk Manager Interface is enabled.
From the asterisk server:

  1) Open /etc/asterisk/manager.conf with an editor and set the following*:

      enabled = yes
      port = 5038   
      bindaddr = 192.168.1.25

    * Note: set bindaddr to the server's IP address.


  2) Create a user to access the Asterisk Manager Interface; insert toward the bottom of manager.conf*:

      [queuemanager]
      secret = secret420
      deny=0.0.0.0/0.0.0.0
      permit=192.168.1.0/255.255.255.0
      read = system,call,log,verbose,command,agent,user,config
      write = system,call,log,verbose,command,agent,user,config

    * Note: In the above example, 'queuemanager' is the username and 'secret420' is the password.


  3) You must reload the manager asterisk module by either restarting asterisk or 'module reload manager' from within the Asterisk CLI.  Refer to Asterisk documentation for further information.


Obtaining Queue-Tip
-------------------

You can obtain released packages of Queue-Tip from:

http://queue-tip.rubyforge.org

Git:
  
If you wish to obtain from github.com, run:

      $ git clone git://github.com/thedonvaughn/queue-tip.git

You can obtain the upstream source via git, run:
    
     	$ git clone git://rubyists.com/gits/queue-tip.git
      

      
Installation
------------  
In order to have Queue-Tip load the queue_log file for reporting, it's easer
to install Queue-Tip on the same server as Asterisk*.

* Note: It is very much possible to setup Queue-Tip on a different server than Asterisk
  and still have the queue_log loaded for reporting, but it is currently unsupported and
  takes some modification of the setup.  This will be a feature in Queue-Tip very soon!

  1) Make sure you have Adhearsion installed by either running:
      
      $ sudo gem install -r adhearsion

      or

      $ rake gems:install (from within the Queue-Tip working directory) 


  2) Make sure you have the fastercsv rubygem installed by either running:
  
      $ sudo gem install -r fastercsv 
     
     or 
     
      $ rake gems:install (from within the Queue-Tip working directory)
  
  
  3) Open up and edit config/startup.rb based on the Asterisk Manager Interface settings*: 

      config.asterisk.enable_ami :host => "localhost", :username => 'username', :password => 'secret', :events => true


  4) Now you must start the Asterisk proxy; from within the Queue-Tip working directory issue

      $ ahn start bin/ami_proxy
        INFO ahn: Starting DRb on localhost:9050
        INFO ahn: Adhearsion initialized!
 

    
  5) Next, like any Rails application, we need to create a database that Queue-Tip 
     can connect to and use.  In this setup, we will be using sqlite3* as our database.  
     This will require the ruby-sqlite3 rubygem.  To install ruby-sqlite3, run:

     $ sudo gem install -r ruby-sqlite3

     
     * Note: We can use mysql, postgresql, or oracle as our database.  
       Refer to the Ruby on Rails documentation for further information.

  
  6) Open up and edit config/database.yml to define the databases.  Here is our
     database definitons*.  Refer to Ruby on Rails documentation for more info.

      # SQLite version 3.x
      #   gem install sqlite3-ruby (not necessary on OS X Leopard)
      development:
        adapter: sqlite3
        database: db/development.sqlite3
        timeout: 5000

      # Warning: The database defined as "test" will be erased and
      # re-generated from your development database when you run "rake".
      # Do not set this db to the same as development or production.
      test:
        adapter: sqlite3
        database: db/test.sqlite3
        timeout: 5000

      production:
        adapter: sqlite3
        database: db/production.sqlite3
        timeout: 5000

  
  7) Create the database*, run:

      $ rake db:create

    * Note: By default in Ruby on Rails, you are in the 'development' environment.
            Refer to Ruby on Rails documentation for more info


  8) Populate the database*, run:

      $ rake db:migrate

    * Note:  By default you are in the development environment so this
             will populate the development database defined in 
             config/database.yml above.
  
  9) To start up Queue-Tip in development mode, run*:
      
      $ ./script/server

    This will start up Queue-Tip on port 3000.

    * Note: I suggest using 'mongrel' webserver for development in rails, run: 
            $ sudo gem install -r mongrel' to install
            Once installed, /script/server will run mongrel by default.
  

  10) Open a web browser and connect to port 3000 of the server;  i.e.  http://192.168.1.25:3000. 
      Congratulations!  You are connected to Queue-Tip.

Support
-------
IRC: #queuetip on FreeNode
Forums/Bugs: http://rubyforge.org/projects/queue-tip/

queue-tip's People

Contributors

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