[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Modem Won't Dial Phone Card Number




[Annelise Anderson writes:]
-> The modem that came with my 701 C--supposedly a fine road warrior machine!--
-> can't dial using a phone card such as sprint.
-> 
-> I'm using a REXX script under OS2 with
-> dialcmd = 'atdt5551212'
-> and this works--but if expanded to
-> dialcmd = 'atdt18008778000,,xxxxxxxxxx,,xxxxxxxxxxxxxx'
-> it won't even begin dialing; the first set of x's here is 0 plus
-> area code plus number, the second set is my sprint card number.
-> 
-> If I break this up into two sets, it dials only the second set.
-> 
-> Has anyone solved this problem?

The problem is that the modem only allows a string of around 30-33 characters
after the ATDT, and if there are more, it spits back ERROR instead of dialing.
I recall finding the limit documented somewhere where I didn't expect to find
it; I don't think it was mentioned in the on-line MWave read-me or Modem
Reference.

One solution is to break this into two, but you have to be clever about
how to do that, so the modem doesn't wait for carrier after the first.
To do this, use a semicolon after the first set of digits by sending:
"ATDT ...1st-25-or-so-chars... ;" on one line (modem will respond with "OK"
after it has completed dialing these, then "ATDT ...rest-of-number..." on 2nd
line (modem will wait for connection).  Since there will be an implicit
second-or-so pause between lines, it's handy to line this up to replace a
sequence of "," pauses in your string.

In a Rexx dialscript, this might be implemented something like:

/* Assumes dialcmd contains just the numbers to dial and does NOT begin    */
/* with "ATDT", but "ATDT" is the string to send to the modem for dialing. */
do while (length(dialcmd) > 25)
   dialnow = substr(dialcmd, 1, 25)
   dialcmd = substr(dialcmd, 26)
   call send 'ATDT' || dialnow || ';' || cr
   call waitfor 'OK', 10 ; call flush_receive 'echo'
   /* must account for modem's S11 value for tone dial time here; */
   /* must be much more patient for pulse dialing! */
end
call send 'ATDT' || dialcmd || cr
call waitfor 'CONNECT' , 60
if RC = 1 then do
   call lineout , '!!! Number failed to answer or connect reliably.'
   exit 1
end
call waitfor crlf , 2

I have NOT tested the above...it's just off-the-cuff.  I used a similar scheme
in a Trumpet Winsock dialscript a while back with reasonable success.  Good
luck!

..Don Markuson
  dmarkuson@peritus.com