如何从电话线检测来电显示? [英] how detect caller id from phone line?

查看:306
本文介绍了如何从电话线检测来电显示?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能直接读取从调制解调器或电话线字节,而不会丢失任何信息?
如果使用的SerialPort 之后的振铃什么都没有发生在 receiveData的事件。

Is it possible to read bytes directly from modem or phone line without losing any info? If use SerialPort after ringing nothing happened on ReceiveData event.

我想直接从线读取来电显示信息。我的调制解调器不支持来电显示。

I want to read caller id info directly from line. My modem doesn't support Caller Id.

推荐答案

要检测呼叫者ID正确的方法是使用TAPI API。

The correct way to detect the caller ID is to use the TAPI API.

您可以找到一个C#TAPI库(称为ITAPI3)在这里。
http://www.julmar.com/tapi/

You can find a C# TAPI library (called ITAPI3) here. http://www.julmar.com/tapi/

检查4月04日就反对它挂在64位Windows建设方案的一些注意事项2006博客条目

Check the April 04, 2006 blog entry for some notes on building programs linked against it on 64-bit Windows.

和这里的示例代码:

TTAPI tapi = new TTAPI();

tapi.TE_CALLINFOCHANGE += (sender, e) =>
{
    if (e.Cause == CALLINFOCHANGE_CAUSE.CIC_CALLERID)
    {
        Console.WriteLine(e.Call.get_CallInfo(CALLINFO_STRING.CIS_CALLERIDNUMBER));
        Console.WriteLine(e.Call.get_CallInfo(CALLINFO_STRING.CIS_CALLERIDNAME));
    }
}

tapi.Initialize();

// ...
// Keep the TAPI object in memory so it can listen for events
// ...

tapi.ShutDown();

这篇关于如何从电话线检测来电显示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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