Справочник Пользователя для Dialogic 05-0867-005
responds to an incoming call request
cc_AcceptCall( )
51
•
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.
firmware. Typically, this event is triggered by an incorrect function call
during the call.
!
!
!
!
Cautions
None
!
!
!
!
Example
#include <windows.h>
/* For Windows applications only */
#include <stdio.h>
#include <errno.h>
#include "srllib.h"
#include "dtilib.h"
#include "cclib.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);
exit(1);
}
printf("Waiting for call\n");
if ( cc_WaitCall(devhdl, &crn, NULL, -1, EV_SYNC) < 0 )
if ( cc_WaitCall(devhdl, &crn, NULL, -1, EV_SYNC) < 0 )
procdevfail(devhdl);
printf("Accepting call\n");
if ( cc_AcceptCall(crn, 0, EV_SYNC) < 0 )
if ( cc_AcceptCall(crn, 0, EV_SYNC) < 0 )
callfail(crn);
if ( cc_AnswerCall(crn, 0, EV_SYNC) < 0 )
callfail(crn);
.
.
.
.
.
.
.
.
.
/* Drop the call */
if ( cc_DropCall(crn, NORMAL_CLEARING, EV_SYNC) < 0 )
if ( cc_DropCall(crn, NORMAL_CLEARING, EV_SYNC) < 0 )
callfail(crn);
if ( cc_ReleaseCall(crn) < 0 )
callfail(crn);
if ( cc_Close( devhdl ) < 0 )
printf("Error closing device, errno = %d\n", errno);
}