User guide

August 2001 125
Handling Incoming and Outgoing Calls
Monitoring For Call Answer
Determine the status of a call using either RHT_START_PCPM
or RHT_WAIT_ANSWER. RHT_WAIT_ANSWER returns
successfully if it detects an answer pattern or returns an error
if it detects any other pattern such as a disconnect or bit errors.
If RHT_WAIT_ANSWER does not detect a bit change, it
continues running until the application terminates it through a
call to RHT_STOP.
In some protocols, the bit patterns are the same when dialing
out and when the remote end sends a disconnect signal. To
distinguish between these, call RHT_WAIT_ANSWER
immediately after dialing out and before calling any other line
function. After RHT_WAIT_ANSWER detects the answer, call
RHT_WAIT_LINE_OFF to detect disconnect. Calling the
functions in this specific order allows the device to keep track of
the call history and to differentiate between ambiguous bit
patterns based on their context.
RHT_WAIT_ANSWER only monitors for an answer based on
the answer supervision signal. If the application needs more
information about the call than whether it was answered, use
RHT_START_PCPM. RHT_START_PCPM accesses the
Programmable Call Progress Monitoring (PCPM) algorithm
that runs on the board’s DSP. PCPM monitors the line for
control tones, voice, or silence on the line and determines the
status of the call. Since PCPM monitors all audio on the line, it
can provide information about busy, no answer, or other line
conditions.
In systems using R2 inter-register signaling, an R2 signal
indicates whether the line is busy. Also, a bit change in the line
signaling protocol reports when the line becomes free, so PCPM
is not necessary to detect busy. For more information about R2
signaling, see Chapter 2, Digit Handling, on page 15.