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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Phone Manager PRO Script to POP ASP Web Pages.

Status
Not open for further replies.

cjinsocal581

Programmer
Feb 5, 2005
168
US
Use this to pop ASP pages to call data from a DB based on caller ID or account info. I tested it successfully.
Here is the steps to test it out: (You must be running Phone Manager PRO, the lite editions do not support screen pop)
First, setup IIS on your PC or use an existing webserver internally to your company:

Add the following code to a new page in a new directory. (For this example, we will use phonelog as the directory and call.asp as the web page to pop.
(The URL to this point would be " replace localhost with your webserver or IP address of the webserver.)

Now for the code for the ASP Page:
_____________________________________________________
<%
Dim strFrom, strTo, strTag, strAccount, strDisp

strFrom = Replace(Request.QueryString("From"), "'", "''")
strTo = Replace(Request.QueryString("To"), "'", "''")
strTag = Replace(Request.QueryString("Tag"), "'", "''")
strAccount = Replace(Request.QueryString("Account"), "'", "''")
strDisp = Replace(Request.QueryString("Display"), "'", "''")
%>
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Caller ID</title>
</head>
<body>
<table border="1" width="100%" id="table1" cellspacing="0" bordercolor="#000000">
<tr>
<td>
<table border="0" width="100%" id="table2">
<tr>
<td><u><font face="Tahoma" size="4">Incoming Call Information :</font></u></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td><font face="Tahoma">Caller ID : <%=(strFrom)%></font></td>
</tr>
<tr>
<td><font face="Tahoma">Caller To : <%=(strTo)%></font></td>
</tr>
<tr>
<td><font face="Tahoma">Tagged Info : <%=(strTag)%></font></td>
</tr>
<tr>
<td><font face="Tahoma">Account : <%=(strAccount)%></font></td>
</tr>
<tr>
<td><font face="Tahoma">Display : <%=(strDisp)%></font></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>

________________________________________________________
The code above is a simple example of displaying the results of the call into HTML format. You can use this information to pull data from a DB or any other function you choose

Now for the instructions on popping Phone Manager PRO:

First, copy this code to a new text file:
_________________________________________________________
echo off
cls
setlocal
rem =========================================================================
set name=Phone Manager Pro Web Log
set copyright=(c)2004 Avaya (wgctechpubs@avaya.com)
set version=Version 1.2 9th March 2004
rem =========================================================================


rem ===== Set address of intranet phone log page ============================
set _webform=localhost/phonelog/call.asp
rem =========================================================================


rem ===== Call web page and send data. ======================================
rem ===== %1-%5 are values passed by Phone Manager Pro ======================
if "%1"=="" goto Usage
start goto End
rem =========================================================================


:Usage
rem ===== Show instructions if no call values passed to program =============
if exist %_path%pmlogger.chm (start %_path%pmlogger.chm)
mode con cols=80 lines=14
title %name%
echo A sample application to which Phone Manager Pro can pop call data.
echo The application then calls an intranet form and passes the data to
echo that form.
echo.
echo 1. In Phone Manager Pro, select "Configure | Configure Preferences".
echo 2. Select the "Phone Manager" tab.
echo 3. Tick "Pop on Answer".
echo 4. In "Pop External Program" enter the batch file name without .bat.
echo eg. %_path%%_filename%
echo.
echo The data passed is: "From, To, Tag, Account Code, Display Text"
echo.
echo %version% %copyright%
pause
goto End
rem =========================================================================

:End
endlocal


(This came directly from Avaya)
___________________________________________________________
Save the text file as "popasp.bat" including the quotes to a location on your local hard drive. (I used C:\) This file is required on each PC that wants to use the application.

Open the preferences in Phone Manager PRO. Click on the Screen Pop tab. In the textbox for Pop External Program, enter the following: "C:\popasp" WITHOUT QUOTES (Assuming you have copied the bat file to the C:\ drive. Change this depending on where you saved your file to)

Now test it!! Call in, dial the extension, and watch it run!!

Need custom scripts or a way to do this with advanced options, let me know!!

Cheers,
CJ
 
Sorry for the grammer errors. Was trying to get this out asap.
 
->> Open the preferences in Phone Manager PRO. Click on the Screen Pop tab. In the textbox for Pop External Program, enter the following: "C:\popasp" WITHOUT QUOTES

BY THE WAY, do not include the .bat in the application's path. Forgot to mention that.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top