Dialogic 05-0867-005 Table Top Game User Manual


 
cc_SetChanState( ) change the maintenance state of a specified B channel
222
CCEV_TASKFAIL - indicates that a request/message was rejected by the
firmware. Typically, this event is triggered by an incorrect function call
during the call.
!
! !
!
Cautions
The cc_SetChanState( ) function should only be invoked in the Null state.
The Null state occurs immediately after a call to either the cc_Open( ) or
cc_ReleaseCall( ) function.
The cc_SetChanState( ) function affects only the link between the calling
process and the device. Other processes and devices are not affected.
cc_SetChanState( ) is not supported for E-1 ISDN or NTT PRI protocols, or
for any BRI protocols.
!
! !
!
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;
if ( cc_Open(&devhdl, devname, 0)<0)
{
printf(Error opening device: errno = %d\n, errno);
exit(1);
}
/*
* using cc_SetChanState(devhdl, IN_SERVICE,
* EV_SYNC) to set B channel to in service state.
* Recommended for all supported protocols.
*/
if ( cc_SetChanState(devhdl, IN_SERVICE, EV_SYNC) <0)
procdevfail(devhdl);
if ( cc_WaitCall(devhdl, &crn, NULL, -1, EV_SYNC)<0)
procdevfail(devhdl);
if ( cc_AnswerCall(crn, 0, EV_SYNC)<0)
callfail(crn);
.
.
.
.
.