User guide

70 RealCT Direct API Developer Guide
Chapter 3: T1 Networking
Dialing Out
After the application seizes the line, it dials the appropriate
number using RHT_DIAL. It can dial out using either MF or
DTMF tones. While dialing, the application monitors the line by
setting field in the RhtDialDigit_s structure as described in
Monitoring for Disconnect on page 64.
If the function returns successfully, the application monitors
the call for answer. If the function returns
T_RHT_LINEOFF, then
the function terminated because of a line condition. Call
RHT_GET_STATUS to find out what line condition occurred.
Other codes indicate more serious error conditions. You should
abandon the call using RHT_DISCONNECT and try the call
again.
For more information about how T1 applications dial digits, see
Chapter 2, Digit Handling, on page 15.
Monitoring for Call Answer
To detect the answer supervision signal in Wink Start, Double
Wink Start, or Immediate Start protocols, use
RHT_WAIT_ANSWER. RHT_WAIT_ANSWER monitors for
the answer bit pattern and informs the application when the
remote end answers.
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. In Ground Start
and Loop Start protocols, which do not return an answer
supervision signal, the function runs forever or until an error
occurs.
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 driver to keep track of
the call history and to differentiate between ambiguous bit
patterns based on their context.