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

Re: Dialin question



-----BEGIN PGP SIGNED MESSAGE-----

On Fri, 27 Aug 1999, Douglas Eck wrote:

> I'm currently using wvdial and like it. Now I only have one phone
> line with call forwarding and want to do the following with
> demand dialing (note, I know roughly about all of the packages
> required... I'd just like to get thoughts from anyone who
> has done anything this silly already ...)
> 
> On demand
> 1) dial *72 - xxx-xxxx to forward calls. Wait 2 sec on answer. Hangup
> 2) dial *72 - xxx-xxxx again to complete the forward. (Calling only once
> doesn't work with US West's call forwarding unless the forwarded phone
> answers)
> 3) dial my isp and log in 
> 
> 
> On hangup or on 15-min inactivity
> 1) hang up from isp
> 2) dial *73. Hangup. This cancels call forwarding. 
> 
> Thoughts?

I think this is a tricky one!

As far as i can tell, you'll need to write a custom chatscript to dial
those numbers before running wvdial. This is just a rough guess at such a
chatscript:

######### START CHATSCRIPT #########

# Set ABORT settings for dialing the forward thing
CLR_ABORT BUSY
CLR_ABORT 'NO CARRIER'
CLR_ABORT VOICE
ABORT 'NO DIALTONE'
ABORT 'NO DIAL TONE'
CLR_ABORT 'NO ANSWER'

# Stick the init string here.
'' ATZ

# Dial the forwarding code.
OK ATDT*72xxxxxxx
# Wait 5 seconds or so...
'' \d\d\d\d\d\d
# Hang up and do it again.
'' +++
TIMEOUT 5
OK-AT-OK ATH0
TIMEOUT 45
OK ATDT*72xxxxxxx
'' \d\d\d\d\d\d+++
TIMEOUT 5
OK-AT-OK ATH0

# Your calls should now be forwarded...

########## END CHATSCRIPT ##########

You'd then run wvdial as normal.

After wvdial disconnected, you'd use another chatscript something like
this:

######### START CHATSCRIPT #########

CLR_ABORT BUSY
CLR_ABORT 'NO CARRIER'
CLR_ABORT VOICE
ABORT 'NO DIALTONE'
ABORT 'NO DIAL TONE'
CLR_ABORT 'NO ANSWER'

# init string...
'' ATZ

# Dial the *73 thing, wait 5 seconds, and hang up just like before
OK ATDT*73
'' \d\d\d\d\d\d+++
TIMEOUT 5
OK-AT-OK ATH0

# Your calls should now be unforwarded

########## END CHATSCRIPT ##########

Since wvdial doesn't background itself, you could turn this whole thing
into a shell script

- -----------
#!/bin/sh

# Crude hack to use the chatscript... Anyone know a better way?
pppd noauth init "chat -v -f /path/to/first.chatscript && false" \
  /dev/ttyS2 nodetach

# run wvdial
wvdial

# repeat of crude hack with other chatscript
pppd noauth init "chat -v -f /path/to/second.chatscript && false" \
  /dev/ttyS2 nodetach

- -----------

Of course, i don't guarantee this will work at all... And it might not
even be the best way to do it.


- -- 
  finger for PGP public key.



-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: noconv

iQCVAwUBN8tkl77M/9WKZLW5AQGT0QP/TYYv4t+ltbD38Klu43cqcde6rFmsCahT
gAJcdCyTM2ShBjSiwIxRnN5og6Px6jQZkhvU1/c64Z37Y5Ie5yGLFLzx3BOiqE6B
I31Yh6wW65JxFVYSiEpiQgHJTxjd5KEXl5phHAPkEdn+XDBW1REgVmuHKR0nQfAV
fet+2n0k2xc=
=E6gv
-----END PGP SIGNATURE-----


Reply to: