Global Call API for HMP on Windows Programming Guide — August 2006 61
Call State Models
3.4.3.1 Call Termination in Asynchronous Mode Overview
Figure 15 illustrates the call states associated with call termination or call teardown in the
asynchronous mode initiated by either a call disconnection or failure. See Table8 for a summary of
the call state transitions. A call can be terminated by the application or by the detection of a call
disconnect from the network. Either of these terminations can occur at any point in the process of
setting up a call and during any call state.
Figure 15. Asynchronous Call Tear-Down State Diagram
Note: In Figure15, the GetMoreInfo and SendMoreInfo states apply to E1, T1 and ISDN technologies
only.
3.4.3.2 User Initiated Termination
The application terminates a call by issuing a gc_DropCall() func tion that initiates disconnection
of the call specified by the CRN. When the remote side responds by disconnecting the call, a
GCEV_DROPCALL event is generated and causes a transition from the current call state to the
Idle state. The user must then issue the gc_ReleaseCallEx( ) function to release all internal
resources allocated for the call.
3.4.3.3 Network Initiated Termination
When a network call termination is initiated, an unsolicited GCEV_DISCONNECTED event is
generated. This event indicates the call was disconnected at the remote end or an error was
detected, which prevented further call processing. The GCEV_DISCONNECTED event causes the
call state to change from the current call state to the Disconnected state. This event may be received
during call setup or after a connection is requested. In the Disconnected state, the user issues the
gc_DropCall( ) function to disconnect the call. The gc_DropCall( ) function is equivalent to set
hook ON. After the remote side is notified about the call being dropped, a GCEV_DROPCALL
event is generated causing the call state to change to the Idle state. In the Idle state, the
Table8. Asynchronous Call Termination Call State Transitions
State Previous/Next State Valid Call State
Transition Functions Call Transition Events
Disconnected
(GCEV_DISCONNECTED)
Not maskable
Previous: Offered, Accepted,
Connected, Dialing,
SendMoreInfo †, Proceeding,
Alerting, GetMoreInfo †,
CallRouting
Next:
GCEV_DROPCALL -> Idle
state
gc_DropCall() GCEV_DROPCALL
Idle (GCST_IDLE)
Not Maskable
Previous: Offered, Accepted,
Connected, Dialing,
SendMoreInfo †,Proceeding,
Alerting, GetMoreInfo
†,CallRouting, Disconnected
Next:
GCEV_RELEASECALL ->
Null
gc_ReleaseCallEx() GCEV_RELEASECALL
† Applies to E1, T1 and ISDN technologies only.