Download External Function Library for Avaya IVR

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Transcript
Avaya™ Interaction Center
Release 6.0
External Function Library for Avaya IVR
Programmer’s Reference
DXX-1025-01
Issue 2.0
June 2002
 2002, Avaya Inc.
All Rights Reserved
Notice
Every effort was made to ensure that the information in this book was complete
and accurate at the time of printing. However, information is subject to change.
Preventing Toll Fraud
Ordering Information
Avaya Publications Center
Voice: +1 800 457 1235
International Voice: 410 568 3680
Fax: +1 800 457 1764
International Fax: 410 891 0207
Email: [email protected]
“Toll fraud” is the unauthorized use of your telecommunications system by an
unauthorized party (for example, a person who is not a corporate employee,
agent, subcontractor, or working on your company's behalf). Be aware that
there may be a risk of toll fraud associated with your system and that, if toll
fraud occurs, it can result in substantial additional charges for your telecommunications services.
Write: GlobalWare Solutions
Attention: Avaya Account Manager
200 Ward Hill Avenue
Haverhill, MA 01835 USA
Avaya Fraud Intervention
To order product documentation online, go to
http://www.avayadocs.com, click on Online Services, and select the appropriate product group.
If you suspect that you are being victimized by toll fraud and you need technical
support or assistance, call Technical Service Center Toll Fraud Intervention
Hotline at +1 800 643 2353.
Providing Telecommunications Security
Telecommunications security (of voice, data, and/or video communications) is
the prevention of any type of intrusion to (that is, either unauthorized or malicious access to or use of your company's telecommunications equipment) by
some party.
Your company's “telecommunications equipment” includes both this Avaya
product and any other voice/data/video equipment that could be accessed via
this Avaya product (that is, “networked equipment”).
An “outside party” is anyone who is not a corporate employee, agent, subcontractor, or working on your company's behalf. Whereas, a “malicious party” is
anyone (including someone who may be otherwise authorized) who accesses
your telecommunications equipment with either malicious or mischievous
intent.
Such intrusions may be either to/through synchronous (time-multiplexed and/or
circuit-based) or asynchronous (character-, message-, or packet-based) equipment or interfaces for reasons of:
•
•
Utilization (of capabilities special to the accessed equipment)
Theft (such as, of intellectual property, financial assets, or toll-facility
access)
• Eavesdropping (privacy invasions to humans)
• Mischief (troubling, but apparently innocuous, tampering)
• Harm (such as harmful tampering, data loss or alteration, regardless of
motive or intent)
Be aware that there may be a risk of unauthorized intrusions associated with
your system and/or its networked equipment. Also realize that, if such an intrusion should occur, it could result in a variety of losses to your company (including but not limited to, human/data privacy, intellectual property, material assets,
financial resources, labor costs, and/or legal costs).
Your Responsibility for Your Company's Telecommunications
Security
The final responsibility for securing both this system and its networked equipment rests with you - an Avaya customer's system administrator, your telecommunications peers, and your managers. Base the fulfillment of your
responsibility on acquired knowledge and resources from a variety of sources
including but not limited to:
• Installation documents
• System administration documents
• Security documents
• Hardware-/software-based security tools
• Shared information between you and your peers
• Telecommunications security experts
To prevent intrusions to your telecommunications equipment, you and your
peers should carefully program and configure your:
•
•
•
Avaya-provided telecommunications systems and their interfaces
Avaya-provided software applications, as well as their underlying
hardware/software platforms and interfaces
Any other equipment networked to your Avaya products.
Avaya National Customer Care Center
Avaya provides a telephone number for you to use to report problems or to ask
questions about your contact center. The support telephone number
is 1-800-242-2121.
Order:
Document No. DXX-1025-01, Issue 2.0, June 2002
Warranty
Avaya Inc. provides a limited warranty on this product. Refer to the “Limited
Use Software License Agreement” or other applicable documentation provided
with your package to establish the terms of the limited warranty.
Avaya Web Page
http://www.avaya.com
Trademarks
Avaya, Conversant, CustomerQ, Definity, DefinityOne, Nabnasset, Quintus,
and WebQ are registered trademarks or trademarks of Avaya Inc. in the United
States or other countries or both.
Portions of Avaya Interaction Center include technology used under license as
listed below, and are copyright of the respective companies and/or their licensors:
ActivePerl is a trademark of ActiveState Tool Corp. This product includes
software developed by the Apache Software Foundation
(http://www.apache.org/). Cognos, Impromptu and Powerplay are registered
trademarks of Cognos Incorporated. YACC++ is a registered trademark of
Compiler Resources, Inc. APEX, ComponentOne, VideoSoft, True DBGrid,
VSVIEW, SizerOne, VS-OCX, VSFlexGrid, VSFORUM, VSREPORTS,
VSDOCX, VSSPELL, and TrueDBList are either registered trademarks or
trademarks of ComponentOne LLC. CT Connect, Dialogic, Intel, and Pentium
are trademarks or registered trademarks of Intel Corporation or its subsidiaries
in the United States and other countries. Hummingbird is a registered
trademark of Hummingbird, Ltd. SearchServer is a trademark of Hummingbird,
Ltd. RISC System/6000 and DirectTalk/2 are trademarks of International
Business Machines Corporation in the United States or other countries or both.
IBM, OS/2, AS/400, CICS, WebSphere, CT, VisualAge, and DirectTalk are
registered trademarks of International Business Machines Corporation in the
United States or other countries or both. Lotus and Lotus Sametime are
trademarks or registered trademarks of Lotus Development Corporation and/or
IBM Corporation in the United States, other countries, or both. VisualX is a
registered trademark of Intergroup Technologies, Inc. ActiveX, Visio, Internet
Explorer, Windows, Windows NT, Windows 2000, Win32s, SQL Server,
Visual Basic, Visual C++, Outlook, and FrontPage are either registered
trademarks or trademarks of Microsoft Corporation in the United States and/or
other countries. TimesTen is a registered trademark of TimesTen Performance
Software. Oracle is a registered trademark, and Oracle8i and
Oracle® SQL/Services are trademarks or registered trademarks of Oracle
Corporation. Rogue Wave and .h++ are registered trademarks of Rogue Wave
Software Inc. SourcePro is a trademark of Rogue Wave Software, Inc. Siebel is
a trademark of Siebel Systems, Inc. BasicScript is a registered trademark of
Summit Software Company. Sun, iPlanet, Java, Solaris JRE, J2EE,
JavaServer Pages, and all Java-based trademarks are trademarks or
registered trademarks of Sun Microsystems, Inc. in the United States, other
countries, or both. SPARC is a registered trademark of SPARC International,
Inc. Products bearing SPARC trademarks are based on an architecture developed by Sun Microsystems, Inc. In3D is a trademark of Visual Insights, Inc.
InstallShield® is a registered trademark and service mark of InstallShield
Software Corporation in the United States and/or other countries. ORBacus is a
trademark of IONA Technologies PLC. Formula One is a licensed trademark
and Tidestone Technologies, Inc. Visual Components, First Impression, and
VisualSpeller are registered trademarks of Tidestone Technologies, Inc. JRun
is a trademark of Macromedia, Inc. in the United States and/or other countries.
Intervoice is a registered trademark of Intervoice-Brite, Inc. UNIX is a
registered trademark of The Open Group in the United States and other
countries. Acrobat is a registered trademark of Adobe Systems.
Other product and brand names are trademarks of their respective owners.
Acknowledgment
This document was written by the CRM Information Development group of
Avaya
CONTENTS
BEFORE YOU BEGIN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1
AVAYA IVR AND AVAYA™ COMPUTER TELEPHONY FOR IC . . . . . . . . 9
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Role of the VOX Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Configuration Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2
AVAYA™ COMPUTER TELEPHONY FOR IC DIP EXTERNAL FUNCTIONS 13
An Overview of vesp_dip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Error Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Command Line Options and Error Reporting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Start the DIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Creating Requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Sample Constructed Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
A Few Rules to Remember . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
A Few Notes on Invoking External Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
List of the DIP’s External Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Function Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3
SAMPLE SCRIPT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Script Builder Application Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
INDEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
3
Contents
4 External Function Library for Avaya IVR
BEFORE YOU BEGIN
Typographical Conventions
This guide uses the following font conventions:
Font Type
Meaning
code
This font signifies commands, information that you enter into the computer, or
information contained in a file on your computer.
italics
This font is used to add emphasis to important words and for references to other chapter
names and manual titles.
It also indicates variables in a command string.
jump
Blue text in online documents indicates a hypertext jump to related information. To view
the related material, click on the blue text.
Notes, Tips, and Cautions
Note: A note calls attention to important information.
Tip: A tip offers additional how-to advice.
!
Caution: A caution points out actions that may lead to data loss or other serious problems.
Contacting Technical Support
If you are having trouble using Avaya software, you should:
1 Retry the action. Carefully follow the instructions in written or online documentation.
2 Check the documentation that came with your hardware for maintenance or hardware-related
issues.
5
Before You Begin
3 Note the sequence of events that led to the problem and the exact messages displayed. Have the
Avaya documentation available.
4 If you continue to have a problem, contact Avaya Technical Support by:
w
Logging in to the Avaya Technical Support Web site http://www.avaya.com/support/qq
w
Calling or faxing one of the following numbers from 8:30 a.m. to 8:30 p.m. (Eastern
Standard Time), Monday through Friday (excluding holidays):
w
w
Toll free in the U.S. only: 1-888-TECH-SPT (1-888-832-4778)
w
Direct line for international and domestic calls: 512-425-2201
w
Direct line for faxes: 512-997-4330
Sending email with your question or problem to [email protected] You may be asked
to email one or more files to Technical Support for analysis of your application and its
environment.
Note: If you have difficulty reaching Avaya Technical Support through the above URL or email
address, please go to http://www.avaya.com for further information.
Product Documentation
Most Avaya product documentation is available in both printed and online form. However, some
reference material is available only online, and certain information is available only in printed
form. A PDF document with detailed information about all of the documentation for the Avaya
Interaction Center is included in the Doc directory on the product CD-ROM. This PDF document is
also included on the separate documentation CD-ROM.
Readme File
The Readme file is an HTML file included on the Avaya Interaction Center software CD-ROM.
This file contains important information that was collected too late for inclusion in the printed
documentation. The Readme file can include installation instructions, system requirements,
information on new product features and enhancements, suggested work-arounds to known
problems, and other information critical to successfully installing and using your Avaya software.
You may also receive a printed Addendum to the Readme, containing similar information
uncovered after the manufacture of the product CD-ROM. You should review the Readme file and
the Readme Addendum before you install your new Avaya software.
Electronic Documentation
The electronic documentation (in PDF or HTML format) for each Avaya Interaction Center
product is installed automatically with the program. Electronic documentation for the entire Avaya
product suite is included on the product CD-ROM and the documentation CD-ROM.
You can also view the documentation set online at http://www.avayadocs.com.
6 External Function Library for Avaya IVR
Educational Services
Printed Documentation
You can purchase printed copies of these manuals separately. For details, see "Ordering Information"
on the back of this manual’s title page.
License to Print the Electronic Documentation
Online copies of documentation are included on the CD-ROM that accompanies every software
release. An Avaya customer who has licensed software (a “Licensee”) is entitled to make this
online documentation available on an internal network or “intranet” solely for the Licensee's use
for internal business purposes. Licensees are granted the right to print the documentation
corresponding to the software they have purchased solely for such purposes.
Right-To-Print License Terms
Documents must be printed “as-is” from the provided online versions. Making changes to
documents is not permitted. Documents may be printed only by any employee or contractor of
Licensee that has been given access to the online documentation versions solely for Licensee's
internal business purposes and subject to all applicable license agreements with Avaya. Both
online and printed versions of the documents may not be distributed outside of Licensee enterprise
or used as part of commercial time-sharing, rental, outsourcing, or service bureau use, or to train
persons other than Licensee's employees and contractors for Licensee's internal business purposes,
unless previously agreed to in writing by Avaya. If Licensee reproduces copies of printed
documents for Licensee's internal business purposes, then these copies should be marked “For
internal use only within <Licensee> only.” on the first page or cover (where <Licensee> is the
name of Licensee). Licensee must fully and faithfully reproduce any proprietary notices contained
in the documentation. The copyrights to all documentation provided by Avaya are owned by
Avaya and its licensors. By printing any copy of online documentation Licensee indicates its
acceptance of these terms and conditions. This license only governs terms and conditions of
printing online documentation. Please reference the appropriate license agreement for terms and
conditions applicable to any other use, reproduction, modification, distribution or display of Avaya
software and documentation.
Educational Services
Avaya University provides excellent training courses on a variety of topics. For the latest course
descriptions, schedules, and online registration, you can get in touch with us:
n
Through the web at http://www.avaya-learning.com/logon_form.asp
n
Over the telephone at 800-288-5327 (within the U.S.) +001 303-406-6089 (outside of the U.S.)
n
Through email at [email protected]
Issue 2.0 June 2002
7
Before You Begin
8 External Function Library for Avaya IVR
CHAPTER 1
AVAYA IVR AND AVAYA™ COMPUTER
TELEPHONY FOR IC
One way to improve the quality of customer service at your company’s dial-up information center
is to install a full-featured, flexible voice response system that can also access and play back
selected information stored in your databases. Avaya Computer Telephony for IC (formerly known
as CONVERSANT® System for Interactive Voice Response) supports the Avaya™ Interactive
Voice Response (Avaya IVR), enabling the IVR to communicate with both the telephone caller and
the computer system.
This manual describes the external functions contained in the Avaya Computer Telephony Data
Interchange Program (DIP) written for Avaya CONVERSANT v. 6.1, 7, and 8.
Note: The present manual is primarily concerned with describing the external function library that
is available for the Avaya CONVERSANT. This manual is not a substitute for the VOX Server
Programmer's Guide. It is advisable to read that entire manual.
Overview
By calling the Avaya Computer Telephony functions contained in this DIP, you can develop
Script Builder applications that perform actions such as:
n
Play pre-recorded messages to the caller
n
Get information entered by the caller on a touch-tone phone
n
Retrieve values stored in a database through Avaya Computer Telephony
n
Set values in a database through Avaya Computer Telephony
n
Raise Avaya Computer Telephony alarms
n
End or transfer the telephone call
n
Invoke a subset of the transactions defined by the Workflow Designer for your specific site
While the script is running, it has synchronous access to Avaya Computer Telephony for IC
services. For example, a script can be directed to retrieve information from a database in response
to a caller’s request, and then “read” that information aloud to the customer by playing prerecorded sound bites or messages.
9
Chapter 1 Avaya IVR and Avaya™ Computer Telephony for IC
Worthy of special mention is a technique you could use to let a caller hear messages recorded in
his or her native language. If the customer’s language preference is identified in the database, you
could issue the Avaya Computer Telephony external function getvox to find out which language
the VRU should “speak” to the caller. Then, if you have recorded messages in several languages,
you could call selected vocabulary items from the appropriate foreign language vocabulary file.
Role of the VOX Server
The DIP installed on the Avaya CONVERSANT provides the means to access Avaya Computer
Telephony services such as data retrieval and telephone call transfers. It enables the VRU to
interact transparently with Avaya Computer Telephony for IC across the network.
As illustrated below, Avaya CONVERSANT scripts invoke DIP external functions to
communicate with Avaya Computer Telephony. Requests for Avaya Computer Telephony services
pass through a TCP/IP connection into the VOX Server which interprets the DIP commands. The
VOX Server passes on the script’s requests to the appropriate Avaya Computer Telephony
components and returns the responses in a form that the Avaya CONVERSANT can comprehend.
The commands issued to the VOX Server are described in detail in the VOX Server Programmer's
Guide.
Custom Servers
&
Databases
Avaya IVR
CONVERSANT
IVR
Script
Script
Workflow Server
customer
PBX/ACD
DIP
TCP/IP
VOX Server
Telephony Server
The functions contained in the DIP are described in the next chapter.
10 External Function Library for Avaya IVR
EDU Server
Configuration Requirements
Configuration Requirements
For the VOX Server to recognize the VRU, it must be appropriately configured. The configuration
parameters for the VOX Server are described in the VOX Server Programmer’s Guide. These
configuration parameters are set using the IC Manager administrative tool, as described in the IC
Administration Volume 1: Servers & Domains.
The only configuration parameters that must be set (all others having acceptable default settings)
are those associated with IC Manager’s Vru configuration tab. In the display area of the Vru tab,
click the right mouse button. In the menu that appears, use the New Vru and New Line options to
initially supply the needed configuration parameters, and the Edit option to change previously
entered parameters.
Note that, for the Avaya CONVERSANT IVR, the “Initiate connection to VOX” parameter should
remain unchecked (the default).
Note: vesp_dip asks the system how many (n) channels there are, and assumes they are numbered
0, 1, …, n-1. Only the channels specified in the configuration parameters for a VOX Server are
controlled by that specific VOX Server. This allows multiple VOX Servers to share a VRU by
dividing up the channels.
Issue 2.0 June 2002
11
Chapter 1 Avaya IVR and Avaya™ Computer Telephony for IC
12 External Function Library for Avaya IVR
CHAPTER 2
AVAYA™ COMPUTER TELEPHONY FOR IC
DIP EXTERNAL FUNCTIONS
This chapter describes the functions you call to request Avaya™ Computer Telephony for IC
services. The first part describes how to invoke Avaya Computer Telephony external function calls
in the Script Builder application. The second part defines the functions provided in the DIP (Data
Interchange Program). You may also wish to refer to “Script Builder Application Script,” on
page 31, which contains a sample script demonstrating calls to these functions.
The Avaya Computer Telephony DIP installed on the Avaya CONVERSANT provides a
transparent interface to Avaya Computer Telephony. It is accessed through a single external
function, named vesp_dip. Application scripts, constructed using Script Builder frames, invoke
DIP functions to communicate with the VOX Server, the entry point into the Avaya Computer
Telephony environment. The VOX Server, which can communicate with both environments,
interprets these functions and provides all subsequent processing required to interact with Avaya
Computer Telephony.
An Overview of vesp_dip
vesp_dip is a program that interchanges data between Avaya CONVERSANT and the VOX Server
(called QCTI in the script). The vesp_dip program consists of the following files:
n
vesp_dip
n
vesp_dip.t
n
vesp_dip.h
n
vespdipi.h
n
trap.t
n
untrap.t
Wherever vesp_dip.t is installed, a subdirectory named dip must be created for vesp_dip.h and
vespdipi.h.
13
Chapter 2 Avaya™ Computer Telephony for IC DIP External Functions
trap .t
v esp _ dip .t
d ip
ve sp _d ip .h
ves pd ipi.h
To use vesp_dip in your scripts, you must create a field within your script that vesp_dip can use to
store messages. This field should be initialized to an empty string at the beginning of your
program. When you define the field, it must have this name and definition:
name
type
size
vespbuf
char
256
Your code should create and initialize the field but otherwise leave it alone. If you fail to do this, a
compile error is received at Avaya CONVERSANT script install time, naming F_vespbuf as an
unknown definition. If you make the size too small, script data becomes corrupt when you make
Avaya Computer Telephony calls.
Note: The DEFSPACE macro is not available to .t files; if it were, vespbuf would be defined
within the .t file.
Error Codes
Error codes other than those specified may indicate problems that require intervention (for
example, starting Avaya Computer Telephony, fixing a script). In the simplest coding paradigms,
negative values indicate fatal errors. Successful results are indicated by 0 or positive values.
14 External Function Library for Avaya IVR
Command Line Options and Error Reporting
Calls to vesp_dip have a uniform error scheme. The vesp_dip functions can return the following
values:
Return
Code
Value
Meaning
-100
ERROR_NO_VESP
Avaya Computer Telephony is not available — the
VOX Server is not connected to vesp_dip.
May indicate a network error that separates the VOX
Server and vesp_dip. May mean that the VOX Server
was not started.
-101
ERROR_BAD_REQUEST
The command is not known to vesp_dip.
Probably indicates misspelling of the command in the
Avaya CONVERSANT script.
-102
ERROR_VESP_EXCEPTION
Avaya Computer Telephony raised an exception on
this request: request failed. The VOX Server log will
have more information.
May indicate the passing of an invalid (badly
formatted or terminated) EDUID, or an attempt to use
a workflow transaction improperly, or an error in a
Contact Engine Server's configuration.
Command Line Options and Error Reporting
The log file vesp_dip.log will generally contain only a few lines, which will give the time that
vesp_dip started and its version number. On a fatal error, it will add another line explaining the
error. This log file is not otherwise written to and is overwritten at each startup.
vesp_dip normally writes to the Avaya CONVERSANT Trace facility on errors. (The Trace
facility normally writes to the screen, though this can be changed. See the Avaya CONVERSANT
documentation, which you can access from support.avaya.com.
To run a trace on vesp_dip, enter the following at the Avaya CONVERSANT command line
prompt:
trace vesp_dip
To run a trace on a particular channel (in this example, channel 10), enter:
trace chan 10
Issue 2.0 June 2002
15
Chapter 2 Avaya™ Computer Telephony for IC DIP External Functions
There are five command options available:.
Command
Description
sN
Set the idle interval to N milliseconds; the default is 1000. The idle interval is an internal
setting and should not matter in normal operation. In cases of network congestion, this
also controls roughly how often stalled network writes are retried. Low settings are likely
to harm system performance.
nNAME
Set the DIP’s name to NAME. The default is vesp_dip.
pM
Use port M to listen on. If this is not set, vesp_dip looks up the definition of vespport in
the TCP/IP services list. If that is not defined, a default of 3000 is used.
The port number given here must be the same as the port number given with the
configuration parameter TCP/IP Port. See “Configuration Requirements,” on page 11.
d
Write debug messages to the Trace facility.
l
Write warnings (and debug messages, if enabled with the d option) to vesp_dip.log.
Use this only for debugging; the log file will grow without bounds if left on.
Start the DIP
To start the DIP:
1 Copy the vesp_dip.t, untrap.t, vesp_dip, vesp_dip.h, trap.t, and
vespdipi.h files from the CD to the directory on your system from which it will run. The
DIP runs from any directory, enabling you to configure the system’s directory structure.
2 Make sure the vesp_dip file is executable before continuing.
3 Type the following at the system prompt and press ENTER. If multiple DIPs are to be run, both
the n and p options must be used.
vesp_dip s1200 nvesp_dip1 p3001
4 The system sets the idle interval to 1200 milliseconds, renames the DIP log to vesp_dip1, and
uses the port 3001.
Creating Requests
It is possible to construct functions with more than four parameters. This is done in several steps;
up to 62 parameters can be added to a function (allowing for up to 30 names and values to be set or
read in a request). Commands associated with creating and sending requests in steps begin with
"+", so they will not overlap with actual VOX command names.
These commands are: +create, +getarg, +send, +setarg
Arguments in the constructed functions must be placed in positions in accordance with the
definitions for the VOX Server commands.
16 External Function Library for Avaya IVR
+create Command
Replies to requests are preserved until the next +create command, or until any request not
beginning with a + is used. It is permissible to use +getarg to read responses from commands that
were not built with +create. (Any request that doesn’t begin with "+" uses the +create, +setarg and
+getarg mechanism internally.)
Note: The "+" commands should not be used to construct requests that cannot accept a variable
number of arguments, such as VOX.alarm, VOX.newcall, or VOX.gone. In particular,
VOX.newcall has a special calling sequence, which the +create method explicitly does not handle.
The next four subsections discuss the four "+" commands. A sample constructed function is
presented in “Sample Constructed Function,” on page 18.
+create Command
Syntax
+create
string1
string2
Parameters
Returns
string1
An allowed VOX Server command name ("VOX.setvdu", "VOX.getvdu",
"VOX.getvox", "VOX.tr1XXX", or "VOX.tr2XXX")
string2
A string containing the total number of arguments
This command creates a request.
It should return immediately. It does not communicate with the VOX Server.
Example
+create "VOX.getvdu" "5"
+getarg Command
Syntax
+getarg
string
variable
Parameters
Returns
string
A string representing the argument to be fetched ("0", "1", ..., or "62")
variable
A variable in which to place the result
This command gets the desired argument.
The string value "0" (or empty) obtains any error string (exception) the VOX Server returns on the
request. This will be an empty string if the vesp_dip request did not return an error. The string is
useful for debugging and logging; it is not intended that an Avaya CONVERSANT script attempt
to analyze it. An exception string from any Avaya Interaction Engine Server may be returned
(especially the EDU, Telephony, Workflow, and VOX servers).
Example
+getarg "3" valueA
Issue 2.0 June 2002
17
Chapter 2 Avaya™ Computer Telephony for IC DIP External Functions
+send Command
Syntax
+send
Returns
This command sends the assembled request.
This command does not return until the VOX Server has responded (or the request has timed out).
The return code represents the VOX Server's reply.
+setarg Command
Syntax
+setarg
string1
string2
Parameters
Returns
string1
A string indicating the argument you are setting ("1", "2", ..., or "62")
string2
A string containing the value of the argument
This command sets the value of the given argument.
Any arguments not specified are left blank.
Example
+setarg "2" "A"
Sample Constructed Function
The following can be used to fetch two values (A and B) from the EDU.
+create "VOX.getvdu" "5"
Create a 5 parameter request.
+setarg "1" "2df5d9e6003b0000780002a1f430002"
First is your actual EDUID.
+setarg "2" "A"
Next is the name of the first value.
+setarg "4" "B"
Skip 3, which is where A’s result
will go.
+send
Send and wait for response.
+getarg "3" valueA
Get A’s value.
+getarg "5" valueB
Get B’s value.
As an example, the Define External Function screen for the +create command would look as
follows (see “A Few Notes on Invoking External Functions,” on page 19 for additional discussion
of this screen):
18 External Function Library for Avaya IVR
A Few Rules to Remember
Define External Function
Function Name:
vesp_dip
Argument 1:
”+create”
Argument 2:
”VOX.getvdu”
Argument 3:
”5”
Argument 4:
dummy
Argument 5:
dummy
Return Code Is In Field
ret_code
A Few Rules to Remember
There are a few scripting rules you must follow to ensure proper communication between your
Avaya CONVERSANT and the Avaya Computer Telephony software:
1 A caller might hang up at any time. The script must be prepared to handle this. Therefore, be
sure to insert the external function trap at the very beginning of the script. It must be the script’s
first operation, placed even before the Answer Phone statement. You will also need to add a
Hungup: label in your script, which will run if the caller hangs up.
2 As soon as the call is accepted by the script (via the Answer Phone statement), the script must
immediately invoke the newcall function. If it does not, the call is not handled properly and
subsequent calls could be affected.
3 When the call ends, regardless of the reason — caller hangup, script termination, etc. — the
script must immediately invoke the DIP’s gone function. If not, both that call and all
subsequent calls on that line may be lost or otherwise improperly handled by the system. Do
not handle new calls on that line until the gone function returns a response.
A Few Notes on Invoking External Functions
Application scripts for Avaya CONVERSANT are constructed using Script Builder. The Script
Builder tool presents a series of forms, or frames, in which you enter function information. The
actions to be performed by the script are selected from menus within the Define Transaction
screen. To insert an Avaya Computer Telephony command, select the action step External
Function. Then define the parameters in the Define External Function screen that appears.
Note: The rest of this section applies to all external functions except trap and untrap – see “trap,”
on page 21 and “untrap,” on page 29.
Issue 2.0 June 2002
19
Chapter 2 Avaya™ Computer Telephony for IC DIP External Functions
The Define External Function screen requires you to enter 5 positional parameters, each a short
string. You define the fields within the screen.
Define External Function
Function Name:
vesp_dip
Argument 1:
<external_function_name>
Argument 2:
<arg1>
Argument 3:
<arg2>
Argument 4:
<arg3>
Argument 5:
<arg4>
Return Code Is In Field
ret_code
Note: A function must always contain five fields.
You must enter values in all five fields. Enter empty fields ("") if there is no parameter associated
with that argument. The sample program in “Script Builder Application Script,” on page 31,
contains examples of empty “dummy” variables.
n
The function name is always vesp_dip.
n
The first argument parameter is always the name of one of the vesp_dip external functions.
n
The meaning of the other four arguments vary with each function.
n
In both this chapter and the sample program, ret_code is the name of the field that reports the
success or failure of the action. If an action fails, the script cannot continue running and the
conversation is terminated. In the sample application script in “Script Builder Application
Script,” on page 31, an action’s failure is signaled by a ret_code of less than zero (ret_code <
0). The script goes to the TECH_ERROR module, plays a prerecorded announcement, and then
executes the gone function to notify Avaya Computer Telephony that the call has ended. Avaya
Computer Telephony can then perform its own call termination routines.
List of the DIP’s External Functions
The following chart lists the functions described in this chapter.
Function
Description
trap
Handle a caller hang up
newcall
Notify Avaya Computer Telephony that a new call has arrived and ask for its EDUID
pseudo_ani
Return a pseudo-ANI to a network IVR
getvdu
Retrieve a single field value from the database via the call’s EDU
getvox
Retrieve a single field value from the VOX Server’s value cache
20 External Function Library for Avaya IVR
Function Definitions
Function
Description
setvdu
Set or overwrite a single value in the telephone call’s EDU
tr<n><op>
Request the Workflow Designer to perform a custom transaction
transfer
Transfer this call to an agent
gone
Notify Avaya Computer Telephony that the call has ended
alarm
Raise an Avaya Computer Telephony alarm, an indication of an exceptional
condition or error
untrap
Handle IVR work after call is gone
Function Definitions
Presented in the order in which they are likely to be called, the following sections describe each
function’s syntax, followed by a brief description, and a program example.
Argument parameters are defined in the same order as you would enter them into the Define
External Function screen:
Argument 1:
<external_function_name>
Argument 2:
<arg1>
Argument 3:
<arg2>
Argument 4:
<arg3>
Argument 5:
<arg4>
The program example in each section illustrates how the DIP function might be defined in the
Define External Function screen.
Note: Any function that can accept an EDUID can also accept a string of the form #channelnum
(for example: #17). See the VOX Server Programmer's Guide.
trap
Syntax
There are no arguments for this function.
Description
The script must be prepared to handle a caller hangup at any time. It is necessary to call the
external function trap at the very beginning of the script immediately after the label start.
trap handles hangups by going to the label Hungup:. You must have this label. After-call cleanup
should be performed at the point in the script where this label occurs. See the sample script in
“Script Builder Application Script,” on page 31, for an example.
Issue 2.0 June 2002
21
Chapter 2 Avaya™ Computer Telephony for IC DIP External Functions
Script Builder Example
Define External Function
Function Name:
trap
Argument 1:
Argument 2:
Argument 3:
Argument 4:
Argument 5:
Return Code Is In Field
newcall
Syntax
Description
Argument 1:
newcall
Notify Avaya Computer Telephony that a new call
arrived on the VRU
Argument 2:
vduid
The EDUID received from Avaya Computer
Telephony, which identifies the new call
Argument 3:
dummy
Empty
Argument 4:
dummy
Empty
Argument 5:
dummy
Empty
This function has a dual purpose: it notifies Avaya Computer Telephony when a call arrives on the
IVR, and it asks Avaya Computer Telephony to pass back an EDUID for that call. It must be
invoked immediately after Answer Phone.
Note: The EDUID identifies the call within Avaya Computer Telephony. It is unique to the
particular call, and essential for all Avaya Computer Telephony requests.
Script Builder Example
Define External Function
Function Name:
vesp_dip
Argument 1:
'newcall'
Argument 2:
vduid
Argument 3:
dummy
22 External Function Library for Avaya IVR
pseudo_ani
Argument 4:
dummy
Argument 5:
dummy
Return Code Is In Field
ret_code
pseudo_ani
Syntax
Description
Argument 1:
pseudo_ani
Return a pseudo-ANI
Argument 2:
vduid
The EDUID, which is passed to Avaya
Computer Telephony to identify the call
Argument 3:
ps_ani
The pseudo-ANI associated with the call
Argument 4:
dummy
Empty
Argument 5:
dummy
Empty
This function is used only with a network IVR (an IVR not associated with an Avaya Computer
Telephony Server) that wishes to transfer a call to an Avaya Computer Telephony-enabled site.
This function takes a pseudo-ANI from the list provided by the configuration parameter
pseudo_ani, associates it with the given EDUID, and returns the pseudo-ANI in the response.
For a discussion of the pseudo-ANI, and the VOX Server’s interaction with a network IVR, see the
VOX Server Programmer's Guide.
Script Builder Example
Define External Function
Function Name:
vesp_dip
Argument 1:
"pseudo_ani"
Argument 2:
vduid
Argument 3:
ps_ani
Argument 4:
dummy
Argument 5:
dummy
Return Code Is In Field
ret_code
Issue 2.0 June 2002
23
Chapter 2 Avaya™ Computer Telephony for IC DIP External Functions
getvdu
Syntax
Description
Argument 1:
getvdu
Get a value from the EDU
Argument 2:
vduid
The EDUID, which is passed to Avaya Computer Telephony to
identify the call
Argument 3:
fieldname
Name of the field to query
Argument 4:
value
Value returned; empty if the field does not exist
Argument 5:
dummy
Empty
Retrieve a single value from the call’s EDU.
For example, in a simplified scenario, the customer’s account information is looked up in the
database and stored in an EDU on the EDU Server. The EDU Server passes the requested
information to the VOX Server, which in turn passes the value to the VRU. Invoking this function
also updates the name/value pair stored in the VOX Server’s value cache. For more information
about getvdu and the value cache, see the VOX Server Programmer's Guide.
Note: Always issue the getvdu function instead of getvox if there is any risk of other software
running in parallel with your Avaya CONVERSANT script; otherwise, pertinent EDU values may
differ.
Script Builder Example
Define External Function
Function Name:
vesp_dip
Argument 1:
"getvdu"
Argument 2:
vduid
Argument 3:
"balance"
Argument 4:
value
Argument 5:
dummy
Return Code Is In Field
24 External Function Library for Avaya IVR
ret_code
getvox
getvox
Syntax
Description
Argument 1:
getvox
Get a value from the VOX Server value cache
Argument 2:
vduid
The EDUID, which is passed to Avaya Computer Telephony to
identify the call
Argument 3:
fieldname
Name of the field to query
Argument 4:
value
Value returned; empty if the field does not exist
Argument 5:
dummy
Empty
Retrieve a single value from the EDU’s name/value pair stored in the VOX Server’s value cache.
Because getvox retrieves the information from the VOX Server’s value cache rather than from the
EDU Server, it results in faster response time and less network traffic than using getvdu.
Use getvox only when you are certain that the cache holds the field’s most recent value. This will
always be the case if only the Avaya CONVERSANT script can cause the EDU’s value to change.
For example, if a field can be set only by an invocation of the tr2setaccnt function and not by any
other Avaya Computer Telephony software, both the VOX Server cache and the EDU will contain
the same field values.
getvox is best suited for accessing stable information such as account numbers and ANIs
(Automatic Number Identifiers).
For more information about getvox and the value cache, see the VOX Server Programmer's Guide.
Note: Always issue the getvdu function instead of getvox if there is any risk of other software
running in parallel with your Avaya CONVERSANT script; otherwise, pertinent EDU values may
differ.
Script Builder Example
Define External Function
Function Name:
vesp_dip
Argument 1:
"getvox"
Argument 2:
vduid
Argument 3:
"language"
Argument 4:
value
Argument 5:
dummy
Return Code Is In Field
ret_code
Issue 2.0 June 2002
25
Chapter 2 Avaya™ Computer Telephony for IC DIP External Functions
setvdu
Syntax
Description
Argument 1:
setvdu
Set a value in the EDU
Argument 2:
vduid
The EDUID, which is passed to Avaya
Computer Telephony to identify the call
Argument 3:
fieldname
Name of the database field
Argument 4:
value
New value of the field
Argument 5:
dummy
Empty
This function sets or overwrites a single value in the customer’s account information. The VRU
passes the name/value pair information to the VOX Server, which in turn passes it to the EDU
Server.
Script Builder Example
Define External Function
Function Name:
vesp_dip
Argument 1:
"setvdu"
Argument 2:
vduid
Argument 3:
"pmt_reported"
Argument 4:
value
Argument 5:
dummy
Return Code Is In Field
ret_code
tr<n><op>
Syntax
Argument 1:
tr<n><op>
Perform a custom transaction
Argument 2:
vduid
The EDUID, which is passed to Avaya Computer
Telephony to identify the call
Argument 3:
fieldvalue
Value of the database field
Argument 4:
dummy
Empty
Argument 5:
dummy
Empty
26 External Function Library for Avaya IVR
transfer
Description
Transaction operation commands communicate with the Workflow Designer. Workflow Designer
features are customized for each customer – either by Avaya or by the customer.
Note: Transaction operation commands are custom designed for your site. If desired, you could
execute tr<n><op> requests on the Avaya CONVERSANT in order to change information in
Avaya™ Interaction Center databases, fax information, perform complex calculations, pre-fetch
images, or whatever else is needed.
Script Builder Example
Among the many operations that the Workflow Designer could perform, setaccnt is one commonly
used; therefore, it is presented as an example:
The tr2setaccnt function instructs the Workflow Designer to operate on a given account number.
The function does not return until both the EDU Server and the VOX Server value cache have
stored this information. Execute getvox or getvdu functions in your Avaya CONVERSANT script
to obtain the results of the tr2setaccnt request.
Define External Function
Function Name:
vesp_dip
Argument 1:
"tr2setaccnt"
Argument 2:
vduid
Argument 3:
account
Argument 4:
dummy
Argument 5:
dummy
Return Code Is In Field
ret_code
transfer
Syntax
Description
Argument 1:
transfer
Transfer call to an agent
Argument 2:
vduid
The EDUID, which is passed to Avaya Computer Telephony
to identify the call
Argument 3:
number
PBX extension to which the call is transferred
Argument 4:
dummy
Empty
Argument 5:
dummy
Empty
Transfer a call from the VRU to an agent at the specified extension number.
Issue 2.0 June 2002
27
Chapter 2 Avaya™ Computer Telephony for IC DIP External Functions
This does not terminate the EDU. The function gone must be called to terminate the EDU. Until
gone is called, the CONVERSANT script continues to access the EDU and cache.
Script Builder Example
Define External Function
Function Name:
vesp_dip
Argument 1:
"transfer"
Argument 2:
vduid
Argument 3:
"4001"
Argument 4:
dummy
Argument 5:
dummy
Return Code Is In Field
ret_code
gone
Syntax
Description
Argument 1:
gone
Notify Avaya Computer Telephony that the call has ended
Argument 2:
vduid
The EDUID, which is passed to Avaya Computer Telephony to
identify the call
Argument 3:
reason
Reason for ending the call, or blank
Argument 4:
dummy
Empty
Argument 5:
dummy
Empty
Notify Avaya Computer Telephony that the call has ended. This releases the EDUID. gone must
always be issued when the call ends.
Note: Be sure to issue the gone function before the script ends; if you do not, subsequent calls on
that channel could be lost or otherwise improperly handled.
Script Builder Example
Define External Function
Function Name:
vesp_dip
Argument 1:
”gone”
Argument 2:
vduid
Argument 3:
””
28 External Function Library for Avaya IVR
alarm
Argument 4:
dummy
Argument 5:
dummy
Return Code Is In Field
ret_code
alarm
Syntax
Description
Argument 1:
alarm
Raises an Avaya Computer Telephony alarm
Argument 2:
alarmname
The alarm's name (one word)
Argument 3:
priority
The alarm’s priority code: Low, High, Info, or EMERGENCY
Argument 4:
message
Brief text that describes the problem
Argument 5:
dummy
Empty
This function raises an Avaya Computer Telephony alarm through the VOX Server to indicate
some exceptional condition or error. This function is useful for debugging. As shown in the script
example in “Script Builder Application Script,” on page 31, alarms can also add an extra measure
of security to the system.
Script Builder Example
Define External Function
Function Name:
vesp_dip
Argument 1:
"alarm"
Argument 2:
"InvalidPIN"
Argument 3:
"Low"
Argument 4:
"Entered Invalid PIN"
Argument 5:
dummy
Return Code Is In Field
ret_code
untrap
Syntax
There are no arguments for this function.
Description
The untrap function is rarely used. It can be used to allow the VRU script to do additional work
after calling the gone function.
Issue 2.0 June 2002
29
Chapter 2 Avaya™ Computer Telephony for IC DIP External Functions
untrap requires that the label Quit: be added to the script. At the point in the script where this label
occurs, the script would typically deal with hangup when there are no Avaya Computer Telephony
issues to worry about.
See the sample pseudo-code given below.
Script Builder Example
Define External Function
Function Name:
untrap
Argument 1:
Argument 2:
Argument 3:
Argument 4:
Argument 5:
Return Code Is In Field
Pseudocode Example
trap
#branch to Hungup: if customer hangs up
Answer Phone
newcall vduid
#tell QCTI we received the call
...do work with QCTI...
gone vduid
#tell QCTI we have finished QCTI work
vduid = ""
#for neatness
untrap
#on a hangup, go to Quit:
...do work without QCTI...
exit
#done
Hungup:
if vduid > "" then gone vduid
vduid = ""
exit
Quit:
exit
30 External Function Library for Avaya IVR
#clean up if needed
CHAPTER 3
SAMPLE SCRIPT
This Script Builder application demonstrates calls to the Avaya Computer Telephony external
function DIP for the Avaya CONVERSANT software.
Overview
This script illustrates how a bank could use Avaya Computer Telephony and Avaya
CONVERSANT to interact with its customers. Among other items, it shows:
n
How certain information, such as the customer’s identity, might be obtained through the
customer’s ANI.
n
How other information, such as an account number, might be entered by the customer using a
touch-tone telephone as an input terminal.
n
How a customer may obtain account balance information. Data is fetched from databases by
Avaya™ Interaction Center, passed back to the VRU, and then “read aloud” over the telephone
in the customer’s language of choice.
n
How a customer can speak to an agent, either at the customer’s request or if the customer
repeatedly fails to enter information properly.
Script Builder Application Script
#**************************************************
#This application demonstrates interaction with
#the QCTI server.
#Avaya, Inc. June, 2002
#version 1.5
#**************************************************
1.
2.
#Trap a premature hangup so a hangup message may be
#sent to the VOX server.
External Function
Function Name: trap
#Wait until a call comes in.
Answer Phone
Process the call.
31
Chapter 3 Sample Script
#OK, we have a call.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
#Initialization.
Set Field Value
Field: greeted_the_caller = 0
Field: name_received = 0
Field: balance_received = 0
Field: language_received = 0
Field: end_of_call = 0
Set Field Value
Field: caller_error_account = 0
Field: count_pin_caller = 0
Field: pin_error = 0
Field: count_error_choice = 0
Field: greeted_caller_native = 0
Set Field Value
Field: vespbuf = ""
#Every call to an external function requires 3 steps:
#Set Field Value, External Function, Evaluate.
#Every external function requires 5 arguments;
#those which we don't use are set as empty.
Set Field Value
Field: dummy = ""
#Tell the VOX server that a new call has
#arrived and get the call's VDUID back.
Set Field Value
Field: command = "newcall"
External Function
Function Name: vesp_dip
Use Arguments: command value dummy dummy
Return Field: ret_code
Evaluate
If ret_code
< 0
Goto TECH_ERROR
End Evaluate
Set Field Value
Field: vduid = value
dummy
#We know who is calling, so we can get his account
#number from QCTI.
Set Field Value
Field: command = "getvox"
Field: argument = "account"
External Function
Function Name: vesp_dip
Use Arguments: command vduid argument value dummy
Return Field: ret_code
Evaluate
32 External Function Library for Avaya IVR
Script Builder Application Script
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
If ret_code
< 0
Goto TECH_ERROR
End Evaluate
Set Field Value
Field: account = value
#If we could not retrieve this information, ask
#caller for input in English. If we got his
#account # from QCTI, prove that we are talking
#to the right person.
Evaluate
If account
= ""
Announce
Speak With Interrupt
Phrase: "English: Greet the caller"
Set Field Value
Field: greeted_the_caller = 1
Goto SET_ACCOUNT_NUMBER
Else
Goto GET_VOCAB
End Evaluate
#**************************************************
SET_ACCOUNT_NUMBER:
Set Field Value
Field: account = ""
Field: pin = ""
Prompt & Collect
Prompt
Speak With Interrupt
Phrase: "Enter your account number."
Input
Caller Input Field: account
Min Number Of Digits: 06
Max Number Of Digits: 06
Checklist
Case: "Input OK"
Goto CONFIRM_ACCOUNT
Case: "Initial Timeout"
Reprompt
Case: "Too Few Digits"
Reprompt
Case: "No More Tries"
Goto ALARM_ACCOUNT
End Prompt & Collect
#**************************************************
CONFIRM_ACCOUNT:
#Send account # to QCTI.
Set Field Value
Field: command = "tr2setaccnt"
External Function
Issue 2.0 June 2002
33
Chapter 3 Sample Script
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
Function Name: vesp_dip
Use Arguments: command vduid
Return Field: ret_code
Evaluate
If ret_code
< 0
Goto TECH_ERROR
End Evaluate
account
dummy
dummy
#Make sure the account number is valid.
#Get pin (Personal Identification Number) from QCTI.
Set Field Value
Field: command = "getvox"
Field: argument = "pin"
External Function
Function Name: vesp_dip
Use Arguments: command vduid argument value dummy
Return Field: ret_code
Evaluate
If ret_code
< 0
Goto TECH_ERROR
End Evaluate
Set Field Value
Field: pin = value
Evaluate
If pin
= ""
Set Field Value
Field: account = ""
Field: caller_error_account = caller_error_account + 1
Evaluate
If caller_error_account
< 3
Goto SET_ACCOUNT_NUMBER
Else
Goto ALARM_ACCOUNT
End Evaluate
Else
Goto GET_VOCAB
End Evaluate
#**************************************************
GET_VOCAB:
#Retrieve information from QCTI about what language
#the caller speaks.
#There are only three available vocabularies on the
#system now: English, Russian and Hindi. You can
#add as many as you need.
#English is the default vocabulary.
Set Field Value
Field: command = "getvox"
Field: argument = "language"
External Function
Function Name: vesp_dip
34 External Function Library for Avaya IVR
Script Builder Application Script
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
Use Arguments: command vduid
Return Field: ret_code
Evaluate
If ret_code
< 0
Goto TECH_ERROR
End Evaluate
Set Field Value
Field: language = value
argument
value
dummy
#Check if we already greeted the caller in his
#native language or greeted at all.
Evaluate
If greeted_caller_native
= 0
Evaluate
If language
= "Russian"
Announce
Speak With Interrupt
Phrase: "Russian: Greet the caller"
Elseif language
= "Hindi"
Announce
Speak With Interrupt
Phrase: "Hindi: Greet the caller"
Else
Evaluate
If greeted_the_caller
= 0
Announce
Speak With Interrupt
Phrase: "English: Greet the caller"
End Evaluate
End Evaluate
Set Field Value
Field: greeted_caller_native = 1
Field: greeted_the_caller = 1
End Evaluate
Goto PROVE_THE_CALLER
#**************************************************
PROVE_THE_CALLER:
#Get pin from the caller to prove that the caller
#is who he says he is.
#Talk to the caller in the appropriate language.
Evaluate
If language
= "Russian"
Announce
Speak With Interrupt
Phrase: "Russian: Enter your pin #"
Elseif language
= "Hindi"
Announce
Speak With Interrupt
Phrase: "Hindi: Enter your pin #"
Issue 2.0 June 2002
35
Chapter 3 Sample Script
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
Else
Announce
Speak With Interrupt
Phrase: "English: Enter your pin #"
End Evaluate
Set Field Value
Field: count_pin_caller = count_pin_caller + 1
Evaluate
If count_pin_caller
< 3
Prompt & Collect
Input
Caller Input Field: pin_caller
Min Number Of Digits: 04
Max Number Of Digits: 04
Checklist
Case: "Input OK"
Goto PROVE
Case: "Initial Timeout"
Reprompt
Case: "Too Few Digits"
Reprompt
Case: "No More Tries"
Goto ALARM_PIN
End Prompt & Collect
Else
Goto ALARM_PIN
End Evaluate
#**************************************************
PROVE:
#If pin from QCTI and pin from caller input
#are the same, fine, the caller can go on,
#we have the right person and now we can
#communicate with him.
#Otherwise, make him go back and re-enter both his
#account # and pin. If he gets them wrong, raise
#an alarm and transfer him to an agent.
Evaluate
If pin
= pin_caller
Goto GET_CALLER_REQUEST
Else
Set Field Value
Field: pin_error = pin_error + 1
Evaluate
If pin_error
< 3
Goto SET_ACCOUNT_NUMBER
Else
Goto ALARM_PIN
End Evaluate
End Evaluate
36 External Function Library for Avaya IVR
Script Builder Application Script
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
#**************************************************
GET_CALLER_REQUEST:
#Talk to the caller in the appropriate language.
Evaluate
If language
= "Russian"
Goto RUSSIAN_GET_REQUEST
Elseif language
= "Hindi"
Goto HINDI_GET_REQUEST
Else
Goto ENGLISH_GET_REQUEST
End Evaluate
#**************************************************
ENGLISH_GET_REQUEST:
Evaluate
If name_received
= 0
Announce
Speak With Interrupt
Phrase: "English: For name press 1."
End Evaluate
Evaluate
If balance_received
= 0
Announce
Speak With Interrupt
Phrase: "English: For balance press 2."
End Evaluate
Evaluate
If language_received
= 0
Announce
Speak With Interrupt
Phrase: "English: For language press 3."
End Evaluate
76.
Announce
Speak With Interrupt
Phrase: "English: For transfer press 0."
77.
Evaluate
If end_of_call
= 0
Announce
Speak With Interrupt
Phrase: "English: To end the call press 9."
End Evaluate
78.
79.
80.
Goto DO_REQUEST
#**************************************************
RUSSIAN_GET_REQUEST:
Evaluate
If name_received
= 0
Issue 2.0 June 2002
37
Chapter 3 Sample Script
81.
Announce
Speak With Interrupt
Phrase: "Russian: For name press 1."
End Evaluate
82.
Evaluate
If balance_received
= 0
Announce
Speak With Interrupt
Phrase: "Russian: For balance press 2."
End Evaluate
83.
84.
85.
Evaluate
If language_received
= 0
Announce
Speak With Interrupt
Phrase: "Russian: For language press 3."
End Evaluate
86.
Announce
Speak With Interrupt
Phrase: "Russian: For transfer press 0."
87.
Evaluate
If end_of_call
= 0
Announce
Speak With Interrupt
Phrase: "Russian: To end the call press 9."
End Evaluate
Goto DO_REQUEST
#**************************************************
HINDI_GET_REQUEST:
Evaluate
If name_received
= 0
Announce
Speak With Interrupt
Phrase: "Hindi: For name press 1."
End Evaluate
88.
89.
90.
91.
92.
93.
94.
95.
Evaluate
If balance_received
= 0
Announce
Speak With Interrupt
Phrase: "Hindi: For balance press 2."
End Evaluate
Evaluate
If language_received
= 0
Announce
Speak With Interrupt
38 External Function Library for Avaya IVR
Script Builder Application Script
Phrase: "Hindi: For language press 3."
End Evaluate
96.
Announce
Speak With Interrupt
Phrase: "Hindi: For transfer press 0."
97.
Evaluate
If end_of_call
= 0
Announce
Speak With Interrupt
Phrase: "Hindi: To end the call press 9."
End Evaluate
98.
99.
100.
101.
102.
103.
104.
Goto DO_REQUEST
#**************************************************
DO_REQUEST:
Prompt & Collect
Input
Max Number Of Digits: 01
Checklist
Case: "0"
Goto TRANSFER_TO_AGENT
Case: "1"
Goto GET_NAME
Case: "2"
Goto GET_BALANCE
Case: "3"
Goto GET_LANGUAGE
Case: "9"
Goto GOODBYE
Case: "Not On List"
Goto ERROR_CHOICE
Case: "Initial Timeout"
Goto GET_CALLER_REQUEST
Case: "Too Few Digits"
Goto GET_CALLER_REQUEST
Case: "No More Tries"
Goto ALARM_CHOICE
End Prompt & Collect
#**************************************************
ERROR_CHOICE:
Set Field Value
Field: count_error_choice = count_error_choice + 1
Evaluate
If count_error_choice
< 3
Goto GET_CALLER_REQUEST
Else
Goto ALARM_CHOICE
End Evaluate
Issue 2.0 June 2002
39
Chapter 3 Sample Script
105.
106.
107.
108.
109.
110.
111.
#**************************************************
GET_NAME:
Set Field Value
Field: command = "getvox"
Field: argument = "name"
External Function
Function Name: vesp_dip
Use Arguments: command vduid argument value dummy
Return Field: ret_code
Evaluate
If ret_code
< 0
Goto TECH_ERROR
End Evaluate
Set Field Value
Field: name = value
Announce
Speak With Interrupt
Phrase: "Name is"
Field: name As Cmmf
Set Field Value
Field: name_received = 1
112. Goto GET_CALLER_REQUEST
#**************************************************
GET_BALANCE:
113. Set Field Value
Field: command = "getvox"
Field: argument = "balance"
114. External Function
Function Name: vesp_dip
Use Arguments: command vduid argument value dummy
Return Field: ret_code
115. Evaluate
If ret_code
< 0
116.
Goto TECH_ERROR
End Evaluate
117. Set Field Value
Field: balance = value
118. Announce
Speak With Interrupt
Phrase: "Your balance is"
Field: balance As N$D2
#The following statements illustrate the use
#of the setvdu and getvdu functions.
119. Evaluate
If language
= "Russian"
120.
Announce
Speak With Interrupt
Phrase: "Russian: The balance you want"
Elseif language
= "Hindi"
40 External Function Library for Avaya IVR
Script Builder Application Script
121.
122.
123.
124.
125.
126.
127.
128.
129.
130.
131.
132.
133.
134.
Announce
Speak With Interrupt
Phrase: "Hindi: The balance you want"
Else
Announce
Speak With Interrupt
Phrase: "English: The balance you want"
End Evaluate
Prompt & Collect
Input
Caller Input Field: new_balance
Max Number Of Digits: 08
Checklist
Case: "Input OK"
Continue
Case: "Initial Timeout"
Reprompt
Case: "Too Few Digits"
Reprompt
Case: "No More Tries"
Goto ALARM_CHOICE
End Prompt & Collect
Set Field Value
Field: command = "setvdu"
Field: argument = "balance"
External Function
Function Name: vesp_dip
Use Arguments: command vduid argument new_balance dummy
Return Field: ret_code
Evaluate
If ret_code
< 0
Goto TECH_ERROR
End Evaluate
Set Field Value
Field: command = "getvdu"
Field: argument = "balance"
External Function
Function Name: vesp_dip
Use Arguments: command vduid argument value dummy
Return Field: ret_code
Evaluate
If ret_code
< 0
Goto TECH_ERROR
End Evaluate
Evaluate
If value
!= new_balance
Goto ALARM_SETVDU
End Evaluate
Set Field Value
Field: balance = value
Issue 2.0 June 2002
41
Chapter 3 Sample Script
135. Announce
Speak With Interrupt
Phrase: "Your balance is"
Field: balance As N$D2
136. Set Field Value
Field: balance_received = 1
137. Goto GET_CALLER_REQUEST
#**************************************************
GET_LANGUAGE:
138. Set Field Value
Field: command = "getvox"
Field: argument = "language"
139. External Function
Function Name: vesp_dip
Use Arguments: command vduid argument value dummy
Return Field: ret_code
140. Evaluate
If ret_code
< 0
141.
Goto TECH_ERROR
End Evaluate
142. Set Field Value
Field: language = value
143. Announce
Speak With Interrupt
Phrase: "Language is"
Field: language As Cmmf
144. Set Field Value
Field: language_received = 1
145. Goto GET_CALLER_REQUEST
#**************************************************
ALARM_ACCOUNT:
146. Set Field Value
Field: command = "alarm"
Field: arg2 = "InvalidAccount"
Field: arg3 = "Low"
Field: arg4 = "Entered invalid account #"
147. External Function
Function Name: vesp_dip
Use Arguments: command arg2 arg3 arg4 dummy
Return Field: ret_code
148. Goto TRANSFER_TO_AGENT
#**************************************************
ALARM_SETVDU:
149. Set Field Value
Field: command = "alarm"
Field: arg2 = "SetvduWrong"
Field: arg3 = "EMERGENCY"
Field: arg4 = "setvdu and getvdu didn't work!"
150. External Function
42 External Function Library for Avaya IVR
Script Builder Application Script
151.
152.
153.
154.
155.
156.
157.
158.
159.
160.
161.
162.
163.
Function Name: vesp_dip
Use Arguments: command arg2 arg3 arg4 dummy
Return Field: ret_code
Goto GOODBYE
#**************************************************
ALARM_PIN:
Set Field Value
Field: command = "alarm"
Field: arg2 = "InvalidPIN"
Field: arg3 = "Low"
Field: arg4 = "Entered invalid PIN"
External Function
Function Name: vesp_dip
Use Arguments: command arg2 arg3 arg4 dummy
Return Field: ret_code
Goto TRANSFER_TO_AGENT
#**************************************************
ALARM_CHOICE:
Set Field Value
Field: command = "alarm"
Field: arg2 = "InvalidChoice"
Field: arg3 = "Low"
Field: arg4 = "Invalid choice"
External Function
Function Name: vesp_dip
Use Arguments: command arg2 arg3 arg4 dummy
Return Field: ret_code
Goto TRANSFER_TO_AGENT
#**************************************************
TRANSFER_TO_AGENT:
Set Field Value
Field: command = "transfer"
Field: arg2 = "4000"
External Function
Function Name: vesp_dip
Use Arguments: command vduid arg2 dummy dummy
Return Field: ret_code
Set Field Value
Field: command = "gone"
Field: reason = ""
Goto END_CALL
#**************************************************
GOODBYE:
#Talk to the caller in the appropriate language.
Evaluate
If language = "Russian"
Announce
Speak With Interrupt
Phrase: "Russian: Thanks for calling"
Elseif language = "Hindi"
Issue 2.0 June 2002
43
Chapter 3 Sample Script
164.
Announce
Speak With
Phrase:
Else
165.
Announce
Speak With
Phrase:
End Evaluate
Interrupt
"Hindi: Thanks for calling"
Interrupt
"English: Thanks for calling"
166. Set Field Value
Field: end_of_call = 1
167. Set Field Value
Field: command = "gone"
Field: reason = "goodbye"
168. Goto END_CALL
#**************************************************
Hungup:
169. Set Field Value
Field: command = "gone"
Field: reason = ""
170. Goto END_CALL
#**************************************************
TECH_ERROR:
171. Announce
Speak With Interrupt
Phrase: "We are experiencing technical problems."
Phrase: "sil.200"
Phrase: "Please call us again."
172. Set Field Value
Field: command = "gone"
Field: reason = "tech_problems"
173. Goto END_CALL
#**************************************************
END_CALL:
174. External Function
Function Name: vesp_dip
Use Arguments: command vduid reason dummy dummy
Return Field: ret_code
175. Quit
44 External Function Library for Avaya IVR
INDEX
Symbols
L
+create 16–18
+getarg 16–18
+send 16, 18
+setarg 16, 18
line 11
log files 15–16
A
multi-language support 10
alarm function 29
Avaya CONVERSANT System 9
Avaya Interactive Voice Response (Avaya IVR) 9
N
C
channel 11
command line options 16
commands 9
configuration requirements 11
CONVERSANT 9
+create 16, 18
custom transactions 27
M
network IVR 23
newcall function 22
O
options, command line 16
P
port number 16
pseudo_ani function 23
D
R
DIP 9
requests 9
requirements
configuration 11
ret_code 20
E
educational services 7
error codes 15
error reporting 15–16
external functions 9
F
foreign languages 10
functions 9
creating 16
G
+getarg 16, 18
getvdu function 24
getvox function 25
gone function 28
S
Script Builder
Define External Function screen 19
Define Transaction screen 19
invoking vesp_dip 19
sample application 31
VOX Server interaction 10
scripting rules
Answer Phone 19
gone 19
insert trap 19
newcall 19
parameters 20
return field 20
+send 16, 18
+setarg 16, 18
setvdu function 26–27
45
Index
T
TCP/IP 10
tr function 26
transaction operations 27
trap function 21
U
untrap function 29–30
V
vesp_dip 10, 13, 20
function list 20
multiple 16
scripting rules 19
vesp_dip functions
+create 16–18
+getarg 16–18
+send 16, 18
46 External Function Library for Avaya IVR
+setarg 16, 18
alarm 29
getvdu 24
getvox 25
gone 28
newcall 22
pseudo_ani 23
setvdu 26–27
tr 26
trap 21
untrap 29–30
VOX Server
interpreting Avaya Computer Telephony messages 10
interpreting scripts 13
interpreting VRU messages 10
role 10
value cache 24–25, 27
VRU
interpreting Avaya Computer Telephony responses 10
network 23
Similar
Services Support Notice
Services Support Notice