In this walkthrough we will make outbound calls using CALLMaster Out Dial functionality to play a message or fax a document depending on the call connect type.
This Sample Application is available for download. Use link at the end of this walkthrough to download and install sample application.
Walkthrough Overview
In this walkthrough, you will:
During this walkthrough, you will learn to do the following:
Prerequisites and Assumptions
Set System Parameters
As we are using Out Dial, 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. We
also need to set the time that CALLMaster can 'Start Calling at' and needs to
'Stop Calling at'.
As we want CALLMaster to continuously attempt outbound
calls and reduce the sleep default time from 30 seconds to 3 seconds, we will
add flags 'OCNV' and 'OSST3 in the System Flags field.
As we want to leave a message if call receives an
answering machine connect, we need to adjust the Parameter Record Max Silence
(see Out Dial -
Human/Answering Machine/Fax Detection for details).
Open the CALLMaster Manager. Click on Parameters, then select System. Double click on each of the parameters to change their values as needed. See System Parameters for details.
For this walkthrough we will assume the following values:
Set Dialogic Parameters
As we are using Out Dial and want to detect Human, Answering Machine and Fax connect, we need to adjust the several Dialogic Parameters (see Out Dial - Human/Answering Machine/Fax Detection for details).
Open the CALLMaster Manager. Click on Parameters, then select Dialogic. Double click on each of the parameters to change their values as needed.
For this walkthrough we will assume the following values:
Define Global Tone for Fax
For the Dialogic board to detect a fax tone, we need to define the tone settings in the Global Tones table.
Open the CALLMaster Manager. Click on Manage, then select Global Tones. If there is an record for a Fax tone, then just verify the setting. If not then Add a record to this table with values as below.
Global Tones | |||||||||||||
Tone Type | Characteristic | Detection Mode | Translation | Frequencies (Hz) | Cadence (10ms) | ||||||||
Translate to Char | Character | Tone 1 Freq | Tone 1 Dev | Tone 2 Freq | Tone 2 Dev | On Time | On Time Dev | Off Time | Off Time Dev | Minimum Repetition Count | |||
Fax | Single Tone | Leading Edge | Yes | F | 1100 | 50 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
Create Fax Record
To fax a document, we need to create the document in the format required by the Dialogic board, and define the document in the Fax table.
The fax document needs to be in a Tiff-F format. See
Fax Overview for details.
For this
walkthrough, download the
Fax
Test Document as a sample document and save to a folder.
To define the document created above, open the CALLMaster Manager. Click on
Manage, then
select Faxes. Add record using the Fax Test Document
saved as the File to Send.
Note the Fax ID of the record added for use with
the FaxSend command.
If you wish to fax various fax document, you may want to consider either:
See OutcallSchedule Record for details.
Create Audiotex Records 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,
If call result is a Connect and it receives a human or answering machine connect.
- the called party will be played a message
- If connect type is human then the called party will be given the option to "Press 1 to be removed from the List". If the called party enters a 1 then the OutcallSchedule record Status field will be updated to 1 - Don't call and the number called will be added to OutcallSchedule-DontCall table.
If call result is Fax then a document defined in the Fax table will be faxed to the called party.
NOTE: the Audiotex application will only get processing control if the call results in a connect (i.e. $CR = 10). If the call does not result in a connect, then the call is reset based on the busy/no answer/no confirm retry values from the OutcallSchedule record.
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) (c:\Program Files\CALLMaster\Scripts\SampleApp-ODRemoveOpt\) |
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 | Perform call analysis to determine if it is a human, answering machine, or fax response. | Yes | Next Module | 9999 | 9900 | 0 | OD-CallAnalysis.bas | ||||||||||
200 | Human Connect Detected. Play Audiotex Module recording. | Yes | Next Module | 210 | 9900 | 0 | |||||||||||
210 | Provide options "1 to be removed from the list" and get caller response | Yes | Touch Tone Table | 9920 | 9900 | 1 | 220 | 290 | 290 | 290 | 290 | 290 | 290 | 290 | 290 | 290 | |
220 | Update OutcallSchedule record and set Status to Don't Call (1). Insert number dialed to the OutcallSchedule-DontCall table. | Yes | Next Module | 230 | 9900 | UpdateODStatus-InsertODDontCall.bas | |||||||||||
230 | Let caller know they have been removed from the list | Yes | Next Module | 9999 | 9999 | ||||||||||||
290 | Invalid input. | Yes | Next Module | 291 | 9900 | 0 | CheckTryCount.bas | ||||||||||
291 | Try again. | Yes | Next Module | 210 | 9900 | 0 | |||||||||||
300 | Answering Machine Connect Detected. Play Audiotex Module recording. | Yes | Next Module | 9999 | 9999 | ||||||||||||
400 | Fax Connect Detected. Use FaxSend to fax document. | Yes | Next Module | 9999 | 9999 | FaxSend.bas | |||||||||||
500 | Other Connect | Yes | Next Module | 9999 | 9999 | ||||||||||||
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 |
Audiotex Module Description
Based on the Audiotex modules shown above, we will need 6 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 intOne = 1 intZero = 0 ' Set retry counter and maximum attempts allowed intTryCount = 1 intMaxAttemptsAllowed = 3 ' OutcallSchedule record values ODMatchExists = intNo ODDBOpen = intNo OD-strStatus-DontCall = "1" ' Get value of OutcallSchedule system variables and assign to local variables. ' If variable is an integer then convert to string local variable OD-intOutDialID = $outdialID IntegerToString OD-strOutDialID $outdialID OD-intResult = $cr IntegerToString OD-strResult $cr OD-intConnection = $contype IntegerToString OD-strConnection $outdialID OD-strDialPrefix = $dialprefix OD-strAreaCode = $areacode OD-strPhoneNum = $phonenum ' Set connection string to read CALLMasterSQL database strCMConnection = "Provider=SQLOLEDB;Server=<server>;DATABASE=CALLMasterSQL;UID=;PWD=;Integrated Security=SSPI;" ' Set the module to return to if caller hangs up lctrap = 9910 ' Convert system variable $channel from integer to string to be used in concatenated print statement. IntegerToString strchannel $channel pline = "***** For channel=" & strchannel pline = pline & " Started Out Dial for ID=" & OD-strOutDialID pline = pline & " with OD-strDialPrefix=" & OD-strDialPrefix pline = pline & "; OD-strAreaCode=" & OD-strAreaCode pline = pline & "; OD-strPhoneNum=" & OD-strPhoneNum PrintNL pline EndProgram |
CALLBasic Script - OD-CallAnalysis.bas | Copy to Clipboard |
Program '***************************************************************************************************************** ' Script: OD-CallAnalysis.bas ' Function: This script checks the call connection type and returns based on the system variable $contype. '***************************************************************************************************************** ' Set variables for recording if Answering Machine Connection intPmt = 0 intRecTime = 60 strT = "0" strA = "" ' If Call Result Connected If OD-intResult = 10 Then ' Human Voice Connection If OD-intConnection < 4 Then Return 200 Else 'Answering machine Record recfileid intPmt intRecTime strA strT e d FileIDToName destname recfileid FileDelete destname Return 300 EndIf Else ' If Call Result Fax If OD-intResult = 18 Then Return 400 Else Return 500 EndIf EndIf 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 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 - UpdateODStatus-InsertODDontCall.bas | Copy to Clipboard |
Program '******************************************************************************************************************* ' Script: UpdateODStatus-InsertODDontCall.bas ' Function: This script updates the Status to 1 for Don't Call '******************************************************************************************************************* ' Create a new command and open a connection to the CALLMaster database Set ODvarCommand = New Command ODvarCommand.ActiveConnection strCMConnection ODDBOpen = intYes If $DBError <> intZero Then Set ODvarCommand = Nothing ODDBOpen = intNo pline = "***** For channel=" & strchannel pline = pline & " Error Opening db. " PrintNL pline Return 9900 Else EndIf ' Set Query to update record strSQL = "Update [OutcallSchedule] Set [Status] =" strSQL = strSQL & OD-strStatus-DontCall strSQL = strSQL & " WHERE [ID] =" strSQL = strSQL & OD-strOutDialID strSQL = strSQL & "" pline = "For channel " & strchannel pline = pline & " strSQL = " & strSQL PrintNL pline ' Open CMDM database and find record ODvarCommand.Execute strSQL If $DBError <> intZero Then ODvarCommand.CloseConnection Set ODvarCommand = Nothing ODDBOpen = intNo pline = "***** For channel=" & strchannel pline = pline & " Error Updating Record. " PrintNL pline Return 9900 Else EndIf ' Set Query to insert record to the OutcallSchedule-DontCall table strSQL = "INSERT INTO [OutcallSchedule-DontCall] (AreaCode, PhoneNumber) VALUES ('" strSQL = strSQL & OD-strAreaCode strSQL = strSQL & "', '" & OD-strPhoneNum strSQL = strSQL & OD-strPhoneNum strSQL = strSQL & "')" pline = "For channel " & strchannel pline = pline & strSQL PrintNL pline ' Execute Insert command ODvarCommand.Execute strSQL If $DBError <> intZero Then ODvarCommand.CloseConnection Set ODvarCommand = Nothing ODDBOpen = intNo pline = "***** For channel=" & strchannel pline = pline & " Error inserting. " PrintNL pline Return 9900 Else EndIf ' Close DB Connection and clear command ODvarCommand.CloseConnection Set ODvarCommand = Nothing ' ODDB database closed ODDBOpen = intNo 'Print information to log file for reference and debugging pline = "***** For channel=" & strchannel pline = pline & " Updated OutcallSchedule to Don't Call for ID=" & OD-strOutDialID pline = pline & " with OD-strDialPrefix=" & OD-strDialPrefix pline = pline & "; OD-strAreaCode=" & OD-strAreaCode pline = pline & "; OD-strPhoneNum=" & OD-strPhoneNum pline = pline & ". Inserted record to the OutcallSchedule-DontCall table" PrintNL pline EndProgram |
CALLBasic Script - FaxSend.bas | Copy to Clipboard |
Program '********************************************************************************************************* ' Script: FaxSend.bas ' Function: This script faxes the document from the Fax Table. '********************************************************************************************************* ' Set the Doucment ID from the Fax table of the document you want to fax. intFaxDocID = 1 ' The phone number is used only for reference purposes and not to make a call. ' This field can be null if faxing to the same number that the call is connected to as part of the Out Dial. strFaxPhoneNum = $areacode & $phonenumber FaxSend intFaxDocID strFaxPhoneNum car ' CALLMaster returns the fax send status in system variable $faxsent. pline = "***** For channel=" & strchannel pline = pline & " Faxed Document ID = " & strFaxPhoneNum pline = pline & " with transmission status returned " & $faxsent 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 = "***** For channel=" & strchannel pline = 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 = "***** For channel=" & strchannel pline = 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 = "***** For channel=" & strchannel pline = 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. Let's add the Audiotex records shown above.
Define IVR Application List Entry
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 | Broadcast with Remove Option Sample |
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.
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 | Broadcast with Remove Option Sample | 100 | Yes | 0, 0, 0, 0, 0 |
2 | Broadcast with Remove Option Sample | 100 | Yes | 0, 0, 0, 0, 0 |
3 | Broadcast with Remove Option Sample | 100 | Yes | 0, 0, 0, 0, 0 |
4 | Broadcast with Remove Option Sample | 100 | Yes | 0, 0, 0, 0, 0 |
Test the custom application
Make sure you have set the CALLMasterSQL database connection string variable strCMConnection in the InitializeVal.bas script for your environment.
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.
Audiotex Module ID | Proposed Recording |
200 | Recording for Human Connection |
210 | Press 1 if you want to be removed from the list |
230 | You have been removed from the list |
290 | Invalid option. |
291 | Please try again |
300 | Recording for Answering Machine Connection |
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. |
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.
Tip: See Walkthrough: Change Application Without Restarting CALLMaster Service to set port to Voice Mail to make recording without stopping and restarting the CALLMaster service.
To download and install, see Sample Applications.