SUCCESS the package mgetty+sendfax can be used to intercept phone calls by callerID using fax answer after modification to port mgetty+sendfax
--- notes --- I had ordered a generic modem for asterisk usage, but was warned that it may need "Zaptel" support by a subscriber, so that was a wasted $6 + $9 shipping, so I went back to the scrounge pile and found in an old external USR modem that supported callerID, AT#CID=1 After a modem relearning curve I got mgetty+sendfax running Some tips: # grep cua /etc/ttys cua00 "/usr/local/sbin/mgetty" vt100 on insecure #to pickup changes to /etc/ttys kill -1 1 #And you make config changes and want to make #sure mgetty picks them up you can kill the mgetty PID #and /sbin/init will restart it. HOWever... mgetty from the port package would ignore the configuration file /etc/mgetty+sendfax/dialin.config I discovered the port package needs to also uncomment a line in the default policy.h file the line to use dialin.config. If you look at the used policy.h files you will see /* #define CNDFILE "dialin.config" */ I found the existing patch that already touches the file, /usr/ports/comms/mgetty+sendfax/patches/patch-policy_h_dist And I edited out the comment on that line and remade the patch, diff -u and saved result over patch-polich_h_dist (also attached to this email) Then I removed the package, and port working directory and make package. IT WORKS now. I'll send an email to port maintainer about it. If someone see how this becomes a security issue to enable, please inform. ... So in conclusion.... I implemented this on OPENBSD 4.0, and if you want to use the callerID feature mgetty+sendfax... http://home.leo.org/~doering/mgetty/mgetty_15.html#SEC15 You will have to recompile after modifying policy.h I added "none" for UNKNOWN callerids and some recent pesty callerIDs and the "!all" at end of the dialin.config file and its so sweet to have the fax answer the telemarketers. It looks like mgetty.config has hooks and could use external resources to phonenumbers to block, so some of the jokes about using something like spamd-setup may be feasible :) but for now I can edit /etc/mgetty+sendfax/dialin.config and mgetty reads the text file changes w/o hangup signal or restarting the process. Enjoy. ps., be sure to verigy your modem has support for callerID, http://ftp.mtnsys.com/pages/howto/htmdmtst.htm --- policy.h-dist.orig Wed Feb 22 13:56:31 2006 +++ policy.h-dist Fri Mar 23 15:10:41 2007 @@ -48,7 +48,7 @@ * Normally, this is "/bin/login", just a few systems put "login" * elsewhere (e.g. Free/NetBSD in "/usr/bin/login"). */ -#define DEFAULT_LOGIN_PROGRAM "/bin/login" +#define DEFAULT_LOGIN_PROGRAM "/usr/bin/login" /* FidoNet mailer support * @@ -85,7 +85,7 @@ * ZyXELs use S40.2=1. * If the path doesn't start with "/", it's relative to CONFDIR. */ -/* #define CNDFILE "dialin.config" */ +#define CNDFILE "dialin.config" /* If you want to use /etc/gettydefs to set tty flags, define this @@ -114,7 +114,7 @@ /* group id that the device is chown()ed to. If not defined, the * primary group of "DEVICE_OWNER" is used. */ -#define DEVICE_GROUP "modem" +#define DEVICE_GROUP "dialer" /* access mode for the line while getty has it - it should be accessible * by uucp / uucp, but not by others (imagine someone dialing into your @@ -249,7 +249,7 @@ # ifdef linux # define LOCK "/var/lock/LCK..%s" # endif -# if defined(__FreeBSD__) || defined(__NetBSD__) +# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) # define LOCK "/var/spool/lock/LCK..%s" # endif #endif @@ -564,7 +564,7 @@ #endif #ifndef MAILER -# define MAILER "/usr/lib/sendmail" +# define MAILER "/usr/sbin/sendmail" # define NEED_MAIL_HEADERS #endif