Search code examples
voicemodemat-command

Navigate touch-tone menus via modem


I have a system that I need to programmatically interface with that requires a set of numbers to be dialed after the phone line is picked up, like a standard automated phone answering system. For instance, dial the number 123-456-7890, wait for the line to be answered, wait 15 seconds for the voice prompt, dial 1234#, hang up.

The question is, can I and how do I do that through a modem? I know how to dial a number through a modem, it's simply ATDT[phone number], but that will attempt to initiate a data connection which will not allow touch-tone number entry. Would a voice modem provide the necessary capability? If so, could anyone provide example commands to accomplish this?


Solution

  • See Hayes Modem Reference for a list of commands. To send DTMF tones on the line, you seem to have to use the ATD command. The comma (,) operator will pause the dialing for 2 seconds. This duration can also be customized by setting the S7 register.

    ATDT1234567890,,,,,,,1234#,;
    ATH
    

    This dials the number, waits 16 seconds, dials the code, waits another 2 seconds, and hangs up.

    ATS7=15
    ATDT1234567890,1234#;
    ATH
    

    This changes the comma delay, dials the number, waits 15 seconds, dials the code, and hangs up.

    The S7 register mentioned above, could also be S8. The manual and other sources doesn't want to agree.