This sample application is designed to allow a caller to add a fax number to a do-not-send index file. It will require some customization to suit local conditions, but the infobox file descriptions below discuss the most likely changes.
It is assumed that a telephone number or numbers have been allocated for voice callers to use to submit opt-out fax numbers. The telephone number will normally have been shown somewhere on the faxes transmitted, along with perhaps a code number to select the DNS file when multiple DNS files are in use.
This sample script can be customized either for directly updating the system do-not-send file DNS.NDX, or for updating user-specific do-not-send files (named using the code number shown on the fax) which will be in the folder @FFBASE\USERDNS.
Preparation - using analog phone lines
It is necessary to establish a method of initiating the script. In a simple analog system, this is done by allocating a specific user profile to an incoming voice line using $default_profile in FAXFACTS.CFG:
$default_profile 3 DNSADD.USR ; use DNSADD for line 3
The DNSADD.USR should contain an $image_locn command to specify the folder for the IIF and VOX/WAV files used in this application, and an $auto_call command to start the infobox sequence:
$image_locn DNSADD DNSADD999 "@FFBASE\DNSADD"
$auto_call DNSADD010
In addition, you may require commands to locate any override system messages and multi-segment files needed for the application, for example:
$vmsg_dir @FFBASE\DNSADD
$user_pb_dig @FFBASE\wav_8k_mulaw\faxfactw.dig
Preparation - using digital phone lines
Normally on a digital system there will be a special number allocated for the IVR application, which selects a USR file based on the number of digits specified for DNIS in the Copiafacts configurator FFHWL. The USR file is then automatically picked up when an incoming call to the number is received.
For example, if 4 digits of DNIS are used, and the application is assigned the DID 1234, then the incoming call will pick up 00001234.USR. If you have only a single opt-out IVR application, this file can contain:
; 00001234.USR
$image_locn DNSADD DNSADD999 "@FFBASE\DNSADD"
$auto_call DNSADD010 ;(or DNSADD020 if single DNS file only)
$vmsg_dir @FFBASE\DNSADD
$user_pb_dig @FFBASE\wav_8k_mulaw\faxfactw.dig
For systems with more than one number allocated for different IVR scripts, they can be defined separately by adding one folder level to distinguish them, and then creating multiple USR files, one for each allocated DNIS:
; 00001234.USR
$image_locn DNSADD DNSADD999 "@FFBASE\1234\DNSADD"
$auto_call DNSADD010 ;(or DNSADD020 if single DNS file only)
$vmsg_dir @FFBASE\1234\DNSADD
$user_pb_dig @FFBASE\wav_8k_mulaw\faxfactw.dig
In this case you can customize the greeting and other messages and place them in separate DNSADD folders. In the infobox descriptions below, we refer just to 'the DNSADD folder', but this will actually be the DNSADD folder selected by the $image_locn command in the DNIS-selected USR file.
Preparation - timeouts
You should also add to the USR file the settings you require for timeout on DTMF entry and the number of repeats when invalid input is detected. These need only be changed if you wish to override the system defaults. The commands you need to consider are $tone_wait and $repeat_msg. You can also use these commands in an infobox file to control specific prompts, but the value set in an infobox applies for the remainder of the call unless again overridden.
Greeting Message
You should normally record a greeting message confirming that the correct service has been reached. This should be recorded into either DNSADD\SVP1.VOX or DNSADD\SVP1.WAV, depending on the voice formats used by your system. A typical greeting message would be:
"This service allows you to enter a fax number which is to be excluded from our broadcast lists"
When there are multiple DNS applications, you can identify the specific application in the message. A separate SVP1 message is recommended, although it is also possible to include the greeting in the first question-box prompt message. However you may not want to repeat the greeting every time you repeat the question after an error has been detected.
System Voice Prompt Overrides
You may also wish to override the following system prompts, of which the full standard text is shown in Appendix A:
SVP5 (menu selection incorrect)
SVP45 (cannot detect touch tones)
SVP58 (thank you for calling)
SVP59 (if correct, press 1, otherwise press 0)
Recording your own versions of these messages allows the same voice to be used as in the custom prompt messages you set up, and allows personalization such as phone numbers to be added to error prompts. When you have recorded these messages, place the SVP files in the DNSADD folder referenced from $vmsg_dir in the USR file.
Prompt Messages
You will require some or all of the following prompt messages (which can be .VOX or .WAV depending on the voice formats used by your system):
DNSADD010.VOX (please enter code)
DNSADD016.VOX (error in code)
DNSADD020.VOX (please enter number)
DNSADD026.VOX (error in number)
DNSADD032.VOX (number added)
DNSADD033.VOX (number already present)
DNSADD036.VOX (unable to add number)
Sample text for the messages is shown in the $script commands below. The files should be placed in the DNSADD folder. If it is impractical to use this folder for prompt messages, replace the 'standard' keyword on the $image_desc commands below with the full pathname of the applicable file.
Do-Not-Send file selection
Some applications may require different do-not-send files for each broadcast job owner, which would normally be identified by a code on the broadcast faxes. The first part of the infobox sequence is used to obtain this code number. If the application selected on this DNIS only uses a single do-not-send file, skip this step by changing the infobox name on the above $auto_call commands to DNSADD020.
This part of the sequence uses an IIF 'question box', a second IIF to analyse the answer, and a third to handle errors:
; DNSADD010.IIF
$type question
$script "Please enter the 4-digit code number shown"
$script "at the foot of the fax you have received"
$image_desc standard ;use DNSADD010.VOX
$get_var LISTCODE 4 4 ;expect 4 digits
$validate digits confirm ;play back entered digits
$next_box DNSADD011 ;go to validate entry
$error_exit DNSADD016 ;go to error handler
; DNSADD011.IIF
$type decision
$ife "@FFBASE\USERDNS\@LISTCODE.NDX"
$next_box DNSADD020 ;go to get opt-out number
$else
$next_box DNSADD016 ;go to error handler
$endif
; DNSADD016.IIF
$type voice
$script "The code you have entered is not valid. Please"
$script "try again. If you continue to have problems,"
$script "please contact us on 800-123-4567"
$image_desc standard ;use DNSADD016.VOX
$nointerrupt ;discard DTMF during this play
$set_var DATA2 "ERR016' ;log error
$next_box DNSADD010 ;go back to start
Opt-out number entry
This section of the script handles the entry of the opt-out fax number. The detail of this section will require customization to suit local conditions. You should make clear in the prompt whether you accept a fixed number of digits and if so, how many. You should normally set the $get_var maximum to be higher than the expected number of digits.
; DNSADD020.IIF
$type question
$script "Please enter the 10-digit fax number to be blocked"
$image_desc standard ;use DNSADD020.VOX
$get_var BLOCKNUMBER 7 11 ;modify to suit local conditions
$validate digits confirm ;play back entered digits
$next_box DNSADD021 ;go to validate entry
$error_exit DNSADD026 ;go to error handler
; DNSADD021.IIF
$type decision
$set_var BLOCKNUMBER $clean
$set_var ENTRYLENGTH "$fn:length(@BLOCKNUMBER)"
$if ENTRYLENGTH != 10 ;customize validation as required
$next_box DNSADD026 ;go to error handler
$else
$next_box DNSADD030 ;go to update DNS
$endif
; DNSADD026.IIF
$type voice
$script "You have not entered the correct number of digits."
$script "Please try again. If you continue to have problems,"
$script "please contact us on 800-123-4567"
$image_desc standard ;use DNSADD026.VOX
$nointerrupt ;discard DTMF during this play
$set_var DATA2 "ERR026" ;log error
$next_box DNSADD020 ;go back to start
DNS file update
The file update shown in this example uses the standard NDX files supported by all versions of CopiaFacts. These infoboxes could also be modified to use Extended CopiaFacts Database Support to update other database files.
; DNSADD030.IIF
$type query
$if @LISTCODE = @EMPTY ;we skipped DNSADD010 from autocall
$set_var DNSFILE @FFLOG\DNS
$else
$set_var DNSFILE "@FFBASE\USERDNS\@LISTCODE"
$endif
$run "CMD /c @FFBASE\UPDATER.CMD @LNUM ""@DNSFILE"" @BLOCKNUMBER"
$next_box DNSADD031 ;go to verify update
$error_exit DNSADD036 ;go to error handler
; DNSADD031.IIF
$type decision
$if @RUN_VALUE = @EMPTY ;success
$next_box DNSADD032 ;go to report success
$elseif @RUN_VALUE = DUPLICATE
$next_box DNSADD033 ;go to report already listed
$elseif @RUN_VALUE = ERROR
$next_box DNSADD036 ;go to report error
$endif
; DNSADD032.IIF
$type voice
$script "Your fax number has been added to our opt-out file."
$image_desc standard ;use DNSADD032.VOX
$nointerrupt
$set_var CALLERPN @BLOCKNUMBER ;log number in DBF 'PHONE' field
$set_var DATA2 DNSADD ;log success
$next_box s:GOOD_BYE ;play SVP58
; DNSADD033.IIF
$type voice
$script "The number you entered was already in our opt-out file."
$script "If you have recently received a further fax from us,"
$script "please call us on 0800 123 4567 so that we can resolve"
$script "this issue as soon as possible."
$image_desc standard ;use DNSADD033.VOX
$nointerrupt
$set_var DATA2 "ERR033" ;log error
$next_box s:GOOD_BYE ;play SVP58
; DNSADD036.IIF
$type voice
$script "We're sorry, but we are unable to add this number to our"
$script "opt-out list at this time. Please call us on 0800 123 4567"
$script "so that we can resolve this issue as soon as possible."
$image_desc standard ;use DNSADD036.VOX
$nointerrupt
$set_var DATA2 "ERR036" ;log error
$next_box s:GOOD_BYE ;play SVP58
Command file to update do-not-send index
Using a command file gives you more control over the processing of the update. The above infoboxes assume that this command file is located in the main FAXFACTS folder, and that the PIN.EXE and RUNVALUE.EXE utilities are in the usual CopiaFacts program folder.
REM UPDATER.CMD Parameters: LNUM DNSFILE BLOCKNUMBER
"c:\program files\copia\RUNVALUE.EXE" %1
"c:\program files\copia\PIN.EXE" "%2" A %3
IF %ERRORLEVEL% == 0 EXIT /b
IF %ERRORLEVEL% == -1 (
"c:\program files\copia\RUNVALUE.EXE" %1 DUPLICATE
) ELSE (
"c:\program files\copia\RUNVALUE.EXE" %1 ERROR
)
This command file uses the RUNVALUE utility to pass a value (for the CopiaFacts line in use) back to COPIAFACTS. The PIN utility returns an errorlevel of 0 for success, -1 for a duplicate, and any other value indicates an error. If you have problems with the PIN return values, enable PIN under File/Applications in FFTRACE to see what is happening.
Creating an Infobox collection file
When you have fully tested this application, you can combine all the infoboxes into an Infobox Collection. This will enhance the efficiency of the operation and reduce delays on the IVR under heavy load conditions.
For a single application in @FFBASE\DNSADD, the COLLECT command would be as follows:
COLLECT @FFBASE\DNSADD\DNSADD.IBC @FFBASE\DNSADD\DNSADD*.IIF
You then cause this collection of infobox files to be loaded using a $load_ibc command in FAXFACTS.CFG:
$load_ibc * DNSADD @FFBASE\DNSADD\DNSADD.IBC
Finally, to use this IBC in the application, change the $image_locn command in the USR file to reference the IBC name instead of the folder containing the infoboxes:
$image_locn DNSADD DNSADD999 IBC @FFBASE\DNSADD\DNSADD.IBC
If you have multiple IVR applications of this type, create a separate IBC for each, using the appropriate folder names and using different IBC names for the $load_ibc and $image_locn commands.
Topic url: http://www.copia.com/support/refmanual/index.html?fax_opt_out_ivr_application.htm