08.01.2013 Views

Dialogic® Global Call API Library Reference

Dialogic® Global Call API Library Reference

Dialogic® Global Call API Library Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

gc_ReqService( ) — request a service from a remote device<br />

Example<br />

#include "gclib.h"<br />

void main( )<br />

{<br />

LINEDEV devh;<br />

unsigned long serviceID;<br />

GC_PARM_BLKP reqdatap = NULL;<br />

GC_INFO gc_error_info; /* <strong>Global</strong><strong>Call</strong> error information data */<br />

}<br />

See Also<br />

/* Following code assumes that gc_OpenEx has been done with handle = devh */<br />

/* Set up GC_PARM_BLK */<br />

if ( gc_util_insert_parm_val( &reqdatap, GCSET_SERVREQ, PARM_REQTYPE,<br />

sizeof( int ), 0 ) != GC_SUCCESS ) {<br />

/* Process error */<br />

}<br />

if ( gc_util_insert_parm_val( &reqdatap, GCSET_SERVREQ, PARM_ACK,<br />

sizeof( short ), GC_NACK) != GC_SUCCESS ) {<br />

/* Process error */<br />

}<br />

/* Insert any other technology-dependent parameters */<br />

if ( gc_ReqService( GCTGT_GCLIB_CHAN, devh, &serviceID, reqdatap, NULL,<br />

EV_ASYNC ) != GC_SUCCESS ) {<br />

/* Process error */<br />

gc_ErrorInfo( &gc_error_info );<br />

printf ("Error: gc_ReqService() on device handle: 0x%lx, GC ErrorValue: 0x%hx - %s,<br />

CCLibID: %i - %s, CC ErrorValue: 0x%lx - %s\n",<br />

devh, gc_error_info.gcValue, gc_error_info.gcMsg,<br />

gc_error_info.ccLibId, gc_error_info.ccLibName,<br />

gc_error_info.ccValue, gc_error_info.ccMsg);<br />

}<br />

/* Wait for GCEV_SERVRESP and process */<br />

/* Delete GC_PARM_BLK */<br />

gc_util_delete_parm_blk( reqdatap );<br />

gc_RespService( )<br />

268 Dialogic ® <strong>Global</strong> <strong>Call</strong> <strong>API</strong> <strong>Library</strong> <strong>Reference</strong> — January 2008<br />

Dialogic Corporation

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!