
Name: |
int grtRespondEndCall (GRT_EVENT *event) | |
Inputs: |
GRT_EVENT *event |
|
Outputs: |
None |
|
Returns: |
GRT_SUCCESS |
|
|
GRT_ANOTHER_THREAD |
|
|
GRT_RESPONSE_FAIL |
|
GRT_CONTROL_BUSY |
| |
GRT_UNLOCK_FAIL |
| |
GRT_LOCK_FAILED |
| |
GRT_NOT_INIT |
| |
GFD_BROKEN_PIPE |
| |
GFD_INVALID_HANDLE |
| |
Includes: |
genra.h |
|
The grtRespondEndCall( ) function responds to an event with an end call message. This function responds to the given event with a GRT_END_CALL response message.
#include "genra.h"
GRT_EVENT event;
int status, chan = 1;
int grtAttributes = GRT_RECV_DCS_ENABLE | GRT_RECV_DCS_RESPONSE_ENABLE;
/* initialize GRT pipes interface for fax channel 1 */
status = grtInit(chan, chan, grtAttributes);
if (status != GRT_SUCCESS)
{
fprintf(stderr, "[%2d] grtInit failed, %d\n", chan, status);
return -1;
}
/* submit queue record */
...
/* block for any event */
while ((status = grtGetEvent(chan, chan, &event))
== GRT_NO_EVENT)
Sleep(1000L);
if (event.event_type == GRT_RECV_DCS)
{
/* respond to event (disconnect call after receiving DCS) */
if (status = grtRespondEndCall(&event))
{
fprintf(stderr, "[%2d] grtRespondEndCall"
" failed, %d", event.chan, status);
return -1;
}
}
Click here to contact Dialogic Customer Engineering
Copyright 2000, Dialogic Corporation