Coder Social home page Coder Social logo

asterisk-cti's Introduction

{\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fswiss\fcharset0 Arial;}{\f1\fmodern\fprq1\fcharset0 Courier New;}{\f2\fnil\fcharset2 Symbol;}}
{\*\generator Msftedit 5.41.15.1507;}\viewkind4\uc1\pard\lang1040\b\f0\fs20 1) SETUP YOUR DATABASE\b0\par
First of all, you need a working MySQL. In my tests, I've used mysql 5.0.x. You may need to setup a database before load the Sql needed. For my tests, I use the predefined 'test' database. Within your database, You've to create a table called 'cti'.\par
\par
Here is the Sql syntax (check also the file Docs\\cti.sql):\par
\par
\f1 CREATE TABLE `cti` (\par
  `USERNAME` varchar(255) default NULL,\par
  `SECRET` varchar(255) default NULL,\par
  `HOST` varchar(255) default NULL,\par
  `EXT` varchar(255) default NULL,\par
  UNIQUE KEY `USERNAME` (`USERNAME`),\par
  UNIQUE KEY `EXT` (`EXT`)\par
) ENGINE=MyISAM DEFAULT CHARSET=utf8;\f0\par
\par
This table will contains credential used by the AstCTIServer to authenticate the clients. The passwords are stored as MD5 hash. After creating the cti table, you need to create almost one user. Sorry, but there's no configuration panel yet, so you've to do this job by hand using sql syntax like the following:\par
\par
\f1 INSERT INTO cti VALUES('test',MD5('test'),'0.0.0.0','');\f0\par
\par
The AstCTIClient will update the database with the informations required by the AstCTIServer during logon.\par
\par
Once the database and the cti table are ready, you'll need to write down mysql user and passsword to setup the server and the clients. I suggest you to create two different mysql acconts, one for the server and the other one for the clients. This document doesn't cover mysql user creation.\par
\par
\b 2) SETUP AstCTIServer\par
\b0 The AstCTIServer requires a .NET 2.0 enabled platform to run. I've tested the server on the following configurations:\par
\par
\pard{\pntext\f2\'B7\tab}{\*\pn\pnlvlblt\pnf2\pnindent0{\pntxtb\'B7}}\fi-284\li710 Microsoft Windows XP SP 2, Microsoft .NET Framework 2.0\par
\pard{\pntext\f2\'B7\tab}{\*\pn\pnlvlblt\pnf2\pnindent0{\pntxtb\'B7}}\fi-294\li720 Linux Fedora Core 7, Kernel 2.6.22, Mono 1.2.5\par
{\pntext\f2\'B7\tab}Gentoo Linux, Kernel 2.6.22, Mono 1.2.4\par
\pard\par
Before to start the AstCTIServer, you need to configure some parameters from the XML configuration file.\par
The configuration file is splitted in four main sections: database, logging, manager, ctiserver.\par
\par
\i database \i0 - contains MySQL database configuration\par
\i logging \i0 - contains the settings for file logging\par
\i manager \i0 - configuration for asterisk manager interface (AMI) connection. (check the manager.conf file in asterisk: you should have configured an account for AstCTIServer connection)\par
\i ctiserver \i0 - server socket configuration parameters.\par
\par
Change the values to match your needs.\par
\par
The AstCTIServer is not yet a Windows Service or a Unix Daemon. So the main application thread will not release the console where it runs. To start AstCTIServer, you can:\par
\pard{\pntext\f2\'B7\tab}{\*\pn\pnlvlblt\pnf2\pnindent0{\pntxtb\'B7}}\fi-294\li720 (on Windows) do a double-click on the AstCTIServer or open a console and issue the AstCTIServer.exe command from the path where the exe is. Or you can do a batch file to start the program\par
{\pntext\f2\'B7\tab}(on Linux) open a console, cd to the AstCTIServer.exe directory and give the following command: mono AstCTIServer.exe \par
\pard\par
If all is right configured, the server should start (check the logs in the logs/ directory) and you should see a manager connection on your asterisk console.\par
\par
\b 3) ASTERISK DIALPLAN\b0\par
In order to get the AstCTIClient work, we can do a basic dialplan configuration.\par
In the directory Docs/Demo you'll find the following files:\par
\par
asterisk/extensions.conf\par
asterisk/sip.conf\par
asterisk/queues.conf\par
asterisk/sounds/astctidemo/enter_five_digits.wav\par
\par
You can copy dialplan demo from the file extension.conf and paste it into your asterisk dialplan. Then you've to copy sip agents from sip.conf to your asterisk sip.conf file and the same for the queues.conf. Adjust all the parameters to match your needs.\par
\par
After this, copy the folder asterisk/sounds/astctidemo to your /var/lib/asterisk/sounds directory.\par
\par
Restart your asterisk dialplan (asterisk -rx "extensions reload").\par
\par
The demo consists of two things:\par
1) Demo at extension "100":\par
The IVR asks for 5 digits. The 5 digits are stored in a variabile called "calldata" and then the call is sent to SIP/201.\par
\par
2) Demo at extension "101":\par
The same as extension 100, but the call is sent to a queue (with only one agent, SIP/201).\par
\par
In both demo, the important part is the function:\par
\f1\par
exten => 101,3,Set(calldata=$\{cdata\})\f0\par
\par
This function is read from AstCTIServer and the value of the calldata variable is then sent to the AstCTIClient once the Link event occurs. So you've to always set a variable called "calldata" before send the call to the clients.\par
\par
\b 4) SETUP AstCTIClient\b0\par
AstCTIClient is a Win32 application written in C# for .NET 2.0. I think that the application can be easly ported to mono with GTK. I'm searching for volunteers...\par
\par
The application User Interface is quite easy. Once started, the client needs to be configured. To do so, click the small Settings button on top of the window: should appear an "Application Settings" window.\par
The Application Settings are divided in Five Categories:\par
\par
\b 1) CTI APPLICATION\par
\b0 a) \b CalleridFadeSpeed \b0 - The speed of fadein effect of the callerid form\par
b) \b CalleridTimeout \b0 - How many seconds the callerid form should be shown before disappear\par
c) \b TriggerCallerid \b0 - Show the callerid form?\par
d) \b CTIContextes \b0 - Inbound calls contextes to match\par
e) \b CTIOutboundContextes \b0 - Contextes for outbound calls (with originate)\par
\par
\b 2) CTI SERVER\par
\b0 a) \b Host \b0 - hostname or ip of the AstCTIServer\par
b) \b Port \b0 - port where the AstCTIServer is bound\par
c) \b Username\b0 , \b Password \b0 - Credential as configured in the "cti" table of the database\par
d) \b PhoneExt \b0 - Phone extension to match (ex. SIP/201)\par
e) \b SocketTimeout \b0 - Timeout of client socket\par
\par
\b 3) DATABASE\par
\b0 a) \b MySQLHost \b0 - the hostname or ip of MySQL Database\par
b) \b MySQLUsername \b0 - Username for MySQL Database\par
c) \b MySQLPassword \b0 - Password for MySQL Database\par
d) \b MySQLDatabase \b0 - the database to access\par
\par
\b 4) INTERFACE\par
MinimizeOnStart \b0 - When true, once the AstCTIClient have done a succesful login, it minimize automatically on tray area\par
\par
\b 5) MISC\par
SaveOnClose \b0 - Save all settings done when the "Application Settings" window is closed.\par
\par
CTIContextes are inbound calls contextes to match. For each context we can start a different application (with different parameters). For our example, add a context called "astctidemo" like the context of asterisk demo dialplan. Set it to enable, give it a name in the "DisplayName" field, and finally add your Application. In the example, you can choose "Internet Explorer" from the directory "c:\\program files\\Internet Explorer\\iexplorer.exe". Add some Parameters like this: "http://centralino-voip.brunosalzano.com/demo_page.php?callerid=\{CALLERID\}&calldata=\{CALLDATA\}&channel=\{CHANNEL\}&uniqueid=\{UNIQUEID\}"\par
\par
When a calls arrive in the astctidemo context for the extension configured on "CTI SERVER/PhoneExt", Internet explorer will be started when the SIP/201 answers the call.\par
\par
CTIOutboundContextes are contextes where we can originate outbound calls. In the example, you can configure an "astctidemo" outbound context to make calls to all extension between 200 and 299 directly from AstCTIClient.\par
\par
Once all the parameters are well setup, make sure that AstCTIServer is running and that it's connected to asterisk. Then make a login with the right credential.\par
\par
Now you can make some test calls from another phone to the extension 100 or 101... Good Luck!\par
\par
\par
\par
}

asterisk-cti's People

Watchers

 avatar

Forkers

cnaya

asterisk-cti's Issues

No Docs

Hi man.

First of all.. I most say.. great work.. simple, easy and it works!

Im testing it right now so if you ever want me to test drive some feature,
let me know.

One thing though... in the howto you mentioned: "In the directory Docs/Demo
you'll find the following files"

but there is no docs/demo folders on neither the server or client files... 

Thx!

Original issue reported on code.google.com by [email protected] on 2 Nov 2007 at 9:30

AstCTIClient crash on Vista

About the error, it happens just after you see the callerid popup on you
screen, when the phone is answered and the configured browser should fire
up. I get one of those windows vista nasty screen saying the application
astcticlient has caused and error and will close. And then astclient closes
on me.

Please give more informations, a screenshot or something useful. Thankx



Original issue reported on code.google.com by [email protected] on 3 Nov 2007 at 8:34

i get two popups Cti client popups insted of one

What steps will reproduce the problem?
1. make a test call
2. pickup call
3. i get two popups 

What is the expected output? What do you see instead?
when the call is picked up i get two popups insted of just one popup.
I wants to get just one popup when i pick up the call.

What version of the product are you using? On what operating system?
Asterisk CTI on windows

Please provide any additional information below.
I am new to it please specify where can i get a good documentation of
Asterisk CTI Server and Client.


Original issue reported on code.google.com by [email protected] on 7 Jan 2010 at 7:06

loading server on linux

Hi darkstar

I was wondering, how can I load the server on linux to make it more stable
and not windows depandant? what do I need to have installed on a centos 4.5
machine for exaample?

Thx!

Anton Krall

BTW, do you have msn messenger?

Original issue reported on code.google.com by [email protected] on 15 Nov 2007 at 5:13

Project resource missing

I have downloaded the project from svn, 
but seems that some resources are missing
I refer in particular to CTI toolbar, I don't see the form for toolbar.

I have interest to understand if you continue developement.

Original issue reported on code.google.com by [email protected] on 22 Jul 2009 at 10:53

asterisk agents

I'm testing the cti system and it works quite well! Bravo Bruno!
I was thinking to contact you because I'would like to add some useful 
functions (if you agree) for call center (agent login/logoff). I made a 
little agi script that get the dtmf look in a mysql table end came back 
with the result, it work fine. After that i configured a couple of agents 
(in agents.conf and queues.conf) if I use the agents instead (with agent 
login) of the SIP channels the astctiserver crash (you will find the 
printout of debug in attach). Seems that the server doesn't receive the 
appdata anymore. Do you think that is an Asterisk problem?
Thanks a lot for your help
I'm reacheable also at [email protected]

Original issue reported on code.google.com by giuseppe.innamorato on 2 Oct 2008 at 8:01

Attachments:

AstCTI on Linux - Connection to DB doesn't work

Hello,

I have problems starting the AstCTI-Server on Debian Linux. I am using Mono
1.2.2.1 with MySQL Server 5.0.32.
When I start the server with mono AstCTIServer.exe --debug, I get the
following message:

MySql.Data.MySqlClient.MySqlException: Unable to connect to any of the
specified MySQL hosts. ---> System.Exception: Exception of type
System.Exception was thrown.
  at MySql.Data.MySqlClient.NativeDriver.Open () [0x00000] --- End of inner
exception stack trace ---
  at MySql.Data.MySqlClient.NativeDriver.Open () [0x00000]
  at MySql.Data.MySqlClient.Driver.Create
(MySql.Data.MySqlClient.MySqlConnectionStringBuilder settings) [0x00000]
  at MySql.Data.MySqlClient.MySqlConnection.Open () [0x00000]
Speicherzugriffsfehler

The logfile also says that there is a problem connecting to the database:

2007-12-18 11:33:36 - INFO  : Testing database connection
2007-12-18 11:33:36 - DEBUG : Connecting to database on: localhost
2007-12-18 11:33:36 - ERROR: Database connection is not avaiable. Exiting

I already tested the database by connecting to the user with mysql -h
localhost -u XXX -p -D cti and it worked fine...

Can you help me? What am I doing wrong? :(

Thanks,
Marco

Original issue reported on code.google.com by [email protected] on 18 Dec 2007 at 10:42

how to compile

Hey man

I just svned the source code but Im new to windows apps and I was wondering:

a. What do I need to have to compile the client on windows, make the
installers, the whole enchilada? (MS Visual Studio)?

b. How to actually do it, any howtos?

I would like to tackle that because I have some ideas I would like to try
out but first I need to be able to compile the whole thing :(

Original issue reported on code.google.com by [email protected] on 18 Nov 2007 at 2:39

Running AsteriskCTI Server under Windows 2009 -- Dos Mode

What steps will reproduce the problem?
Simply installing Asterisk-CTI server on windows 2008 and then putting
appropriate configuration in the config file

What is the expected output? What do you see instead?
Running AstCTIServer.exe from the command line shows me an error message of
"this program cannot be run in text mode" instead of Running AstCTIServer
and adding lines to the log file

What version of the product are you using? On what operating system?
Using binary from the Downloads section and also the latest release

Please provide any additional information below.
I installed AstCTIServer on the same windows installation, after
uninstalling and reinstalling i got the error message using the 2 binaries

Original issue reported on code.google.com by [email protected] on 24 Sep 2009 at 9:12

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.