Intel 05-1832-002 IP Phone User Manual


 
194 Voice API for Windows Operating Systems Library Reference — November 2003
dx_dial( ) — dial an ASCIIZ string
Clear the DX_CAP structure using dx_clrcap( ) before the structure is used as an argument in
a dx_dial( ) function call. This will prevent parameters from being set unintentionally.
!
!!
! Errors
If the function returns -1, use the Standard Runtime Library (SRL) Standard Attribute function
ATDV_LASTERR( ) to obtain the error code or use ATDV_ERRMSGP( ) to obtain a descriptive
error message. One of the following error codes may be returned:
EDX_BADPARM
Invalid parameter
EDX_BUSY
Channel is busy
EDX_SYSTEM
Error from operating system; use dx_fileerrno( ) to obtain error value
!
!!
! Example
This example demonstrates how to use dx_dial( ) and call progress analysis (synchronous mode)
on Springware boards. On DM3 boards, dx_dial( ) supports call progress analysis directly; you do
not use dx_initcallp( ) to initialize call progress analysis.
#include <stdio.h>
#include <srllib.h>
#include <dxxxlib.h>
#include <windows.h>
main()
{
DX_CAP cap_s;
int ddd, car;
char *chnam, *dialstrg;
chnam = "dxxxB1C1";
dialstrg = "L1234";
/*
* Open channel
*/
if ((ddd = dx_open( chnam, NULL )) == -1 ) {
/* handle error */
}
/*
* Delete any previous tones
*/
if ( dx_deltones(ddd) < 0 ) {
/* handle error */
}
/*
* Change call progress analysis default local dial tone
*/
if (dx_chgfreq( TID_DIAL_LCL, 425, 150, 0, 0 ) < 0) {
/* handle error */
}