Previous Page Table Of ContentsHome IndexNext Page


6.6.  Demo State Machine

The application waits for a GCEV_UNBLOCKED event in the GATE_INIT state. Upon receiving this event, the application calls ag_getxmitslot( ) for an analog PSTN board or dt_getxmitslot( ) for a digital PSTN board to get the transmit time slot (Xmitslot) for the PSTN device and saves it in the session.PSTNParams structure. The application then calls gc_GetXmitSlot(VoiceH) to get the transmit time slot (Xmitslot) for the IP device and saves it in the session.IPParams structure.

The application then calls gc_WaitCall( ) to set the conditions for processing an inbound call.

If the application receives GCEV_TASKFAIL, GCEV_BLOCKED, or GCEV_OPENEX_FAIL, it calls endApplication( ) to gracefully shut down the application.

If the application receives GCEV_OPENEX, it does nothing to avoid causing an error.

The state transitions to GATE_NULL.

This section describes what happens when a call is initiated from the IP network.


Figure 5.  Call Establishment from IP


Figure

  1. In GATE_NULL, the application receives GCEV_OFFERED from the IP side.
  1. In IP_OFFERED, the application waits for GCEV_EXTENSION which contains the coder and telephone number information.
  1. In IP_CONNECTED, when the application receives GCEV_CONNECTED from the PSTN side, the application calls pstnListen( ), which in turn calls ag_Listen( ) or dt_Listen( ) (ag for analog; dt for digital) to tell the PSTN line device to listen to the IP time slot

This section describes what happens when a call is initiated from the PSTN network.


Figure 6.  Call Establishment from PSTN


Figure

  1. In GATE_NULL, when the application receives GCEV_OFFERED from the PSTN side, the application calls gc_AcceptCall( ) for the PSTN and gc_MakeCall( ) for the IP side.
  1. In PSTN_OFFERED the application waits for GCEV_CONNECTED from the IP side.
  1. In IP_CONNECTED, when the application receives GCEV_ANSWERED from the PSTN the state transitions to GATE_CONNECTED.
  1. When either side (PSTN or IP) sends a GCEV_DISCONNECTED event in any state except for IP_OFFERED, the application calls gc_Unlisten( ) for the IP side and ag_Unlisten( ) or dt_Unlisten( ) for the PSTN side. The application also calls gc_DropCall( ) for both sides of the call to disconnect the call.
  1. When the application receives GCEV_DROPCALL from both sides the application calls gc_Extension( ) to get RTCP information for the call.
  1. When the application receives a GCEV_RELEASECALL event it sends IPTResetSession( ) and the call state transitions to GATE_NULL.

If a GCEV_DISCONNECTED event is received from the IP side when the state is IP_OFFERED:

  1. The application calls gc_DropCall( ) for the IP side and the state transitions to IP_DROP.
  2. When the application receives GCEV_DROPCALL from the IP side, it calls gc_Extension( ) to get the RTCP information.

Glare conditions occur when a call is being initiated from both sides at the same time. If such a condition is discovered, the state transitions directly to GATE_DROP and proceeds with call teardown.


Previous PageTable Of ContentsTop Of PageIndexNext Page

Click here to contact Telecom Support Resources

Copyright 2002, Intel Corporation
All rights reserved
This page generated October, 2002