User guide
August 2001 113
Handling Incoming and Outgoing Calls
Detecting Digits
When an application receives an incoming call, it generally
receives information about the call setup from the originating
end. The method used to send these digits depends on the way
the CO has configured the line. Most COs use R2 compelled
signaling, but some use DTMF or MF tones to send digits.
Despite the name, there is no association between the
R2-CCITT line signaling protocols and the R2 inter-register
signaling. Any board with voice processing capabilities can
handle R2 inter-register signaling, regardless of the type of line
interface. Likewise, an E1 line configured to use an R2-CCITT
line protocol can receive digits through a different method of
inter-register signaling. However, most E1 systems use R2
inter-register signaling. For more information about R2
inter-register signaling, see Chapter 2, Digit Handling, on
page 15.
Before detecting new digits from an incoming call, flush the
digit buffer using RHT_FLUSH_DIGIT. Otherwise, digits
stored in the buffer from a previous call could be handled in the
new call. The best time to flush digits is after going on hook but
before calling RHT_WAIT_LINE_ON. If you flush digits after
calling RHT_WAIT_LINE_ON, your thread could get
pre-empted and rescheduled for after the application has
started receiving digits from a new call. When the application
eventually flushes the digit buffer it clears digits from the
current call and loses that data.
Once the application receives call setup information, it answers
the call. If the inter-register signaling fails, then the circuit is
released.