Not So Quick Start - rubyists/tiny_call_center GitHub Wiki
- Ruby 1.9.2 Here's an easy way to install this and keep it local to a user
- innate gem (gem install innate)
- freeswitcher gem
- sequel gem
- sqlite3 gem (unless you want to use postgres, see Suggested)
- log4r gem
- Freeswitch (of course)
- Node.js
- Coffee Script
- 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
git clone http://github.com/rubyists/tiny_call_center.git
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 suremod_callcenter
loads
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.
Export environment variables (see options.rb for the defaults and what vars to set)
Two ways to do this
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
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
cd tiny_call_center
mkdir db
rake migrate
set TCC_DB to postgres://user:pass@server/database
- Any database uri accepted by Sequel will work for DB
rackup -p 7070
thin -R config.ru -p 7070 start
./bin/fs2ws
- 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 matchAccount.registration_server
. - For the below Account example, extension would be
1011
, full name would be 'John Lennon', and contact would besofia/internal/[email protected]
- Assign agents to tiers
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
- Set up an interface to add managers and accounts via web.
- Detailed Install Docs
- a FAQ