mgetty/vgetty problems + solutions.
"xy3@email.com" (xy3@email.com)
Tue, 21 Sep 1999 17:33:03 -0700
Hello,
Perhaps no one knows the answers to my previously posted problem, or maybe my
messages aren't getting out (are they?).
Anyway, here are some solutions that I've discovered for my particular case.
I have 1 phone line with 3 distinctive rings and Caller ID connected to a
Cardinal MVP288i modem (Rockwell) on Linux 2.0.35.
I want it to answer voice, but listen for faxes if they are heard, on a certain
distinctive ring #. Data connections are not wanted. (cable modems/adsl are
the norm around here)
Problem #1:
vgetty doesn't recognize this modem as a voice modem.
Solution:
Edit libvoice/detect.c: (change the 0 to a 1 like so:)
#if 1
{ati, "33600", NULL, &Rockwell},
#else
Problem #2:
mgetty caller ID is semi-broken.
My modem returns caller ID in the format:
DATE =
TIME =
NMBR =
NAME =
but ring.c cuts it off (breaks) after the NMBR is found. This leaves the
'NAME' in the buffer, and _completely_ screws up vgetty, causing it to "Can't
answer the phone, Strange..." because the NAME is being spit out into fields
which are expecting OK or VCON, etc. (mgetty still worked, but it never logged
the 'NAME', which is a bug.)
Solution:
Edit ring.c and change the NMBR to NAME (I'm sure there is a better solution
that would work for all modems, but I just wanted mine to work at this time)
like so:
/* Rockwell (et al) caller ID - handled by cndfind(), but
* we count it as "RING" to be able to pick up immediately
* instead of waiting for the next "real" RING
*/
if ( strncmp( buf, "NAME", 4 ) == 0 ) { break; }
Problem #3:
I could then get mgetty to answer FAXs, and vgetty to answer VOICE, but
whenever a fax came in and vgetty answered voice, it could not answer the FAX.
It said it switched to fax mode, but it really did a #CLS=0 which is data/fax
mode, and this wouldn't answer faxes for me.
Solution (not the best, but works for me -- it is a class 2 modem):
Edit vgetty/answer.c and add a fax_mode=2 like so:
case ANSWER_FAX:
fax_mode="2";
lprintf(L_JUNK, "%s: trying fax connection mode %s", program_name, fax_mode);
if (voice_switch_to_data_fax(fax_mode) == FAIL)
This will cause it to #CLS=2 when it detects a fax tone on the voice message
recorder and answer the fax properly.
Possible oddity:
If a call comes in on distinctive ring 3 (3 quick rings) and you answer the
phone on the second distinctive ring of the second ring, mgetty will think it
is a RING2 call. (I only came upon this by chance...)
09/21 14:23:49 yS2 wfr: waiting for ``RING''
09/21 14:23:49 yS2 got: [0a][0d][0a]RING3[0d]
09/21 14:23:49 yS2 CND: RING3
09/21 14:23:49 yS2 wfr: rc=0, drn=3
09/21 14:23:49 yS2 wfr: waiting for ``RING''
09/21 14:23:49 yS2 got: [0a][0d][0a]RING2[0d]
09/21 14:23:50 yS2 CND: RING2
09/21 14:23:50 yS2 wfr: rc=0, drn=2
I don't know what it is like elsewhere in the world, but perhaps an option can
be made to determine the "drn" on the first ring, and save that one as the
final drn even if subsequent rings return different drn values?
I realize it is the modem that returns the ring type, but I only bring it up as
something to keep in mind as an option for consistency (if the first ring is
always right, but subsequent ones could change because you answer the phone,
but you want it to log/handle the call properly based upon your RING return
codes in cnd_program.)
That's all for now. My modem answers voice and fax with vgetty without problem
(so far), and callerID/distinctive rings work. Here is my modem:
ATI -> 33600
ATI1 -> 176
ATI2 -> OK
ATI3 -> V1.510V-V34_DP Data/Fax/Voice/VV/CID
ATI4 -> Cardinal, 020-0476, 30-Jul-96
ATI5 -> 022
ATI6 -> RCV288DPi Rev 05BA
ATI7 -> 255
And here are the current config of some files. I've changed things so much
lately I've no idea if I'm hurting or helping things with these settings...
policy.h
#define MODEM_INIT_STRING "ATZ"
#define DEFAULT_MODEMTYPE "cls2"
#define FAX_RECV_SWITCHBD 19200
#define FAX_MODEM_HANDSHAKE "AT&K3"
mgetty.config
init-chat "" ATH OK AT&F OK AT-SDR=7S0=0M0Q0&D3&K3&C1V1E0#CID=1 OK
switchbd 19200
- john