在设计tpi32项目中调用我应该如何以及何时检测音调 [英] in designing tpi32 projects for calling how and when should i detect tones

查看:124
本文介绍了在设计tpi32项目中调用我应该如何以及何时检测音调的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用tapi3lib开发项目
现在,对于通话部分,我想检测音调以找出
如果线路繁忙或应答线路
当我如何使用Tapi来检测此项目中的音调时
感谢

i''m developing a project with tapi3lib
now for the part of calling i want to detect tones to find out
if the line is busy or the line is answered
when an how i can use tapi detect tones in this project
thanks

推荐答案

lineMonitorTones 函数(
The lineMonitorTones function (http://msdn.microsoft.com/en-us/library/windows/desktop/ms735998%28v=vs.85%29.aspx) enables and disables the detection of inband tones on the call. Each time a specified tone is detected, a message is sent to the application.

This function succeeds if tone monitoring has been correctly initiated, not when tone monitoring has terminated. Tone monitoring remains in effect until it is explicitly disabled by calling lineMonitorTones with another tone list (or NULL), until the call transitions to idle, or when the application deallocates its call handle for the call.

Although this function can be invoked in any call state, tones can typically only be detected while the call is in the connected state. Tone detection typically requires computational resources. Depending on the service provider and other activities that compete for such resources, the number of tones that can be detected can vary over time. Also, an equivalent amount of resources can be consumed for monitoring a single triple frequency tone versus three single frequency tones. If resources are overcommitted, the LINEERR_RESOURCEUNAVAIL error is returned.

The lineMonitorTones function is also used to detect silence. Silence is specified as a tone with a frequency of zero.

Monitoring of tones on a conference call applies only to the hConfCall, not to the individual participating calls

If the LINEERR_INVALPOINTER error value is returned, the specified lpToneList parameter is invalid or the value specified by the dwNumEntries parameter is too large.


这篇关于在设计tpi32项目中调用我应该如何以及何时检测音调的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆