我想使用 56K 调制解调器来获取拨打家庭电话的电话号码.有没有办法用 C# 实现这一点?
I want to use 56K modem for getting telephone number of who calls the home phone. Is there a way to achieve this with C# ?
并非所有调制解调器都支持来电显示.对于那些这样做的人来说,不同制造商的实施方式各不相同.
Not all modems support caller ID. And for those that do, the implementation varies between manufacturers.
来电显示通过串行数据传递,因此您必须使用 TAPI 库(或 Windows 的超级终端来测试它).来电显示号码通常出现在第一次和第二次响铃之间.
There caller ID is passed through the serial data so you will have to use the TAPI library (or Windows' HyperTerminal to test it). The caller ID number typically appears between the first and the second ring.
您需要向调制解调器发出命令以激活来电显示.通常:
You will need to issue a command to the modem to activate caller ID. Typically:
AT#CID=1
(或AT+VCID=1
)
好的
检查您的调制解调器的文档.
Check the documentation for your modem.
当有来电时,调制解调器会收到一个呼叫字符串.通常:
When a call comes in, the modem will receive the a call string. Typically:
戒指
然后来电显示文本会进来.如果我没记错的话,它的形式是:
Then the caller ID text will come in. If I am remembering correctly, it will be in the form:
NMBR=XXXXXXXXXX
[我正在寻找参考资料.当我找到它时,我会发布一个链接]
更新:啊,找到了.查看此页面,了解各种调制解调器的命令和连接字符串:
UPDATE: Ah, found one. Check out this page for the commands and connection strings for for various modems:
如何测试调制解调器以支持来电显示
这篇关于如何在 C# 中获取来电显示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!