User guide
72 RealCT Direct API Developer Guide
Chapter 3: T1 Networking
Example 4 shows the steps involved in using
RHT_START_PCPM to detect answer.
Example 4. Monitoring for Answer
1. The application starts RHT_START_PCPM with
VPstartStop_s fields ‘LineTerm0’ and ‘Timeout’ set.
2. When RHT_START_PCPM returns, the application calls
RHT_GET_STATUS for the VP device and checks
VPchanStatus_s.TermType.
3. If VPchanStatus_s.TermType contains
T_RHT_PCPM, then
RHT_START_PCPM determined the line state. The field
VPchanStatus_s.PCPMtype contains the line status
information.
4. If VPchanStatus_s.TermType contains
T_RHT_TIMEOUT, then
RHT_START_PCPM did not detect any condition within the
allotted amount of time.
5. If VPchanStatus_s.TermType contains
T_RHT_LINEOFF, the
CO either answered the call or disconnected before
answering the call. The application calls
RHT_GET_STATUS for the line device and checks
RTNI_lineStatus_s.TermType. This field contains
information about the status of the line.
Terminating an Outbound Call
Terminating an outbound call uses exactly the same procedure
as terminating an inbound call. For more information, see
Terminating an Inbound Call on page 66.