Subject: Re: chat scripts
To: Joel Reicher <joel@panacea.null.org>
From: Jukka Marin <jmarin@pyy.jmp.fi>
List: port-i386
Date: 08/31/1998 17:31:12
On Tue, Sep 01, 1998 at 12:26:47AM +1000, Joel Reicher wrote:
> > ECHO OFF
> > ABORT 'BUSY' ABORT 'NO CARRIER' ' ATZ OK-ATZ-OK
> > ATL1 OK ATM1 OK
> > SAY "Dialling...\n"
> > ATX3D01234567
> 
> I haven't really experimented with this, but could it be that the commands
> like SAY only work immediately after a _send_ string, not an expect string?

Yes, you are correct.  I changed the script to

ECHO OFF
ABORT 'BUSY' ABORT 'NO CARRIER' ' ATZ OK-ATZ-OK
ATL1 OK ATM1 OK
'' SAY "Dialling...\n"
'' ATX3D01234567
TIMEOUT 120

and now it works.

IMHO, it would be less confusing if the send and expect strings had to
be typed using SEND and EXPECT commands.. ie.

SEND "ATZ"
EXPECT "OK"

Thanks for the reply!

  -jm