Difference between revisions of "Telephony Application Using Tapi 2.1"

From PresenceWiki
Jump to: navigation, search
Line 114: Line 114:
 
http://www.international-presence.com/images/docs/tapi2/presenceservertasks.png
 
http://www.international-presence.com/images/docs/tapi2/presenceservertasks.png
  
<b>The Query A Status task</b> contains a socket node to make requests to the other server:-  
+
<b>The Query A Status</b> contains a socket node to make requests to the other server:-  
  
 
http://www.international-presence.com/images/docs/tapi2/socketsend.png
 
http://www.international-presence.com/images/docs/tapi2/socketsend.png

Revision as of 14:23, 4 August 2011

Tutorial Pages > Telephony Application Using Tapi 2.1


Overview

This document describes the processes needed to interact with a telephony system that uses Tapi 2.1.

The aim is to be able to make calls from a users phone via a click on a form.

We also need to be able to monitor the call length, drop the call and record it's current status.

For Tapi 2.1, we need to call programs written in c++ to make and query calls, Namely Caller.exe and Status.exe.

In this solution there are 2 Presence Servers that communicate via the Presence Socket Node:-

One server that runs the main Presence installation and makes socket requests via the socket node to the Tapi Presence Server.

The Tapi Presence Server is an NT machine, that is running a Telephony service along with Presence.

Tasks running on the Tapi Presence Server have socket nodes listening for requests that then make calls to the two exes via the Call Native Program Node.

The Main Presence Server makes requests over sockets to the Presence Tapi Server.

A Caller Program is then run on the NT Server for each Call request. When the Call is terminated (user hungup/call dropped), a file is in the com directory populated with the call duration. This file is then picked up by the Tapi Presence Server, which then populates the Timers table in a sqlserver database.

A Status Program can also be run on the NT Server, to either drop or return the status of a call.

Note In the case of a system using Tapi 3.0 we can uses the JTAPI solution that is built into Presence.

TAPI Provider

For the system to work Tapi has to first be configured on the Tapi Presence Server.

This solution uses the Norstar TSP, which once installed, can be accessed through Control Panel - Phone And Mode Options.

http://www.international-presence.com/images/docs/tapi2/norstar.png

Press configure for more details.

http://www.international-presence.com/images/docs/tapi2/norstarcontrolpanel.png

For each physical device we need to add an extra station first aquiring an additional license.

http://www.international-presence.com/images/docs/tapi2/norstarconfig.png

You can test that the TSP is working by running the Norstar Personal Call Manager which enables you to make calls on a device.

Caller.exe

Caller.exe runs on the Tapi Server and is located in the c:\Presence\Caller

The sub directories of this are:-

Log - which contains individual logs for each device.

Com - This contains a file for each call denoting the call details and length.

Parameters passed are "EventName","UserID","CaseID","From","To" eg "pcpgrtest","22","433765" ,"3719","9011442089721390"

Note, Only one Caller.exe can be run at any one time for a device.

So if a Caller.exe runs for device 3719 say when a Caller.exe is already running for that device then the currently running Caller.exe will be terminated to allow for the new Caller.exe.

Status.exe

Status.exe runs on the Tapi Server and is located in the c:\Presence\Status

The sub directories of this are:-

Log - which contains individual logs for each device.

Com - This contains a file for each device denoting the last updated Status.

Parameters passed are "Device","Action" where action can be "drop" or "status" eg "3719","drop"

Note, Only one Status.exe can be run at any one time for a device.

So if a Status.exe runs for device 3719 say when a Status.exe is already running for that device then the currently running Status.exe will be terminated to allow for the new Status.exe.

Description of Tasks On The Tapi Presence Server

Insert Into Timers Table - Scans files in the Caller com folders and inserts their values into the sql table.

Run Caller Program - Socket listen for request to run Caller Program.

Run Status Program - Socket listen for request to run Status Program.

Test Caller Program - Allows simple testing of Caller Program.

Test Status Program - Allows simple testing of Status Program.

http://www.international-presence.com/images/docs/tapi2/tapiservertasks.png

The Status program contains a socket node to listen on a port for status request from the other server:-

http://www.international-presence.com/images/docs/tapi2/socketreceive.png

Description of Tasks On The Main Presence Server

Select From Timers Table - Simple Query to get the call info from Timers table from sqlserver database.

Make A Call - Task to launch caller program via socket request.

Query A Status - Task to launch Status program with “Status” Parameter via socket request.

Drop A Call - Task to launch Status program with “Drop” Parameter via socket request.

Example Call Form – On Demand Task that calls Make/Query/Drop tasks and displays results.

http://www.international-presence.com/images/docs/tapi2/presenceservertasks.png

The Query A Status contains a socket node to make requests to the other server:-

http://www.international-presence.com/images/docs/tapi2/socketsend.png

The Example Call Form task looks like this:-

http://www.international-presence.com/images/docs/tapi2/form.png

In Use

http://www.international-presence.com/images/docs/tapi2/examplecallformtask.png