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_Listen( ) — connect a channel to a network CT Bus time slot<br />

}<br />

/* Find info for this time slot, specified by 'port_num' */<br />

/* (assumes port_num is valid) */<br />

pline = port + port_num;<br />

/* Fill in the CTbus time slot information */<br />

sc_tsinfo.sc_numts = 1;<br />

sc_tsinfo.sc_tsarrayp = &scts;<br />

/* Get CTbus time slot connected to transmit of voice<br />

channel on board …1 */<br />

if (dx_getxmitslot(pline->chdev, &sc_tsinfo) == -1) {<br />

printf("Error message = %s", ATDV_ERRMSGP(pline->chdev));<br />

exit(1);<br />

}<br />

/* Connect the receive of the digital channel 1 on board 1 to CTBus<br />

time slot of voice channel 1 */<br />

if (gc_Listen(pline->ldev, &sc_tsinfo, EV_SYNC) == -1) {<br />

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

gc_ErrorInfo( &gc_error_info );<br />

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

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

pline->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_GetCTInfo( )<br />

gc_GetXmitSlot( )<br />

gc_UnListen( )<br />

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