08.01.2013 Views

Voice API for HMP Library Reference - Dialogic

Voice API for HMP Library Reference - Dialogic

Voice API for HMP Library Reference - Dialogic

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ATDX_CHNUM( ) — return the channel number<br />

ATDX_CHNUM( )<br />

return the channel number<br />

Name: long ATDX_CHNUM(chdev)<br />

Inputs: int chdev valid channel device handle<br />

Returns: channel number if successful<br />

AT_FAILURE if error<br />

Includes: srllib.h<br />

dxxxlib.h<br />

Category: Extended Attribute<br />

Mode: synchronous<br />

� Description<br />

The ATDX_CHNUM( ) function returns the channel number associated with the channel device<br />

chdev. Channel numbering starts at 1.<br />

For example, use the channel as an index into an array of channel-specific in<strong>for</strong>mation.<br />

Parameter Description<br />

chdev specifies the valid channel device handle obtained when the channel was opened<br />

using dx_open( )<br />

� Cautions<br />

None.<br />

� Errors<br />

This function will fail and return AT_FAILURE if an invalid channel device handle is specified in<br />

chdev.<br />

� Example<br />

#include <br />

#include <br />

main()<br />

{<br />

int chdev;<br />

long chno;<br />

.<br />

.<br />

/* Open the channel device */<br />

if ((chdev = dx_open("dxxxB1C1", NULL)) == -1) {<br />

/* Process error */<br />

}<br />

/* Get Channel number */<br />

if((chno = ATDX_CHNUM(chdev)) == AT_FAILURE) {<br />

/* Process error */<br />

30 <strong>Voice</strong> <strong>API</strong> <strong>for</strong> <strong>HMP</strong> <strong>Library</strong> <strong>Reference</strong> — September 2004

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

Saved successfully!

Ooh no, something went wrong!