Submitted by Anonymous (not verified) on Tue, 01/29/2013 - 00:00
Forums

Hi;
 
We have a CRM soultion in green 5250. Can we create a call center solution where use Microsoft TAPI to open the application and locate the customer in the CRM system? I can see you have a product called IceBreak Web TAPI. So maybe the question is: 
 
Can I use IceBreak Web TAPI to start and navigate into a 5250 application in IceCap?
 
Regards
John

Niels Liisberg

Tue, 01/29/2013 - 00:00

Hi John,

The short answer – Yes you can!!
 
Using IceBreak Web Tapi – Part I

TAPI is the Telephony API from Microsoft (T-API). It is a widely used protocol for SoftPhones and almost every call center solution support TAPI – even Outlook can originate calls by TAPI.
 
IceBreak also support TAPI where the web applications communicates with the TAPI on the Client PC to originate calls, answer the phone, redirect, set the "Do-Not-Disturb" etc.
 
Here are the requirements; Basically you need three components to do the trick:

  1. IceBreak
  2. IceCap
  3. IceBreak Web TAPI

First install the IceBreak server on your IBMi:
 
IceBreak:
- Download it from http://www.system-method.com/Download/IceBreak
- Follow the installation instructions
 
Now you need two applications from the IceBreak Application store: IceCap – and WebTAPI
 
IceCap:
IceCap is a server side product that runs 5250 in a browser – you need to install that on your IBMi.
 
IceBreak Web TAPI:
The IceBreak Web TAPI needs to be installed on each Client PC. This will do the communication between your phone and the IceBreak web application
– so you simply download the installation setup.exe from the application store and distribute it to all you phoners in the house in an e-mail - what is most convenient for you.
 
Lets assume the installation of the above three went well.
 
IceBreak Web TAPI configuration:
 
Let's configure the Web TAPI:
- Click on Windows Start
- Open Programs
- Open IceBreak
- Open Web TAPI
(See screen shot 1)
 
Now IceBreak WebTAPI will apear as a small icon in the system tray. Click on it and select properties
(see screen shot 2) 
Select the driver – This is the TAPI installed on your PC, if you don't have a TAPI driver yet, then install it from your Soft Phone, and restart the IceBreak Web TAPI.
 
The local port is where your web application can "talk" with the TAPI interface – so let just set the port to 60010 in this example.
 
Now let's try and see if it works:
 
Open your browser: and enter the URL http://127.0.0.1:60010/Dial?number=12345678  
where 12345678 is a valid phone number
 
If your have made the installation correctly, it will let the phone go off hook, and start dialing the number
 
(If you have issues then enable the trace feature and examine the "trace file" which you can find in Programs->IceBreak->TebTapiLog.txt / send it in a mail to support@system-method.com)
 
Auto Responding Incoming calls:
Now lets se how it handles incoming calls – On the IFS on your IBMi you will now have a folder /www/icecap/
 
This folder has two interesting files we will change to our needs: Use notepad (or similar)
 
Open /www/icecap/tapi.html
Open /www/icecap/tapiCallBack.html
 
Tapi.html
This HTML file has a small IFRAME that enables the TAPI interface – simply place the same IFRAME in your own web application / (or do a AJAX request the this ressource)
 
<iframe src="http://127.0.0.1:60010/SetUrl?http://MyIBMi:7050/menu/tapiCallback.html"></iframe>
 
Now lets look at it step by step:

  1. The first http://127.0.0.1:60010 this is the local PC and the port number you did configure before
  2. The /SetUrl – stores the following URL and opens the default browser with an new tab
  3. The tab we want to open when we receives a call is:

1. http://MyIBMi:7050/menu/tapiCallback.html
2. Where MyIBMI is the TCP/IP name of your IBMi
3. Port 7050 is port number where IceCap is installed ( this is the default)
4. /menu/tapiCallback.html  is the page to load win we receives an incoming call

 

TapiCallback.html
This is a sample html filedoing a login to a 5250 session, and call a IBMi command or 5250 RPG program. Note that login service call returns a session – and with a valid session you can call any program or run any command which the logged in user have access rights to.
 
The magic is in the following javascript code (line 40):

function openApplication(sessionID) {
  var src = '/' + sessionID + '/menu/icecap.aspx?func=call customra&' + qrystr();
  window.location.href = src;
}

As you can see it will redirect the browser to the IceCap.aspx which is a browser based 5250 emulator. Notice the and qrystr() and the func= parameter.
Qrystr() is the parameter containing the phone number of the originator and a unique transaction / call id
 
func= is the name of you IBMi command to run, in our case we use the Call customer
 
Which simply brings up the sample customer application. In a real world application you will need to replace this with your application name.
 
Navigating to the right customer:
You have several choices here. If you can pass the phone number in your RPG program then change the command line ( the func=) parameter to:

var src = '/' + sessionID + "/menu/icecap.aspx?func=call pgm(myCallApp) parm('" + escape(qrystr()) + "')";

In your program you will receive a string like:
 
id=5446&number=31158861
 
Where &number is the phone number of the originator:
 
If you don't have access to the RPG source:
Still no worries – simply navigate to the right customer using the RPGLE "break out program" which let you script your way to the right screen:
 
Look in to get inspiration:
lib:ICECAP
file QSAMPLE
member: EX00 or USERNAVI 

--------------------------------------------------------------------------------
.. Snippet

c     *entry        plist                                                                    

c                   parm                    vts                                              

 * ---------------------------------------------------------------------------------------- */
 /free                                                                                       


  pVts = %addr(vts);                                                                                                                                                                       


  // Enter the phone number in the search field and press enter


  when vtSaaTitleContains(pVts:'Customer Search');                 
    PhoneNo = qrystr('number');
    vtSetFieldNo(pVts:1: phoneNo);                 
    vtPressKey(pVts: vtENTER); // fire menu item             

   …. Snippet
--------------------------------------------------------------------------------
 

A more advanced way is to use Web TAPI as a REST service and just open an IceCap tap with the customer information. More on that in Part II.
 
Best Regards,
Niels Liisberg