CTI_dx_dial
dx_dial( )
Quay mot chuoi ky tu ASCII tren mo kenh dang mo va roi. Co Call Analysis de cung cap thong tin cuoc goi.
int dx_dial(chdev,dialstrp,capp,mode)
Chdev: Quy dinh cac kenh thiet bi hop le khi su dung ham dx_open
dialstrp: Con tro tro toi chuoi quay so ASCII
capp: tro toi cau truc tham so phan tich cuoc goi
Mode: Chon che do hoat dong va co Call Ananlysis
* Phan tich cuoc goi voi thong so do nguoi dung thiet lap
#include <stdio.h>
#include <srllib.h>
#include <dxxxlib.h>
#include <windows.h>
main( )
{
int cares, chdev;
DX_CAP capp;
.
.
/* Mo kenh su dung ham dx_open( ). Lay mieu ta thiet bi trong chdev*/
if ((chdev = dx_open("dxxxB1C1",NULL)) == -1) {
/* process error */
}
/* take the phone off-hook */
if ((dx_sethook(chdev,DX_OFFHOOK,EV_SYNC)) == -1) {
/* process error */
}
/* Xoa cau truc DX_CAP */
dx_clrcap(&capp);
/* Thiet lap DX_CAP cho call analysis*/.
* Cho phep 3 hoi chuong truoc khi co tra loi*/
capp.ca_nbrdna = 3;
/* Thuc hien quay so ngoai. */
if ((cares = dx_dial(chdev,"5551212",&capp,DX_CALLP|EV_SYNC)) == -1) {
/* perform error routine */
}
Bạn đang đọc truyện trên: Truyen247.Pro