For this task, you cannot use the DialNumber Template Procedure, since that routine expects to connect with a remote modem.
Please see the Phone Dialer Application, available in the Software Library, for an example program that demonstrates the techniques of working with Voice Modems.
Depending upon the capabilities of the Modem that is doing the Dialing, you have several options. Basically, you simply use ModemPuts() to send the Dial String. Make sure there are at least 2 tildes ('~') after the Dial String ('ATDT226-8033^M~~'). CLACom will send the Dial String, and then wait 1 second before returning. Upon returning, the Modem will have Dialed the Phone Number.
Now is where you run into problems and what you do from here on out is dependent upon the Modem's capabilities.
The very basic approach is to tell the Operator to pick up the Phone, wait a second, and then send a Carriage Return (ASCII 13) to the Modem to tell it to stop trying to Connect. But what do you do if the Operator doesn't pick up the Phone in 1 second? By sending the Carriage Return to the Modem, the Modem will release the line and stop trying to Connect. If the Operator hasn't picked up an Extension Phone, the Line will be dropped and the Operator will receive a Dial Tone. You could wait for 2 seconds before telling the Modem to drop the Line. This might work, and gives the Operator 2 seconds to pick up the Handset. But then again, what if it takes the Operator 3 seconds to pick up the Handset? 4 or 5 Seconds? If your program just blindly sends a Carriage Return to tell the Modem to stop trying to connect, you've lost control over the human intervention - the Operator using the program.
Generally, once you have sent a Dial String to the Modem, the Modem expects to wait 50 or 60 seconds for a Carrier from a Remote Modem. You can stop your Modem from waiting by sending any character (normally a Carriage Return) to your Modem. If a Handset is not picked up after the Modem has Dialed a Number, then the Modem will release the Line all by itself when it has either Timed Out or you send a Carriage Return to it to tell it to abort the Call.
The Modem is only being used as an interface to the Phone System in order to send the DTMF Dial Tones. Once the Modem has Dialed a Number, the Modem can be "released". However, before releasing the modem, Somebody has to engage the Line by picking up an Extension Phone to keep the line Open.
The best approach is to use Modems that return Call Progress status (i.e., BUSY, VOICE, etc). When implementing an Automatic Dialer to do Sales Calls or any task where you are trying to Dial a Human, as opposed to another Modem, what you should be most concerned with is the "VOICE" response from the Modem. Not all Modems support a "VOICE" return code. USRobotics Modems do, some Rockwell Chip Set Modems do, but most do not.
When using a Modem to Dial a Voice Number in order to get a Human on the other end, you need to look for the word "VOICE" from your Modem. If you receive BUSY, CONNECT, or you time out, there is no sense telling the Operator of your Program to pick up the Phone and start talking.
Assuming you have a Modem (or block of Modems) that return the Result Code of "VOICE" if a Human answers the Phone, then after sending the Dial String to Dial a Number, you need to Monitor the incoming Serial Port Data Stream for the word "VOICE". You would "time out" after 60 seconds if nothing comes in, and abort the call if CONNECT comes in (which means you connected to another Modem), or you receive a "BUSY" string.
If your Modem does not return the "VOICE" Result Code, then simply Dial the Number, tell the Operator to "Pick Up the Handset", and send a Carriage Return to the Modem to tell it to Disconnect. Many programs provide an OK Button for the Operator to click on, to tell the program that the Handset has been picked up (the program tells the Modem to drop the Line only after the button has been pushed).
Also, have you noticed that extra Phone Jack on the back of the Modem? There should be 2 jacks. One labeled "Line" and one labeled "Phone". If you plug a Phone into the "Phone Jack", and pick up the attached Phone after the Modem has dialed a Number, the Modem should automatically release itself from the Phone Line. This is what this jack is provided for.
