Reputation: 1
I want to hang up after modem finish dialing a phone number. I can track when modem start dial and when it disconnect. But I can't track dial finished. I use TAPI for it. I tried C# and C++. But I don't know how to manage it.
Upvotes: 0
Views: 461
Reputation: 86535
When a modem is dialing, it's normally just sitting there waiting for the other end to answer. TAPI can tell you when the dialing starts (because it sends the command to dial) and when the hangup occurs (because the modem reports "NO CARRIER"), and it can tell you when the other modem answers (because then the modem reports that it's connected), but the modem doesn't say when it's done dialing. (So-called "winmodems" might be able to do this, as they're run more by the driver than the hardware in the modem. But it's not something you can really rely on.)
This means that the only way you can really know is to have a modem that can feed the sound on the phone line back in through a mic or line-in or something (which also isn't exactly universal on a modem), and having some software listen for the touch tones and report when it hears a pause.
Upvotes: 2