User`s guide

Dialogic
®
System Release 6.0 PCI for Windows
®
Release Update, Rev 62 — January 30, 2008 231
Dialogic Corporation
Updated example code is provided for this function as follows.
#include <stdio.h>
#include <srllib.h>
#include <dxxxlib.h>
main()
{
DX_CAP cap_s;
int ddd, car;
char *chnam, *dialstrg;
long tone_id
;
chnam = "dxxxB1C1";
dialstrg = "L1234";
/*
* Open channel
*/
if ((ddd = dx_open( chnam, NULL )) == -1 ) {
/* handle error */
}
/*
* Dial
*/
printf("Dialing %s\n", dialstrg );
car = dx_dial(ddd,dialstrg,(DX_CAP *)&cap_s,DX_CALLP|EV_SYNC);
if (car == -1) {
/* handle error */
}
switch( car ) {
case CR_NODIALTONE:
switch( ATDX_DTNFAIL(ddd) ) {
case 'L':
printf(" Unable to get Local dial tone\n");
break;
case 'I':
printf(" Unable to get International dial tone\n");
break;
case 'X':
printf(" Unable to get special eXtra dial tone\n");
break;
}
break;
case CR_BUSY:
printf(" %s engaged - %s detected\n", dialstrg,
(
ATDX_CRTNID(ddd)
== TID_BUSY1 ? "Busy 1" : "Busy 2") );
break;
case CR_CNCT:
printf(" Successful connection to %s\n", dialstrg );
break;
case CR_CEPT:
printf(" Special tone received at %s\n", dialstrg );
tone_id =
ATDX_CRTNID(ddd
); //ddd is handle that is returned by
dx_open()
switch (tone_id) {