TAPI问题,怎么判断对方是副摘机,或者是忙音,或者是关机?

hbhuyang 2005-02-21 09:26:48
TAPI问题,怎么判断对方是副摘机,或者是忙音,或者是关机?请各位指点一下。
...全文
209 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
零壹智慧 2005-08-04
  • 打赏
  • 举报
回复
这个简单,我作过,并且很准确,但是不是免费的, 感趣,与我联系
win_tapi@126.com
bluesen 2005-07-18
  • 打赏
  • 举报
回复
如果是用Modem设备,使用模拟电话线路,试图准确判断外拨结果,的确是困难的。好一点的能够判断出忙音。
有些软件的想法有特点,只要拨号完毕就认为接通,然后开始录音,根据录下的信号音判断什么信号。当然在编程上比较复杂。

其实很多应用都是通知、催缴、广告一类,未必要求那么高,多播放几次语音就可以了。
也可以要求对方按键确认,超时后就挂断,下次再来。

专业的模拟语音卡通常都可以设置信号音参数,相对准确,但对于对方是手机的情况,如彩铃之类,也不是那么准确。
最准确的是采用数字线路接口的数字语音卡,通常使用ISDN或7号信令,但价格较高。

采用微软的TAPI3,编程比较烦琐。可以下载我的免费平台,那就只要写几行类似C语言的脚本就可以了:
http://www.bluespace.com.cn/koodoo/download_tapi3.htm

我的网站上有些资料,可以看看。
samp_miao 2005-07-18
  • 打赏
  • 举报
回复
LONG lineOpen(
HLINEAPP hLineApp,
DWORD dwDeviceID,
LPHLINE lphLine,
DWORD dwAPIVersion,
DWORD dwExtVersion,
DWORD dwCallbackInstance,
DWORD dwPrivileges,
DWORD dwMediaModes,
LPLINECALLPARAMS const lpCallParams
);

Return Values
Zero indicates success. A negative error number indicates that an error occurred. The following table shows the return values for this function.

Value Description
LINEERR_ALLOCATED The line cannot be opened due to a persistent condition.
LINEERR_BADDEVICEID The device id provided is incorrect.
LINEERR_INCOMPATIBLEAPIVERSION The API version is incompatible
LINEERR_INCOMPATIBLEEXTVERSION The extension version is incompatible.
LINEERR_INVALAPPHANDLE The app handle is invalid.
LINEERR_INVALMEDIAMODE The line device is opened with owner privilege and an extension media mode is not registered.
LINEERR_INVALPOINTER The pointer is invalid.
LINEERR_INVALPRIVSELECT The privilege selected is invalid.
LINEERR_LINEMAPPERFAILED
LINEERR_NODEVICE The device was not found.
LINEERR_NODRIVER The driver was not found.
LINEERR_NOMEM Not enough memory is available for this operation.
LINEERR_OPERATIONFAILED The operation failed.
LINEERR_OPERATIONUNAVAIL The operation is unavailable.
LINEERR_REINIT The application attempted to initialize TAPI twice.
LINEERR_RESOURCEUNAVAIL The line cannot be opened due to a dynamic resource overcommitment
LINEERR_STRUCTURETOOSMALL The structure is too small.
LINEERR_UNINITIALIZED A parameter is uninitialized.




看SDK 啊。。。。。。
samp_miao 2005-07-18
  • 打赏
  • 举报
回复
LONG lineMakeCall(
HLINE hLine,
LPHCALL lphCall,
LPCWSTR lpszDestAddress,
DWORD dwCountryCode,
LPLINECALLPARAMS const lpCallParams
);
Return Values
A positive request identifier indicates that the function is completed asynchronously. A negative error number indicates that an error has occurred. The dwParam2 parameter of the corresponding LINE_REPLY message is zero if the function succeeds, or it is a negative error number if an error occurs. The following table shows the return values for this function.

Value Description
LINEERR_ADDRESSBLOCKED The address is blocked
LINEERR_BEARERMODEUNAVAIL The bearer mode member in LINECALLPARAMS is invalid, the bearer mode specified in LINECALLPARAMS is not available, or the call's bearer mode cannot be changed to the specified bearer mode.
LINEERR_CALLUNAVAIL The call is unavailable.
LINEERR_DIALBILLING The dialable address parameter contains dialing control characters that are not processed by the service provider.
LINEERR_DIALDIALTONE The dialable address parameter contains dialing control characters that are not processed by the service provider.
LINEERR_DIALPROMPT The dialable address parameter contains dialing control characters that are not processed by the service provider.
LINEERR_DIALQUIET The dialable address parameter contains dialing control characters that are not processed by the service provider.
LINEERR_INUSE The line is in use.
LINEERR_INVALADDRESS The address is invalid.
LINEERR_INVALADDRESSID The address id is invalid.
LINEERR_INVALADDRESSMODE The address mode is invalid.
LINEERR_INVALBEARERMODE The bearer mode is invalid.
LINEERR_INVALCALLPARAMS Invalid parameters used for this call.
LINEERR_INVALCOUNTRYCODE The country/region code provided was invalid.
LINEERR_INVALLINEHANDLE The line handle is invalid.
LINEERR_INVALLINESTATE The line is not in a state such that this operation can be performed.
LINEERR_INVALMEDIAMODE The media mode is invalid.
LINEERR_INVALPARAM The parameters are invalid.
LINEERR_INVALPOINTER The pointer is invalid.
LINEERR_INVALRATE The rate is invalid.
LINEERR_NOMEM The operation requires more memory than is currently available.
LINEERR_OPERATIONFAILED The operation failed.
LINEERR_OPERATIONUNAVAIL The operation is unavailable.
LINEERR_RATEUNAVAIL The rate is unavailable.
LINEERR_RESOURCEUNAVAIL The resource is unavailable.
LINEERR_STRUCTURETOOSMALL The structure is too small.
LINEERR_UNINITIALIZED The parameter is uninitialized.
LINEERR_USERUSERINFOTOOBIG The users information is too large.
hbhuyang 2005-02-21
  • 打赏
  • 举报
回复
lineopen(),linemakecall( )的返回值是什么?
auly403 2005-02-21
  • 打赏
  • 举报
回复
up

16,472

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Web++
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧