The following OPTOUTxxx.IIF infoboxes can be found in the FAXFACTS\SAMPES\OPTOUT folder.  They are coded to allow use with Text-To-Speech as an alternative to voice files.  If you do not use TTS, you will require the prompt messages listed.  The sample application includes WAV files generated using FFTESTTS using the standard USA Microsoft Speech Server voice.

Prompt Messages

If not using TTS 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):   You can adapt the texts from the $tts_text commands in the infoboxes below.

OPTOUT010.WAV (please enter code)

OPTOUT016.WAV (error in code)

OPTOUT020.WAV (please enter number)

OPTOUT026.WAV (error in number)

OPTOUT032.WAV (number added)

OPTOUT033.WAV (number already present)

OPTOUT036.WAV (unable to add number)

Sample text for the messages is shown in the $script commands below.  The files should be placed in the OPTOUT 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 OPTOUT020.

This part of the sequence uses an IIF 'question box', a second IIF to analyze the answer, and a third to handle errors:

; OPTOUT010.IIF

$type question

$if @USE_TTS = 1

  $tts_text "Please enter the `MAXCODE digit code number shown"

  $tts_text "on the fax you have received"

$else

  $image_desc standard    ;use OPTOUT010.WAV

$endif

$get_var LISTCODE @MINCODE @MAXCODE

$validate digits confirm  ;play back entered digits

$next_box OPTOUT011       ;go to validate entry

$error_exit OPTOUT016     ;go to error handler

; OPTOUT011.IIF

$type decision

$ife "@FFLOG\@LISTCODE.NDX"

  $next_box OPTOUT020     ;go to get opt-out number

$else

  $next_box OPTOUT016     ;go to error handler

$endif

; OPTOUT016.IIF

$type voice

$if @USE_TTS = 1

  $tts_text "<?xml version=""1.0"" encoding=""ISO-8859-1""?>"

  $tts_text "<ssml:speak version=""1.0"""

  $tts_text " xmlns:ssml=""http://www.w3.org/2001/10/synthesis"""

  $tts_text " xml:lang=""en-US"">"

  $tts_text "<ssml:paragraph xml:lang=""en-US"">"

  $tts_text "The code you have entered is not valid. Please"

  $tts_text "try again. If you continue to have problems,"

  $tts_text "please contact us"

  $if @HELPPHONE != @EMPTY

    $tts_text "on"

    $tts_text "<ssml:prosody rate=""slow"">"

    $tts_text "<ssml:say-as type=""spell-out"">"

    $tts_text "`HELPPHONE"

    $tts_text "</ssml:say-as>"

    $tts_text "</ssml:prosody>"

    $tts_text "</ssml:paragraph>"

    $tts_text "</ssml:speak>"

  $endif

$else

  $image_desc standard    ;use OPTOUT016.WAV

$endif

$nointerrupt              ;discard DTMF during this play

$set_var DATA1 @BLOCKNUMBER ;log number 

$set_var  DATA2 "ERR016"  ;log error

$next_box OPTOUT010       ;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.

; OPTOUT020.IIF

$type question

$if @USE_TTS = 1

  $tts_text "Please enter the fax number which is to be blocked"

$else

  $image_desc standard    ;use OPTOUT020.WAV

$endif

$get_var BLOCKNUMBER @MINDIG @MAXDIG 

$validate digits confirm  ;play back entered digits

$next_box OPTOUT021       ;go to validate entry

$error_exit OPTOUT026     ;go to error handler

 

; OPTOUT021.IIF

$type decision

$set_var BLOCKNUMBER $clean

$set_var ENTRYLENGTH "$fn:length(@BLOCKNUMBER)"

$if @ENTRYLENGTH < @MINDIG

  $next_box OPTOUT026     ;go to error handler

$elseif @ENTRYLENGTH > @MAXDIG

  $next_box OPTOUT026     ;go to error handler

$else

  $next_box OPTOUT030     ;go to update DNS

$endif

; OPTOUT026.IIF

$type voice

$if @USE_TTS = 1

  $tts_text "<?xml version=""1.0"" encoding=""ISO-8859-1""?>"

  $tts_text "<ssml:speak version=""1.0"""

  $tts_text " xmlns:ssml=""http://www.w3.org/2001/10/synthesis"""

  $tts_text " xml:lang=""en-US"">"

  $tts_text "<ssml:paragraph xml:lang=""en-US"">"

  $tts_text "You have not entered the correct number of digits."

  $tts_text "Please try again. If you continue to have problems,"

  $tts_text "please contact us"

  $if @HELPPHONE != @EMPTY

    $tts_text "on"

    $tts_text "<ssml:prosody rate=""slow"">"

    $tts_text "<ssml:say-as type=""spell-out"">"

    $tts_text "`HELPPHONE"

    $tts_text "</ssml:say-as>"

    $tts_text "</ssml:prosody>"

    $tts_text "</ssml:paragraph>"

    $tts_text "</ssml:speak>"

  $endif

$else

  $image_desc standard    ;use OPTOUT026.WAV

$endif

$nointerrupt              ;discard DTMF during this play

$set_var DATA1 @BLOCKNUMBER ;log number 

$set_var  DATA2 "ERR026"  ;log error

$next_box OPTOUT020       ;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.  The DNSUPD utility is used to update the NDX file.  These infoboxes could also be modified to use Extended CopiaFacts Database Support to update other database files.

; OPTOUT030.IIF

$type query

$if @LISTCODE = @EMPTY    ;we skipped OPTOUT010 from autocall

  $set_var DNSFILE DNS.NDX

$else

  $set_var DNSFILE @LISTCODE.NDX

$endif

$run """@PFC\DNSUPD.exe"" @BLOCKNUMBER @DNSFILE JNL=@ANI DUP=@ANI"

$next_box OPTOUT031       ;go to verify update

$error_exit OPTOUT036     ;go to error handler

; OPTOUT031.IIF

$type decision

$set_var DATA3 @FFRESULT

$if @FFRESULT = 0         ;success

  $next_box OPTOUT032     ;go to report success

$elseif @FFRESULT = 2

  $next_box OPTOUT033     ;go to report already listed

$else 

  $next_box OPTOUT036     ;go to report error

$endif

; OPTOUT032.IIF

$type voice

$if @USE_TTS = 1

  $tts_text "Your fax number has been added to our opt-out list."

$else

  $image_desc standard    ;use OPTOUT032.WAV

$endif

$nointerrupt

$set_var DATA1 @BLOCKNUMBER ;log number

$set_var DATA2 OPTOUT     ;log success

$next_box s:GOOD_BYE      ;play SVP58

; OPTOUT033.IIF

$type voice

$if @USE_TTS = 1

  $tts_text "The number you entered was already in our opt-out list."

  $tts_text "Please verify that this number matches the destination number"

  $tts_text "at the top of the fax you received."

  $tts_text "If you continue to receive faxes, please fax us the fax you"

  $tts_text "received, so that we can verify that the number has been removed."

$else

  $image_desc standard    ;use OPTOUT033.WAV

$endif

$nointerrupt

$set_var DATA1 @BLOCKNUMBER ;log number 

$set_var  DATA2 "ERR033"  ;log error

$next_box s:GOOD_BYE      ;play SVP58

; OPTOUT036.IIF

$type voice

$if @USE_TTS = 1

  $tts_text "The number you entered will be added to our opt-out list."

  $tts_text "It may not be possible to stop faxes already scheduled today," 

  $tts_text "but we will try to do so."

$else

  $image_desc standard    ;use OPTOUT036.WAV

$endif

$nointerrupt

$set_var DATA1 @BLOCKNUMBER ;log number 

$set_var  DATA2 "ERR036"  ;log error

$next_box s:GOOD_BYE      ;play SVP58

 

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\SAMPLES\OPTOUT, the COLLECT command would be as follows:

COLLECT @FFBASE\SAMPLES\OPTOUT\OPTOUT.IBC @FFBASE\SAMPLES\OPTOUT\OPTOUT*.IIF

You then cause this collection of infobox files to be loaded using a $load_ibc command in FAXFACTS.CFG:

$load_ibc * OPTOUT @FFBASE\SAMPLES\OPTOUT\OPTOUT.IBC

Finally, to use this IBC in the application, change the $script_locn command in the USR file to reference the IBC name instead of the folder containing the infoboxes:

$script_locn OPTOUT DNSADD999 IBC @FFBASE\SAMPLES\OPTOUT\OPTOUT.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 $script_locn commands.