This module encapsulates the access for the serial port. It provides backends for Python running on Windows, OSX, Linux, BSD (possibly any POSIX compliant system) and IronPython. The module named "serial" automatically selects the appropriate backend.
This python script will detect modem events like DTMF Digits, Busy Tone, Silence etc from phone line using Raspberry Pi 3. Seems to do audio signal analysis to do this.
An open source device to connect a computer with an RS232 serial port to a telnet BBS. It does not use an analog phone line but internet through a wifi connection. Behaves like a Hayes dial-up modem, and it is designed and built for old computers. Plug it in, fire up a terminal emulator, and use the Hayes AT command set to tell it what to do. Can theoretically be used with any computer that has an RS-232 port.
Occasionally the designer sells them on eBay, but you can build your own.
Picocom is a tiny (< 40k) terminal emulator program which does little more than open and close serial ports and let you interact with whatever is on the othe end. They don't get much smaller than this. Perfect for debugging serial (or serial-over-USB) devices.