问题
I want to create a simple code that detects the caller ID only of an incoming call. Can I use any modem, and implement the right code? Or do I have to buy a modem that supports caller id? How can I tell if a modem supports caller id? Im asking this question because I have tried so many times to make this work, and I never found any script that worked, then I found a post that said a caller id modem is needed.
Thank you in advance
回答1:
You should be able to use the AT#CID=1 command on most modems. Otherwise you may need to contact the manufacturer of the modem for a list of supported commands. Winmodems function differently and will depend on what the driver supports.
How you implement this will depend on what operating system you are using. The following web page has some good information regarding setting up caller ID.
http://www.troi.com/support/callerid.html
As for scripting, if your using Linux see "Linux serial port listener and interpreter?"
For a simple script I would probably use Perl and install a module to simplify serial port access. Most programming languages provide some amount of support for reading from and writing to serial ports so you probably can use whatever language your most comfortable with.
[edit] For vb.net see http://code.msdn.microsoft.com/windowsdesktop/SerialPort-Sample-in-VBNET-fb040fb2
回答2:
It's better if you just purchase a Caller ID device. It costs around $20-$40 max. I am currently using Caller ID devices for my EPOS Systems.
Model Name: ARTECH Model Number: AD101
It does come with SDK.
来源:https://stackoverflow.com/questions/20138819/using-modem-for-caller-id