Previous Topic: CALLPLAY CommandNext Topic: GETCHANNEL Command


CLEAR Command

The CLEAR command clears the digit buffer of a voice channel or its call analysis parameters.

This command has the following format:

ADDRESS VOX "CLEAR CHANNEL(channelhandle)
  CLEARTYPE(cleartype)
  [SYSTEM(sysname)]"
CHANNEL

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

CLEARTYPE

Specifies the type of CLEAR operation to perform. Valid values are:

DIGBUF

Clears the digit buffer (containing digits entered from the remote party's telephone keypad)

ANALYSIS

Clears the call progress analysis (CPA) parameters and resets them to the voice card manufacturer's defaults

ALL

Clears all of the above

SYSTEM

(Optional) Specifies the name of the system 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

Return Information:

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

Usage Note:

Determining when to clear a voice channel's digit buffer is application-specific. For example, an application that supports type-ahead dialing clears the digit buffer only on each call's call startup or termination. Generally, it is appropriate to clear the digit buffer immediately before initiating an I/O operation.

Example:

The following REXX code illustrates the CLEAR command. The program segment forces the remote party to listen to an entire voice message before allowing the remote party to enter a PIN number.

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

address vox 'getchannel channelnum(1) prefix(handle)'
...
/* Play a voice message, ensuring that the remote party listens */
/* to it in its entirety.                                       */

address vox 'play channel('handle') file(message.vox) interrupt(no)'

/* Clear the voice channel's digit buffer in case the remote   */
/* party entered digits (pressed keys on the telephone keypad) */
/* while the message was playing.                              */

address vox 'clear channel('handle') cleartype(digbuf)'
/* Get the remote party's PIN. */

address vox 'playgetdigits channel('handle') file(entrpin.vox) count(8) singlestring(yes) prefix(response)'
...

/* Release the voice channel. */

address vox 'releasechannel channel('handle')'