HylaFAX The world's most advanced open source fax server

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

[hylafax-users] how to "busy" a modem temporarily to use the line for voice



Fellow Hylafaxers...

Hylafax 4.4.1 built from .tar.gz file on a RH9 i386 machine...

I had this working months ago but at some point it stopped and I can't tell why.

I made two extra files in my /var/spool/hylafax/etc directory called

config.ttyS5.no.calls
config.ttyS5.yes.calls

with the only difference being that the .no.calls file has a line:

ModemReadyState:    B

and the .yes.calls file has that line commented out.

My ttyS5 modem is on a line with a good long distance plan, and when we want to make a lot of voice calls on some days, we want to use that line.  I've given the user two shell scripts called "unplug" and "replug" which (used to) let him "virtually" unplug the phone line from the modem (make the modem Busy) so he could use it for voice, un-interrupted by the modem trying to dial out.  unplug.sh:

#!/bin/bash
ssh tony@socrates "sudo cp -f /var/spool/hylafax/etc/config.ttyS5.no.calls /var/spool/hylafax/etc/config.ttyS5"

i.e. it overwrites the configy.ttyS5 with the one that makes it Busy.  And replug changes it back.

How can I get Hylafax to notice this updated file?  For the change from available to Busy, it seems to notice it if I restart hfaxd and faxq.  But for the change from Busy back to available, it only seems to notice it if I restart faxgetty.  How should I restart faxgetty (I'm guessing killall faxgetty is not safe?).

What if I stop hfaxd and faxq, "killall faxgetty", (they are restarted from inittab), then start hfaxd and faxq?

Do I have to wait for them to stop gracefully before killing faxgetty?

I've been alternating testing the shell script, testing with a sendfax command, and faxstat to tell which modem it goes out on  (by priorities, ttyS5 gets used first if available). 
That's how I've described when it "seems to notice". 

Thanks.

Martin






Project hosted by iFAX Solutions