Dialogic 05-0867-005 Table Top Game User Manual


 
cc_CallState( ) retrieves the state of a call
64
Parameter Description
CCST_NULL - The call was released; the call is in the Null
state.
CCST_OFFERED - An inbound call was received; the call is
in the Offered state.
!
! !
!
Cautions
Due to normal process latency time, the state value acquired may not reflect the
current state of the call. The state retrieved will be associated with the last event
received by the application.
!
! !
!
Example
#include <windows.h> /* For Windows applications only */
#include <stdio.h>
#include <errno.h>
#include "srllib.h"
#include "dtilib.h"
#include "cclib.h"
void main()
{
LINEDEV devhdl = 0;
CRN crn = 0;
char *devname = "dtiB1T1";
int state;
if ( cc_Open( &devhdl, devname,0)<0)
{
printf("Error opening device: errno = %d\n", errno);
exit(1);
}
printf("Waiting for call\n");
if ( cc_WaitCall(devhdl, &crn, NULL, -1, EV_SYNC)<0)
procdevfail(devhdl);
if ( cc_AnswerCall(crn, 0, EV_SYNC)<0)
{
callfail(crn);
/*
* using cc_CallState(crn, &state) to retrieve the current
* call state from the firmware.
*/
if ( cc_CallState(crn,&state) <0)
callfail(crn);
if(state == CCST_DISCONNECTED)