
Name: |
int grtProcessDialEvent (GRT_EVENT *event, char *dial_string) | |
Inputs: |
GRT_EVENT *event |
|
|
char *dial_string |
|
Outputs: |
char *dial_string |
|
Returns: |
GRT_SUCCESS |
|
|
GRT_UNKNOWN_EVENT |
|
Includes: |
genra.h |
|
The grtProcessDialEvent( ) function processes a dial event.
This function is a high-level function that provides the data that is associated with a GRT_DIAL event to the user. The data will be a 20-character string representing the dialing string. The function returns GRT_SUCCESS if the event is a GRT_DIAL event and dial_string points to a valid dialing string. If the event is not GRT_DIAL, then the dial_string points to invalid data.
#include "genra.h"
GRT_EVENT event;
char dialstring[20] = "\0";
int status, chan = 1;
/* block for any event */
while ((status = grtGetEvent(chan, chan, &event)) == GRT_NO_EVENT)
Sleep(1000L);
if (event.event_type == GRT_DIAL)
{
if (status = grtProcessDialEvent(&event, dialstring))
{
fprintf(stderr, "[%2d] grtProcessDialEvent"
" failed: %d\n", event.chan, status);
return -1;
}
printf("[%2d] completed dialing to \"%s\"", event.chan, dialstring);
}
Click here to contact Dialogic Customer Engineering
Copyright 2000, Dialogic Corporation