Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
Showing results for 
Search instead for 
Did you mean: 

CU Command: Fax modem check

Michael Worsham
Occasional Advisor

CU Command: Fax modem check

Hi all. I have a sort of odd request from my project manager. It seems the customers (users) from another division have been getting a number of reports of missing or failed fax transactions (through our 3rd party VSIFax program). Sometimes the fax numbers stored in the database are busy or non-functioning, so the only way to check is for us to check them one at a time (and we are talking nearly 500+ fax numbers overall). VSIFax has failed to point us to a method of 'pre-checking' the numbers/lines so I am turning here.

Is it possible to use the 'cu' command to do the following (?):

From a Oracle database, extract a fax number. Then using a function in the script, plug in the fax number into a command like: 'cu -l ttyd1p0 -m dir $1'... Where the cu program will connect to the MUX (where the modem is located) and dial the number.

If the modem connects with the fax tone, it could be drop the connection and return 'Fax Ready'. If it returned a busy tone, the result would be 'Busy'. Otherwise it just returns NO CARRIER.

-- M
Be lazy. Do it right the first time.
A. Clay Stephenson
Acclaimed Contributor

Re: CU Command: Fax modem check


If I were you I would look into a utility call 'Pcomm+' available at a modest cost from: Pcomm+ is part of their 'CommPak for UNIX'.

It has a scripting language which can timeout, look for regular expressions (more or less), and send/receive characters from a tty line. It will handle all the dialing and handshake stuff for you. You can also return status codes to an external program (in this case a shell script). You will have to write a sqlplus command to extract the phone numbers and then let your shell script build a pcomm+ batch file 'on the fly'.

I have used this method to build rather complex
modem transfer programs.

If it ain't broke, I can fix that.
Rory R Hammond
Trusted Contributor

Re: CU Command: Fax modem check

Several years ago I have used kermit to do very similar things. It has a scripting language and can do commans via stdin and stdio. Kermit is well supported and comes free with HPUX.

I have used it to check and reset locked modems, send system error messages via pager and download edi like transmissions over Phones lines and ethernet.

At first, It seems scary to use. but once you find a few examples. You will quickly learn that your task can be easily accomplished.
There are a 100 ways to do things and 97 of them are right