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# ?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
Not all modems support caller ID. And for those that do, the implementation varies between manufacturers.
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:
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:
[I am looking for a reference. I will post a link when I can find it]
UPDATE: Ah, found one. Check out this page for the commands and connection strings for for various modems:
How to Test a Modem for Caller ID Support
serialPort1.Open(); serialPort1.WriteLine("AT#cid=1" + System.Environment.NewLine); // where serialPort1 is the serial control for more detail see following link : http://www.itworld2.com/frmsCsharp.aspx
It is possible, but there are some things about it you should note: