Not So Quick Start - rubyists/tiny_call_center GitHub Wiki

Not So Quick Start

Prerequisites

Mandatory

Development dependencies

  • Node.js
  • Coffee Script

Suggested

  • thin gem, better faster web serving platform for ruby than the default
  • runit or daemontools for supervision
  • PostgreSQL, for any database triggers
  • pg gem, for using postgres instead of sqlite under Tiny Call Center
  • TinyCDR, for call detail reporting

Install

git clone http://github.com/rubyists/tiny_call_center.git

Configure

Mod_Callcenter

edit conf/autoload_configs/callcenter.conf.xml

  • Remove everything but <queues>

  • rename the default queue, if you want

  • add any queue definitions you will use

  • edit modules.conf to make sure mod_callcenter loads

Optional

If you are running postgres, you can put it under mod_callcenter instead of the default sqlite3 db it uses.

Set up the odbc dsn in the callcenter.conf.xml to a postgres odbc dsn you've set up.

You have to create the db in postgres but you do not have to fill in the schema, mod_callcenter will create the schema when it loads the first time.

Configure

Export environment variables (see options.rb for the defaults and what vars to set)

Two ways to do this

1. chpst or envdir

create an 'env' directory, we'll use ~/.tccenv here

cp sv/env ~/.tccenv
vim ~/.tccenv/*

After modifying the variables, you can run your processes like this

chpst -e ~/.tccenv ./bin/fs2ws
chpst -e ~/.tccenv irb -r ./model/init
envdir ~/.tccenv ruby start.rb

2. Use an environment file

create the initial file

for var in sv/env/*;do echo export $(basename $var)="$(<$var)" >> ~/.tccrc; done
vim ~/.tccrc

Edit the variables to your liking, add any you want (see options.rb for possibilities), then bring this into your environment

source ~/.tccrc

And run your scripts in this environment

Setup

Set up database (defaults to sqlite, see For PostgreSQL for postgres)

cd tiny_call_center
mkdir db
rake migrate

For PostgreSQL

set TCC_DB to postgres://user:pass@server/database 
  • Any database uri accepted by Sequel will work for DB

Run

Webserver

With webrick

rackup -p 7070

With thin (recommended)

thin -R config.ru -p 7070 start

Websockets listener, FreeSWITCH Event Socket Listener

./bin/fs2ws

Post-Install

  • Go to http://your_server:7070/tiers and set up some agents
  • Only need to set Extension and Firstname Lastname, Contact (to a full FreeSWITCH Dialstring)
  • Make sure contact is sofia/internal/destination_number@registration_server for compatibility with the Account, can use any profile, not just internal; registration_server is the one which has to match Account.registration_server.
  • For the below Account example, extension would be 1011, full name would be 'John Lennon', and contact would be sofia/internal/[email protected]
  • Assign agents to tiers

And now make your Accounts

irb -r ./app.rb
  TCC::Account.create(
    username: "JohnLennon",
    extension: '1011',
    first_name: 'John', 
    last_name: 'Lennon',
    registration_server: '192.168.1.50',
    password: 'The;whIte;4lbum'
  )
  • Log in as an agent to http://your_server:7070

Contributions Wanted

  • Set up an interface to add managers and accounts via web.
  • Detailed Install Docs
  • a FAQ
⚠️ **GitHub.com Fallback** ⚠️