【正文】
rrect, these do not check if you put in a negative number. Hey if you don39。of . See for more on 39。 Date End Sub 如果關(guān)閉系統(tǒng),則關(guān)閉資源 Private Sub Form_Unload(Cancel As Integer) End Sub Private Sub OptLine_Click() 如果當(dāng)前狀態(tài)處于聯(lián)接狀態(tài)的情況下 If CallState = CALL_STATE_CONNECTED Then = False = False = False End If End Sub Private Sub optPlayDigitsFiles_Click() = End Sub 聲卡放音功能 Private Sub optSoundCard_Click() If Then If Dir() Then = True End If = True = True End If End Sub Private Sub Text1_Change() End Sub Private Sub txtTelNum_Change() = True End Sub 線路忙的功能的顯示 Private Sub v_Busy(ByVal LineIndex As Integer) showMsg CStr(LineIndex) + Busy = True = True End Sub 掛斷電話或忙音提示功能 Private Sub v_BusyOrShutdown(ByVal LineIndex As Long) showMsg CStr(LineIndex) + Busy or shutdown End Sub 來電顯示功能, callerid就是電話號碼 Private Sub V_CallerID(ByVal LineIndex As Integer, ByVal CallerID As String) showMsg CallerID: amp。 D:\ If Then 有錯誤信息不等于 0,則也就是說有錯誤產(chǎn)生 顯示錯誤信息 showMsg End If End Sub 發(fā)送傳送功能: Private Sub cmdSendFax_Click() 如果電話狀態(tài)是空閑則接受傳真 If CallState = CALL_STATE_IDLE Then , 39。 LineIndex 程序設(shè)定哪條線路將接通 If fInComing Then‘如果有哪條線路被接通,則顯示哪條線路被接通。然后將 各項功能 進(jìn)行各自單獨(dú)設(shè)計實(shí)驗(yàn) , 然后進(jìn)行組合 , 也就是我們經(jīng)常所說的模塊化的設(shè)計……組合各個模塊就變成了我們想要的軟件。需要實(shí)現(xiàn)一個像 168查詢臺類似的系統(tǒng),要能具有語音應(yīng)答、來電顯示、電話錄音與放音、收發(fā)傳真、轉(zhuǎn)人工服務(wù)等功能,同時具備向手機(jī)用戶發(fā)送短消息功能。但 是仍存在了一些不足,系統(tǒng)不能夠支持手機(jī)用戶發(fā)送短消息功能,同時也不支持遠(yuǎn)程電話語音應(yīng)答功能。然后將 各項功能 進(jìn)行各自單獨(dú)設(shè)計實(shí)驗(yàn) , 然后進(jìn)行組合 , 也就是我們經(jīng)常所說的 模塊化的設(shè)計……組合各個模塊就變成了我們想要的軟件。可能大家以為語音貓只能上上網(wǎng),其實(shí)錯了。我把本系統(tǒng)為成了以下幾個小模塊: ,7收發(fā)傳真 .下面就讓我詳細(xì)說明這些功能設(shè)計的步驟。將 CallState定義為 CALL_STATE類型的變量 Private Sub ckMonitorDigit_Click() 檢測按鍵單擊產(chǎn)生以下事件。after we appended all the wave file,the current position of the wave file are moved to the tail of the file,so we need to seek it to the head of the file 如果有錯誤產(chǎn)生,則顯示錯誤 如果有錯誤,則顯示錯誤信息 If Then showMsg 退出過程 Exit Sub End If End If Dim nEquip As Integer 定義設(shè)備 文件 If = True Then 0表示線路 nEquip = 0 1表示聲卡 ElseIf = True Then nEquip = 1 Else 2表示耳賣 nEquip = 2 End If 指定好播放設(shè)備后,我們開始向指定的設(shè)備開始播放文件 nEquip, False 如果有錯誤,則顯示錯誤信息 If Then showMsg 退出過程 Exit Sub End If 開始 /停止播放變?yōu)橥V? = 停止 開始 /停止錄音按鈕失效 = False 如果開始 /停止播放按鈕為停止,則開始播放 ElseIf = 停止 Then 39。dlgSetup contains a few trivial items (such as which voice card to use) and 39。Skip it Else Dim sTemp As String Dim lTemp As Long Dim lStart As Long 39。打開電腦,電腦會提示你找到新硬件,這時要 裝貓的驅(qū)動程序,這里需要特別說明的是,必須使用本語音貓自帶的驅(qū)動。 J:播放內(nèi)容:這里有兩種讓你選擇,一種是錄音文件,也是就是通過電話被錄下來的信息,另一種是放數(shù)字信息文件。 參考文獻(xiàn) 1.《計算機(jī)串口詳解》 濟(jì)南出版社 李生瑞 2.《 Visual basic 》 清華大學(xué)出版社 黃杰 3.《 CTI應(yīng)用與設(shè)計方法》 上海大學(xué)出版社 張小明 4.《 Visual basic 基礎(chǔ)》 交通大學(xué)出版社 陳華 5.《 MSCOMM控件詳解》 網(wǎng)上收集 無 give pleasureto our souls. But this is intolerable and blasphemous。m travel size for yourconvenience. If I was my real size, your cow here [ patting Khan on the nose]would die of fright. [Khan tries to bite Mushu] [pointing to the groundspeaking to Khan] D own Bessy. My powers are beyond your mortal imagination. For instance, [leaning in and looking at Mulan39。s entrance] Mushu [hiding in Mulan39。regonna work. [returning to Mulan] Heed my word, 39。掌握錨常見的 AT 命令等。檢測靜音是指當(dāng)電話雙方靜默多少秒時,系統(tǒng)會自動結(jié)束本次通話。t turn it on... Private Sub txtMsgLen_Change() If Not IsNumeric() Then 如果不是數(shù)字 ,則報警 Beep txtMsgLen = GetSetting(VBTAPI, Settings, MaxMessage, 60) End If End Sub Private Sub txtRTA_Change() If Not IsNumeric() Then Beep txtRTA = GetSetting(VBTAPI, Settings, NumRings, 5) End If End Sub Private Sub txtSecret_Change() If Not IsNumeric() Then Beep txtSecret = GetSetting(VBTAPI, Settings, Secret, 123) End If End Sub Private Sub txtTollSaver_Change() If Not IsNumeric() Then Beep txtTollSaver = GetSetting(VBTAPI, Settings, TollSaver, 3) End If End Sub 第 五 章:性能的測試與分析 測試實(shí)例的研究與選擇 到目前為止,系統(tǒng)的程序已基本設(shè)計完成,我們已經(jīng)進(jìn)入了 CTI系統(tǒng)的實(shí)施測試和維護(hù)階段。Once we have pleted initialization we loop through all the devices and put 39。 Digit End Sub 不連接事件 Private Sub V_Disconnected(ByVal LineIndex As Long) showMsg Disconnected 停止播放聲音文件 關(guān)閉聲音文件 掛斷電話 End Sub 傳真結(jié)果信息 ,產(chǎn)生相應(yīng)的信息 Private Sub v_FaxResult(ByVal LineIndex As Long, ByVal Result As Long, ByVal ResultDes As String) showMsg ResultDes End Sub 傳真的狀態(tài) ,顯示信息 Private Sub v_FaxStatus(ByVal LineIndex As Long, ByVal StatusID As Long, ByVal StatusDes As String) showMsg StatusDes End Sub 傳真信息是否收集到,如果有則產(chǎn)生提示信息 Private Sub v_FaxtoneDetected(ByVal LineIndex As Long) showMsg Fax tone detected! End Sub 收集并顯示按鍵信息功能 Private Sub V_GatherDigits(ByVal LineIndex As Integer, ByVal Digits As String, ByVal Result As Integer) If Result = 1 Then 完成按鍵信息并顯示出來 showMsg Finish Gathering Digits: amp?,F(xiàn)在將要開始播放語音 If Then 39。 CALL_STATE_IDLE 39。也就是說,語音貓只能看得懂 AT命令。實(shí)現(xiàn)和 168查詢臺類似的系統(tǒng),具有語音應(yīng)答功能。 首先要說明的是, CTI系統(tǒng)是一個熱門的方向,像 168,114等這些地方都是用專業(yè)的電話語音設(shè)備 語音卡來完成的,其成本投入非常高,這也就是目前大多數(shù)企業(yè)無法得以實(shí)施的主要因素。于是我試想用語音貓來 解決這個問題,經(jīng)過我進(jìn)行了大量的實(shí)驗(yàn)得出這樣的結(jié)論,在電話語音要求不太高的場合,我們可以用 30元左右的普通貓來代替語音卡,其實(shí)語音貓的功能是非常強(qiáng)大的,不僅能夠上網(wǎng),其實(shí)有好多功能我們不少人是不知道的。實(shí)現(xiàn)和 168查詢臺類似的系統(tǒng),具 有電話手工接聽功能、電話手工撥打功能、電話手工掛斷、語音應(yīng)答、來電顯示、電話錄音與放音、轉(zhuǎn)人工服務(wù)、收發(fā)傳真等功能,同時具備向手機(jī)用戶發(fā)送短消息功能,這樣會大減輕用戶及建設(shè)單位,讓他們能及時了解到他們想要的信息。什么叫 TAPI呢? TAPI是指與電話有關(guān)的 API 函數(shù),下面我就列出了所有的 TAPI函數(shù)??臻e CALL_STATE_DIALING 39。Play the file recorded 如果播放語音按鈕被選中,則開始播放記錄 打開 如果有錯誤產(chǎn)生,則顯示錯誤 If Then showMsg 退出過程 Exit Sub End If Else 播放一些數(shù)字 ,合成數(shù)字 39。 Digits ElseIf Result = 2 Then showMsg Finish Gathering Digits: amp。their names in the list box cmbDevice. When this form unloads the index of 39。實(shí)施階段是很重要的,因?yàn)槔碚撋现v的程序已經(jīng)完成,但是最重要的是能運(yùn)用到實(shí)際中去。比如 4000ms實(shí)際上就是 4秒鐘。使得我在 CTI 系統(tǒng)領(lǐng)域里更進(jìn)一步。cause if the army finds outthat you are a girl, the pe