I want to create a phone book, this phone book must show the number of those how call me so I can get the caller number or ID by my software
I have written the software that get the persons number and call them so I am sure my modem supports it.
Now i want to write software in C# to get the phone number of those how are calling my home phone and show it in a text box. Just the number and other things are not matter.
How can I get the caller ID in c#?
解决方案
Are you talking about a mobile phone, a VoIP deployment or your home phone?
If it''s your home phone, not likely going to happen. You could, in theory, write something at the modem level, but that''s a big task for someone just starting out.
For mobile phone, again, not likely going to happen. The phone owns the call chain and I don''t think there''s an API to access call history in WP7.
For VoIP, you''ll need to start by finding a .Net library for the VoIP system in question. At that point you can evaluate events from the virtual call manager or read CDR logs.
Cheers.
Great, so if you''ve worked at that level of coding before, we just need to know where it is you''re having trouble.
Here''s a number of articles here on CP[^] based on a serial port modem search.
And here''s a way to test for caller id support on your modem, along with the sample result string: https://secure.mtnsys.com/Pages/howto/htmdmtst.htm[^].
It says that "AT#CID=1 or AT+VCID=1" are the strings that most modems use to activate call id on the unit itself. You''ll need to check your modem documentation if that''s not correct in your case.
Cheers.