2

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?

  • Regarding COM ports, a lot of device drivers emulate a COM port, even if they're physically connected some other way, because it's a simple interface for the client software to talk to. – IMSoP May 24 '15 at 11:50
  • @IMSoP In such that case, shouldn't those appear in the Device Management windows as a COM device? –  May 24 '15 at 12:00

1 Answers1

0

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 a ModemOpen function defined in MdmXSdk.dll. You could call that using ctypes.

Or you could try using the telephony api.

Roland Smith
  • 42,427
  • 3
  • 64
  • 94