Previous Topic: PLAYGETDIGITS CommandNext Topic: RELEASECHANNEL Command


RECORDFILE Command

The RECORDFILE command allows a remote party to record a message. CA Automation Point stores the voice data (digitized speech) in a non-indexed disk file. A two-second audible tone precedes recording, alerting the remote party that the recording operation is active.

Recording terminates when one of the following events occurs:

This command has the following format:

ADDRESS VOX "RECORDFILE CHANNEL(channelhandle)
  FILE(filename)
  [SYSTEM(sysname)]
  [RECORDTIME(maxrectime)]
  [SILENCE(maxsilence)]
  [OVERWRITE(YES|NO)]
  [INTERRUPT(YES|NO)]"
CHANNEL

Specifies the channel handle (channelhandle)-identifying some physical channel-that the GETCHANNEL command returns.

FILE

Specifies the name of the nonindexed voice file in which to store your recorded voice data.

SYSTEM

(Optional) Specifies the name of the system that is running the notification server to which you want to direct the command.

The sysname value can contain up to eight alphanumeric characters.

Default: The local system name

RECORDTIME

(Optional) Specifies the maximum recording time allowed (in 1/10-second units).

Default: RECORDTIME(6000) (five minutes)

SILENCE

(Optional) Specifies the maximum amount of time to allow for silence during the recording operation (in 1/10-second units). The recording operation terminates when the maxsilence time expires.

Default: 50 (five seconds)

OVERWRITE

(Optional) Specifies whether a new recorded file (specified on the FILE operand) overwrites a file of the same name, if one exists.

Default: YES

INTERRUPT

(Optional) Specifies whether CA Automation Point interrupts (terminates) the recording operation if it receives a tone digit (that is, if the remote party presses a key on the telephone keypad). Valid values are:

YES

Allows the interruption

NO

Prevents the interruption

Default: YES

Return Information:

After the RECORDFILE command executes, it sets the special REXX return code variable RC.

Usage Notes:

We recommend that you do not use the RECORDFILE command to record voice data for your applications. Doing so causes the following problems, which are common in an analog environment:

Instead, use a voice-editor application to record your voice data.

Example:

The following REXX code illustrates how to use the RECORDFILE command to record a caller's message. The example code then delivers the recorded message to another party.

DELIVER_MESSAGE = 1

/* Get exclusive access to a specific voice channel. */

address vox 'getchannel channelnum(1) prefix(handle)'
...
/* Determine whether the caller wants to deliver a message. */

address vox 'playgetdigits channel('handle') file(leavemsg.vox) prefix(selection)'

if selection == DELIVER_MESSAGE then
do
   /* Record the message to deliver. */
   
address vox 'recordfile channel('handle') file(message.vox)'

   /* Get the four-digit extension of the party to whom the */
   /* caller wants to deliver the message. */

   address vox 'playgetdigits channel('handle') file(leavemsg.vox) count(4) singlestring(yes) prefix(extension)'

   /* Put the caller on hold and deliver the message. */

   address vox 'sendtones channel('handle') tonestring(&)'

   /* Get exclusive access to another specific voice channel. */

   address vox 'getchannel channelnum(2) prefix(handle2)'

   /* Call the specified extension and play the message. */

   address vox 'callplay tonestring('extension') channel('handle2') file(message.vox) prefix(result)'

   /* Release the second voice channel. */
   address vox 'releasechannel channel('handle')'

   /* Take the caller off hold. Let the caller know */
   /* whether the message was delivered.            */

   address vox 'sendtones channel('handle') tonestring(&)'

   if result == 0 then message = 'MESSAGE DELIVERED'
      else message = 'UNABLE TO DELIVER MESSAGE'
   address vox 'play tonestring('extension') channel('handle2') file(voxm_a) filetype(wordlib) var(message.)'
...
end

/* Release the voice channel. */
address vox 'releasechannel channel('handle')