Intel IP Gateway (Global Call) for Linux and Windows Network Hardware User Manual


 
IP Gateway (Global Call) Demo Guide for Linux and Windows
30
3. Otherwise, the application calls gc_GetUsrAttr( ) and then calls either
ipGetEvent( ) to process the IP event, or pstnGetEvent( ) to process the
PSTN event.
6.5.3. Handling Application Exit Events
Normal application exit events don’t enter the SRL. The main() function calls
PDLSetApplicationExitPath() before initialization. In Linux, this function sets
the signals (SIGINT, SIGTERM, SIGABRT) for making the appropriate exit
from the application. In Windows, this function enables the detection of
CTRL_CLOSE_EVENT (closing the window).
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.
6.6.1. Call Establishment from IP
This section describes what happens when a call is initiated from the IP network.