I want to if know is there any way to call to a number and send some digits to it after picking up the phone using a dial-up modem in Python?
I already did a Google search and found the PyModem library, but it is written for Linux and for GSM modems, while I want its counterpart for Windows and for dial-up modems.
I also found some related topics here and here that containsome piece of code for working with modems using the serial
library, but I don't understand why a modem is recognized as a serial device! (Maybe in the past, dial-up modems used COM port to communicate with computers, but my modem is connected to the main board using a PCI slot.)
So, How can I communicate with a dial-up modem (d-link 562is, for example) using python in windows?
If you look at the description of the d-link 562IS, you'll see mentioned that it is a software modem. So most if not all of the functionality is in the driver, not in the hardware.
The Linux driver seems to emulate a serial port because that is the standard way to talk to modems on UNIX. Apparently the windows driver doesn't.
Looking through the
dll
files in the windows driver, there is aModemOpen
function defined inMdmXSdk.dll
. You could call that using ctypes.Or you could try using the telephony api.