Telephony Application Programming Interface

Deploying to Windows? Utilizing VB Script execution? This is the place to ask Windows-specific questions.

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
Cewing2379
Posts: 2
Joined: Tue Jul 12, 2016 3:38 am

Telephony Application Programming Interface

Post by Cewing2379 » Tue Jul 12, 2016 4:25 am

Hello all-
Currently working on a CRM and would like to implement the ability for the program to monitor TAPI for incoming calls and then when it returns "true" to display the callerid. Our phone system does work on TAPI as i've downloaded some 3rd party applications that show caller id when the calls come in. My problem is the only documentation/API I can find for TAPI is written for Net of C# neither of which I can understand.I did find a single example of a vbscript that would call a phone number and I figured I could shell something similar to that? I read through the Livecode externals page about 30 times thinking I could use the Windows DLLs for TAPI but after a dozen failed attempts to even get the example to function properly I thought I'd check here. Any advice or ideas would be appreciated. Thanks!

vince
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 21
Joined: Wed Aug 29, 2012 8:51 pm

Re: Telephony Application Programming Interface

Post by vince » Tue Jul 19, 2016 11:14 am

Which phonesystem do you use and to which CRM you want to connect it?

Cewing2379
Posts: 2
Joined: Tue Jul 12, 2016 3:38 am

Re: Telephony Application Programming Interface

Post by Cewing2379 » Tue Jul 19, 2016 10:05 pm

Our phone system is Zultys MXIE. The CRM doesn't exist, I am currently building it in Livecode. I am attempting to integrate the simple function of customer lookup via the phone number. I am just not sure how to write an external to do this. My latest thought is to write a simple windows service in VB that creates a text file with the incoming phone number as the file name when a new call comes in, and then deletes the file when the call is answered or ignored. At this point I could write a script in LC to monitor for the text file, and if it existed, execute the SQL function using the file name for the query. Not exactly clean, but should be functional. Any other thoughts (including any info on creating such a windows service) would be appreciated. Thanks for the reply!

AxWald
Posts: 472
Joined: Thu Mar 06, 2014 2:57 pm

Re: Telephony Application Programming Interface

Post by AxWald » Wed Jul 20, 2016 10:28 am

Hi,
Cewing2379 wrote:My latest thought is to write a simple windows service in VB that creates a text file with the incoming phone number as the file name when a new call comes in, and then deletes the file when the call is answered or ignored.
I'd write an entry to an SQLite db (for the incoming call, and if and by whom it is handled). This way you'd have a call history of your own, very handy! And a local/ LAN SQLite is lightning fast.

Since I never played with TAPI I have no real idea how to do - but I think VB may work. Imagine: VB writes just the incoming number, the target number and a timestamp.
LC could then poll the db, and (if the target number matches) query the address db (in the CRM), and announce the incoming call. And could write to the SQL if the call was accepted, and maybe even ask the user for a summary.
In the other 'round way LC could enter an outgoing record to the SQLite, and the VB could start the call ...
Back in the good old times when ISDN gadgets still had serial connectors I had such running, as a HyperCard stack.

All you'd need would be something to communicate with the TAPI. This sounds very interesting, guess I'll have to look after if I happen to find a piece of spare time somewhere ;-)
Cewing2379 wrote:Any other thoughts (including any info on creating such a windows service) would be appreciated.
You can make nearly anything executable running as a service in Win. Even a LC standalone - works great. I'm using "NSSM - the Non-Sucking Service Manager" for this, because of reasons explained in the name ;-)

Appendum:
A quick search ("TAPI VB connect") resulted in a big bunch of cryptic code ...
Seems at least your Zultys should provide a "TAPI Service Provider" as requirement - does it?

Have fun!
Livecode programming until the cat hits the fan ...

vince
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 21
Joined: Wed Aug 29, 2012 8:51 pm

Re: Telephony Application Programming Interface

Post by vince » Wed Jul 20, 2016 1:56 pm

In our situation with another brand of PBX i have created a solution where i use the C# library of the PBX manufacturer to create a very small and basic utility. Reason for me was that i wanted to do the rest of the processing in another programming language and i know just enough C# to build the basic utility. My background utility gets notified upon a incoming phonecall and then uses socket communication to signal my GUI application (in your case it could signal your CRM). This will then query the customer database to match a customer, and if no match is found a query is placed against the Google Places API which lists info for businesses worldwide.

If you would build something like this it also has the advantage that if another PBX would be used you only need to create another small utility which talks to your CRM and provides the same data like the other utility.

Post Reply

Return to “Windows”