Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CTI Programming Library

Status
Not open for further replies.

gregarican

IS-IT--Management
Jan 31, 2002
469
US
I posted this in the Merlin Legend forum and figured that it might be appropriate here as well.

Here is an announcement of my first release of a free, open source library which allows a developer to easily tap into TSAPI resources. If anyone is familiar with Ruby, which is an easy-to-learn programming language, you can get started talking to your Legend, Magix, Definity, etc. PBX in no time. Check for details on what Ruby is and how to get it.

Anyway, here's the announcement...


The initial release of RubyPhone 0.1 is available for download at
This project allows a
TSAPI-compliant PBX system to join a CTI environment. The library is
written in Ruby, in conjunction with Ruby/DL and Win32API wrapped
calls. I have included a couple of basic call control methods and
single monitor method for the initial release. More TSAPI methods to
come. The target platform is currently x86 Win32, although with some
contribution other OS types could certainly hook into the wrapped TSAPI
calls exclusively using Ruby/DL.


There is sample code and RDoc details included in the download if
anyone is interested. Feel free to check it out and let me know any
questions or suggestions.


Thanks!
 
Nice work! I've done (and being doing so far ) all my CTI apps using JTAPI , now here is another alternative that I'll definetely gonna check out :)

Thanks for the info
 
Thanks for the kind words. My library right now only consists of a couple of TSAPI methods. Open the stream, monitor on, monitor off, make a call, take a call, hangup a call, and close the stream. As time goes by I plan to add other methods. This came out of the need I had of piping CTI screen pops into a CRM application I wrote in Ruby. I didn't want to link to some external Java, C, C++ application for the screen pops and couldn't find any existing Ruby TSAPI libraries. So I rolled my own.

If you are familiar with Ruby and have worked in JTAPI then feel free to contribute. I have a long way to go :)
 
Cool , thanks! :)
 
By the way gregarican, have you find the way to send configuration commands to PBX through CTI ? As far as I know, it is not possible right ?

Thanks!
Mario
 
If you are talking about PBX configuration commands there are some methods that deal with this. cstaEscapeService() and the like. If you have the TSAPI documentation provided by Avaya check Chapter 9 for details. The commands and parameters used would be peculiar to the PBX platform however, and I doubt that Avaya publishes them. Would love to be wrong about that, though.
 
mfalomir, did you get a chance to check my project out yet? I just added some additional methods today, Ruby equivalents of TSAPI methods such as cstaHoldCall, cstaRetrieveCall, and cstaTransferCall. Plus I extended the monitor method to include all of the different filter and also added call ID parameters to the various call control methods so multiple calls can be juggled.

I have a long way to go, but I'm getting there :)
 
Hi gregarican, yeah, Im still going through the code :) Im kinda new to Ruby though :) Does ruby supports Threads? Are you implementing multithreading...?

 
Yes, Ruby supports threading. It's as simple is something like:

thisThread = Thread.new { someRoutine }
thatThread = Thread.new { anotherRoutine }

thisThread.join
thatThread.join

The brackets indicate the threaded routine that's executed and the join methods force the threads to wait for one another to complete. There is also support for mutexes, forking, etc. If you read through the Ruby "PickAxe" manual that's online you can read up on these subjects. It's pretty easy to implement.

The app I wrote to use my Ruby TSAPI library is based on Qt GUI objects. So there's only a central Qt looping thread. Other threads can't be used as a result due to the Qt implementation. My TSAPI listener in the app is a QtTimer object that checks for incoming phone calls every second and then presents a screen pop if an incoming caller ID matches something in the database.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top