Walkthrough: Play Audiotex Message Based on a System Variable and Get Caller Input Using Touch Tone Table

A System Variable returns information about the status of a call or the environment relating to the call.  A system variable can be the DNIS(Number Dialed by the caller), the line number answering the call or some other information.  See System Variables.

In this walkthrough we will send the caller to an Audiotex module based on the DNIS. The caller will hear a custom greeting and will be given the ability to select from several options.  Though each DNIS can have a custom greeting, the options provided will be the same system wide.  Options provided will allow caller to press 1 to hear the custom greeting again, 2 to leave a message for the DNIS admin or 3 to transfer.

DNIS is available only for T1 systems and returned by your T1 provider.  The number of DNIS digits returned is based on your T1 provider and set-up in your T1 configuration file.  See T1 Setup Guide.

Walkthrough Overview

In this walkthrough, you will:

  1. Set-up Voice Mail Parameters to set Mailbox Length to the same number of digits as DNIS received;
  2. Create Mailbox Records for each DNIS with email and phone notification;
  3. Set System Parameter required for notification to values required by your phone system and phone lines;
  4. Create Notification Records required by the Mailbox owner;
  5. Verify Attendant Parameters;
  6. Set-up Attendant Record for caller transfer option;
  7. Create Audiotex Modules and Associated Scripts to handle the call flow;
  8. Define entry in the IVR Application List for the new custom IVR;
  9. Set Ports to start in Audiotex mode.

During this walkthrough, you will learn to do the following:

Prerequisites and Assumptions

Setup the Voice Mail Parameters.

As we need to make the mailbox number the same as the DNIS returned, we need to make sure that the Mailbox Length is set to the same number of digits received as the DNIS (assumed to be 10 digits for this walkthrough).

Open the CALLMaster Manager. Click on Parameters, then select Voice Mail.  Double click on each of the parameters below to change their values.

Save and close the Voice Mail Parameters window.

Create Mailbox Records

We need to create a mailbox record for each DNIS enabled.  For each record, the Mailbox # will be equal to a DNIS, the Type set to User, Allow Login During Greeting enabled.  Add any other optional information as desired. 

Note: Keep Mailbox record 0000 with the default settings as CALLMaster requires it.  You should change the password for this record to maintain security.

If the mailbox owner wishes to receive email notification of messages or faxes received in their mailbox, enter their email address in the Email field.

Open the CALLMaster Manager. Click on Manage, then select Mailboxes.  Let's add 3 records in this walkthrough as follows:

Mailbox Records
Mailbox # Password Last Name Email Box Status Allow Log in During Greeting Notification Enabled Notify per Msg
8005551111 1111 DNIS1111 800555111@txt.att.net User Yes Yes Yes
8005552222 2222 DNIS2222 DNIS2222@support.com User Yes Yes  
8005553333 3333 DNIS3333 DNIS3333@service.com;
8005553333@vtext.com
User Yes    

By setting all records to Allow Login During Greeting, the mailbox owner will be able to log in while the greeting is played to Set Personal Options for the mailbox.  The changes made will take effect as soon as the owner logs out.

Verify System Parameters

As we are using Notification, we need to make sure that the System Parameters - Local Dialing Prefix, Long Distance Dialing Prefix, System's Area Code and System's Phone Number have the correct values for your environment.

Open the CALLMaster Manager. Click on Parameters, then select System.  Double click on each of the parameters to change their values as needed.  Remember, CALLMaster will use this information with the Notification data input below to make notification calls. See System Parameters for details.

For this walkthrough we will assume the following values:

Create Notification Records

As we have enabled the Notification On indicator for Mailboxes 8005551111 and 8005552222, we need to create Notification records for them.

Open the CALLMaster Manager. Click on Manage, then select Notification to add the records specified below.  For each record, set the Earliest Hour to Call, Latest Hour to Call, Days to Call and the Call Attempt Schedule as desired.  See Notification for details.

Notification Records
Mailbox # Record # Call Type Area Code Phone Number
8005551111 1 Human 914 1111111
8005552222 1 Human 914 2222222

Verify Attendant Parameters

To transfer calls, you must know the requirements of your phone lines or PBX.  In particular, you need to know the transfer string to initiate a transfer, and the pull back strings to drop a call in case of busy or no answer. Since the caller can enter a variable length extension ID, you need to set the Maximum Extension Length parameter.

Open the CALLMaster Manager. Click on Parameters, then select Attendant.  Confirm values for all the parameters on the list.  Double click on the parameter to change the value if required.  For this walkthrough, we will assume the values below.  Save and close the Attendant Parameters window after making any changes.

Attendant Parameters
Allow Any Transfer Drop 'Busy' Call Drop 'No Answer' Call Max Extension Length Transfer String
No &, &, 4 &,

Set-up Attendant Records

As one of the options offered to the caller is to be transferred to an agent, we need to setup Attendant records.  We will create an Attendant record for each DNIS enabled.  For each record, set the Attendant ID to a DNIS, the Time Of Day to All Day, and the Type of Transfer to Transfer. 

Since the Type of Transfer is set to Transfer, the Failed Transfer Action fields do not apply.  If you set the Type of Transfer to Supervised, requiring CALLMaster to monitor call transfer status, then you must set the Failed Transfer Action fields as desired.

We will also setup an evening record for one of the Attendants to enable caller to go directly to the associated mailbox during the evening hours (between the System Parameters Evening Starts At and Morning Starts At). 

See Managing Attendant for details.

Open the CALLMaster Manager. Click on Manage, then select Attendant.  Let's add 4 records in this walkthrough as follows:

Attendant Records
Attendant ID Time of Day Type of Transfer Number to Dial Mailbox
8005551111 All Day Transfer 9,1,2125551111  
8005552222 All Day Transfer 9,5552222  
8005552222 Evening Mailbox   8005552222
8005553333 All Day Transfer 9,1,2125553333  

Create Audiotex Records/Modules and Associated Scripts

As all calls will be starting in Audiotex mode in this walkthrough, the Audiotex Modules will determine the call flow. 

In the Audiotex set-up, the caller will first hear the greeting/message recorded for the DNIS called.  They will then be given the option to "Press 1 to hear DNIS greeting again, 2 to leave message or 3 to Transfer".

We will need to create several Audiotex records as shown below.  The Label field provides a brief description of each module.  

Audiotex Records
Module ID Label Write Label
to Log File
Module
Action
Next Module ID Fail Module ID Response
Length
Script File to Run
(Must include full path name)
Touch Tone Table
 1 2  3  4 5 6 7 8 9 0
100 Start call and Initialize values Yes Next Module 110 9900 0 InitializeVal.bas                    
110 Send caller to associated Audiotex module Yes Next Module 9999 9900 0 ReturnVar.bas                    
120 Send caller to associated Mailbox to leave message Yes Mailbox 9999 9900 0 ReturnVar.bas                    
130 Send caller to associated Attendant ID to be transferred Yes Attendant ID 9999 9900 0 ReturnVar.bas                    
190 Invalid input.  Yes Next Module 191 9900 0 CheckTryCount.bas                    
191 Try again. Yes Next Module 1000 9900 0                      
1000 Provide options "1 to hear DNIS greeting again, 2 to leave message or 3 to Transfer" and get caller response Yes Touch Tone Table 9920 9900 1   110 120 130 190 190 190 190 190 190 190
9900 Call Failure Detected Yes Next Module 9999 9999 0 SetCallFailure.bas                    
9910 Caller Hang-up Detected Yes Next Module 9999 9999 0 SetCallerHangup.bas                    
9920 Maximum tries attempted Yes Next Module 9999 9999 0 SetMaxAttempts.bas                    
9999 Last Module - End call Yes Last Module                            
8005551111 8005551111 Play custom recording for DNIS 
and return to module 120
Yes Next Module 1000 9900 0                      
8005552222 8005552222 Play custom recording for DNIS
and return to module 120
Yes Next Module 1000 9900 0                      
8005553333 8005553333 Play custom recording for DNIS
and return to module 120
Yes Next Module 1000 9900 0                      

Audiotex Module Description

Based on the Audiotex modules shown above, we will need several scripts. 

Let's create the scripts first.  Open Notepad and create scripts following code examples below.  Remember to save them as .bas type files in the Program Files\CALLMaster\Scripts folder.

CALLBasic Script - InitializeVal.bas Copy to Clipboard
Program
'*************************************************************************************************************************************
'     Script:  InitializeVal.bas
'     Function:  This script is used to initialize values
'*************************************************************************************************************************************

     strYes = "Yes"
     strNo = "No"
     intYes = 1
     intNo = 0
     strCallFailure = strNo
     strCallerHangup = strNo
     strMaxAttempts = strNo

     ' Set retry counter and maximum attempts allowed
     intTryCount = 1
     intMaxAttemptsAllowed = 3

     ' Assign the DNIS value from system variable $ddn to strRetVar
     strRetVar = $ddn

     ' If you want to determine the Audiotex module based on the Port #,
     ' then comment line above (strRetVar = $ddn)
     ' and uncomment If..Else..EndIf statement below
     'If $channel <= 2 Then
     '   strRetVar = "8005551111
     'Else
     '   strRetVar = "8005552222
     'EndIf

     ' Set the module to return to if caller hangs up
     lctrap = 9910

     'Print information to log file for reference and debugging
     pline = "Call received for DNIS " & strRetVar
     PrintNL pline

EndProgram

CALLBasic Script - ReturnVar.bas Copy to Clipboard
Program
'*************************************************************************************************************************************
'     Script:  ReturnVar.bas
'     Function:  This script uses the Return command with a variable. 
'*************************************************************************************************************************************

     '  When used with an Audiotex module whose Module Action is 'Next Module',
     '  the caller will be forwarded to the Audiotex module whose number is equal to variable strRetVar.
     Return strRetVar

EndProgram

CALLBasic Script - CheckTryCount.bas Copy to Clipboard
Program
'*************************************************************************************************************************************
'     Script:  CheckTryCount.bas
'     Function:  This script checks the number of invalid input attempts. 
'*************************************************************************************************************************************

     '  If the caller has reached the maximum attempts allowed then the call is routed to module 9920. 
     '  If not then they are returned back to module 1000 to retry input based on Next Module ID.
     If intTryCount > intMaxAttemptsAllowed Then
        Return 9920
     Else
        intTryCount = intTryCount + 1
     EndIf

     ' Convert system variable intTryCount from integer to string to be used in concatenated print statement.
     IntegerToString strTryCount  intTryCount

     pline = "***** For channel=" & strchannel
     pline = pline & " TryCount = "
     pline = pline & strTryCount
     PrintNL pline

EndProgram

CALLBasic Script - SetCallFailure.bas Copy to Clipboard
Program
'*************************************************************************************************************************************
'     Script:  SetCallFailure.bas
'     Function:  This script sets the strCallFailure variable to yes and prints information in the call log file.
'*************************************************************************************************************************************

     strCallFailure = strYes

     'Print information to log file for reference and debugging
     pline = "***** Call Failure. *****"
     PrintNL pline

EndProgram

CALLBasic Script - SetCallerHangup.bas Copy to Clipboard
Program
'*************************************************************************************************************************************
'     Script:  SetCallerHangup.bas
'     Function:  This script sets the strCallFailure variable to yes and prints information in the call log file. 
'*************************************************************************************************************************************

     strCallerHangup = strYes

     'Print information to log file for reference and debugging
     pline = "***** Caller Hangup. *****"
     PrintNL pline

EndProgram

CALLBasic Script - SetMaxAttempts.bas Copy to Clipboard
Program
'*************************************************************************************************************************************
'     Script:  SetMaxAttempts.bas
'     Function:  This script sets the strMaxAttempts variable to yes and prints information in the call log file. 
'*************************************************************************************************************************************

     strMaxAttempts  = strYes

     'Print information to log file for reference and debugging
     pline = "***** Maximum Attempts reached to enter valid input *****"
     PrintNL pline

EndProgram

Now you can create the Audiotex modules and reference the scripts above.  Open the CALLMaster Manager, click on Manage, then select Audiotex to add the Audiotex records shown above.

Define IVR Application List

We need to define the custom IVR in the IVR Application List and set it to Audiotex Start Module 100.  Open CALLMaster Manager and select Manage | IVR Application List.  Let's add a new record as follows:

IVR Application List
Audiotex Start Module Application Name
100 DNIS Based Processing Walkthrough

Set Ports

As a last step, we need set the port(s) to the new IVR Application entry created above.  Make sure the Audiotex Start Module field (read only) correctly points to module 100.

  As this walkthrough uses Notification, make sure at least one port is enabled for Type Outbound; all the ports should be enabled for Inbound. Set the Port Greeting File IDs to the main greeting for all calls if you have recorded one.  If you do not want a main greeting then set the Greeting File IDs to zero. Leave all other fields to the default values.

If you are working with a demo license or have only one line connected, then make sure the connected port is set as specified below.  All other ports should be set to Application 'Disabled'.

Port Records
Port # Application Audiotex Start Module Port Type
Outbound
Port Greeting File IDs
(Morning, Afternoon, Evening, Closed, Holidays)
1 DNIS Based Processing Walkthrough 100 No 0, 0, 0, 0, 0
2 DNIS Based Processing Walkthrough 100 No 0, 0, 0, 0, 0
3 DNIS Based Processing Walkthrough 100 Yes 0, 0, 0, 0, 0
4 DNIS Based Processing Walkthrough 100 Yes 0, 0, 0, 0, 0

Test the custom application

Save all your work. 

Stop CALLMaster service.

Make Administrator Audiotex Recordings:

-  Set Port 1 to Application Voice Mail.

-  Start CALLMaster service.

-  Make a call using Port 1.

Log in as the Administrator using the Voice Mail Main Menu and make recordings for the Audiotex modules below.

Tip:
- The Administrator should record a general message for one of the DNIS Audiotex modules and note the Message ID from this module.  This Message ID should be used when creating new DNIS Audiotex Modules. e.g. make a recording for module 8005551111 and use the Message ID to update modules 8005552222 and 8005553333.
- Similarly, the Administrator should make a general greeting for a Mailbox and use the Greeting File ID as the initial recordings for new mailbox records.
The general Audiotex recording and Mailbox greeting will provide a reference for the DNIS owner to make their custom recordings. 

Audiotex Module ID Proposed Recording
190 Invalid option. 
191 Please try again
1000 Press 1 to hear DNIS greeting again, 2 to leave message or 3 to Transfer
9900 We are unable to process your call.  Please contact the system administrator for further assistance.
9920 You have reached the maximum attempts allowed for a valid input.  Please contact the system administrator for further assistance.
8005551111 General recording for DNIS Audiotex module
   
Mailbox # Proposed Greeting
8005551111 Hi, at the tone please record a message for this mailbox.  Hang up when finished.

Reset Port 1 to Application Audiotex.  Set the Port Greeting File IDs to zeros.

Stop and Start CALLMaster service.

Make a phone call to test the application.

Make the custom Mailbox greetings and corresponding Audiotex Recordings

-  Have the Mailbox owner call the system using their DNIS;

-  Select option 2 to leave a message.  As the mailbox records are enabled to Allow Login During Greeting, the mailbox owner will be able to log in while the greeting is played to Set Personal Options for the mailbox.