David Stern <[EMAIL PROTECTED]> writes:

> Hello,
> 
> I'd like my computer to call up one of those automated voice business 
> information systems, then execute some transactions by entering my user 
> account information and make some selections from the menu.  I'll need 
> to execute this task repetitively while I'm away from home.
> 
> I tried writing a chatscript, but my modem hangs up, presumably because 
> there's no handshake on the other end (I hear the automated voice on 
> the other end after answering, then after about 10 seconds my modem 
> hangs up).  I see chat is intended for use with pppd, and I didn't see 
> any options to disable the handshake expectation.
> 
>   ---chatscript---
>   ABORT BUSY
>   ABORT "NO DIALTONE"
>   ""      ATDT777-7777          (phone no.)
>   ""      \d\d\d\d\d\d\d\d\d\d  (more than enough time to answer)
>   ""      \d\d\d\d\d999999#\c   (hear dialogue, enter user info 
>                                                      followed by #)
>   [..never gets past the initial dialogue, my end hangs up after 10 s..]

As other people have pointed out, it's not chat that's hanging up,
it's your modem.  "chat" knows nothing of how long to wait for a
handshake from the remote modem, etc.
Besides that, even if your modem didn't hang up, this wouldn't work.
What's the modem supposed to do when it sees the 9999?  It's not
dialing anymore - you finished that ATDT line.  The modem will think
you're trying to send the string "99999" to a remote modem, or that
"99999" is supposed to be some modem command.  In any case, it's not
going to work.

To make it work, don't depend on the delays in chat to separate key
tones - let the modem do the delays in the dialing and just think that
it has to dial a long number before it hears anything.

So, your chatscript would look like:

ABORT BUSY
ABORT "NO DIALTONE"
""    +++
""    ATZ
"OK"  ATDT777-7777,,,,,,,,,,,9999999#,
""    \d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d

The "+++" and "ATZ" are to set the modem to its default configuration
when we start all this.  Then, the long phone number given to the
modem is what to dial; commas mean delay (how long is configurable in
one of those S registers) - on some modems, you can use @ signs
instead of commas for longer delays - check your modem manual.

The "\d"'s at the end say how long chat waits after telling the modem
to start dialing before chat sends a return character, which will hang 
up the modem.  (so that after doing what it needs to do, the modem
isn't still sitting around waiting for some modem on the other end;
remember, there's no way to tell in a voice conversation if that click 
you just heard was the other person hanging up or just line noise
without asking them, so the modem won't be able to tell that the other 
end hung up after getting the # sign)

Adjusting the numbers of commas and \d's should get this to work.

Reply via email to