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_ReqANI( ) — request the remote side to return ANI<br />

/*<br />

* For this example, let's assume that the mode = EV_SYNC and<br />

* req_type = ISDN_CPN_PREF (<strong>Call</strong>ing Party Number Preferred).<br />

* req_type can be one of following:<br />

* ISDN_BN_PREF (Billing Number preferred)<br />

* ISDN_CPN (<strong>Call</strong>ing Party Number only)<br />

* ISDN_BN (Billing Number only)<br />

* ISDN_CA_TSC (Special Use)<br />

*/<br />

int req_crn(CRN crn, char *ani_buf, int req_type, unsigned long mode)<br />

{<br />

LINEDEV ldev; /* Line device */<br />

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

}<br />

if(gc_CRN2LineDev(crn, &ldev) != GC_SUCCESS) {<br />

/* process error return as shown */<br />

gc_ErrorInfo( &gc_error_info );<br />

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

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

crn, 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 />

return (gc_error_info.gcValue);<br />

}<br />

if(gc_ReqANI(crn, ani_buf, req_type, mode) != GC_SUCCESS) {<br />

/* process error return as shown */<br />

gc_ErrorInfo( &gc_error_info );<br />

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

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

ldev, 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 />

return (gc_error_info.gcValue);<br />

}<br />

return(0);<br />

See Also<br />

gc_Get<strong>Call</strong>Info( )<br />

gc_GetANI( ) (deprecated)<br />

gc_Wait<strong>Call</strong>( )<br />

260 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!