Previous Topic: Valid Dialing CharactersNext Topic: ANSWERPLAY Command


ANSWER Command

The ANSWER command waits for a period specified by the TIMEOUT parameter for an incoming telephone call on any one of a designated set of voice channels available at the time the command was invoked. The ANSWER command will not wait for incoming calls on voice channels that are marked as in-use at the time the command is invoked.

Furthermore, when the ANSWER command is invoked with the GROUP operand, any one channel satisfies the command and returns control to the caller with the handle to the answered channel. This answered channel must be released when you are done with the call (see the description of the RELEASECHANNEL command). This channel cannot reenter the set of channels on which any outstanding ANSWER command is waiting.

The ANSWER command can answer a call on:

When answering an incoming call, the ANSWER command:

This command has the following format:

ADDRESS VOX "ANSWER {CHANNEL(channelhandle)|GROUP(groupname|ALL)}
                     [SYSTEM(sysname)]
                     [ANSRING(ringnumber)]
                     [TIMEOUT(waittime|0|-1)]
                     [HOOKSTATE(hookstate)]
                     [PREFIX(varname)]
                     [CMDRESP(destination)]"
CHANNEL

Specifies the channel handle (channelhandle)-identifies a physical channel-that the GETCHANNEL command returns.

GROUP

A group name defining a group of specific, physical channel numbers that the ANSWER command monitors for an incoming call. (For more information about assigning channels to a group, see the description of the SETGROUP command.)

ALL enables the ANSWER command to monitor all groups (and, therefore, all channels) for a call.

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

ANSRING

(Optional) Specifies the ring number on which to answer an incoming call.

Default: 1

TIMEOUT

(Optional) Specifies the maximum amount of time to wait for rings (in 1/10-second units). Or, you can specify 0 (zero) to return immediately if no ring exists or -1 to wait indefinitely.

Default: -1

HOOKSTATE

(Optional) Specifies the desired hook state after CA Automation Point detects a ring. Valid values are OFFHOOK and ONHOOK.

Default: OFFHOOK

PREFIX

(Optional) Specifies the name of a REXX stem variable (other than the default name) that contains the return information for the command.

For information about changing the default variable name, see ADDRESS VOX Return Information in this chapter.

Default: VOX.ANSWER

CMDRESP

(Optional) Directs return information to a specific destination (destination). For a list of valid destination values, see ADDRESS VOX Return Information in this chapter.

Return Information:

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

Examples: