elite enhancement for CLI logging ?
Marc SCHAEFER (schaefer@alphanet.ch)
Sun, 8 Nov 1998 12:13:23 +0100
Gert Doering <gert@greenie.muc.de> wrote:
> No, cnd is part of mgetty :-) - and I do not ship sample "cnd-program"s
> yet. But it's pretty easy.
Here is one (matching with the patches I sent for inclusion with mgetty),
patches are available at
http://www-internal.alphanet.ch/archives/local/alphanet/mvm/mgetty-patches/
It does what I described in the other mail.
#! /bin/sh
# very simple MSN filtering
# NOTES
# - needs mgetty-1.1.17-nf-3
# - Arguments
# <program> <tty> <CallerID> <Name> <dist-ring-nr.> <Called Nr.>
CND_SCRIPT_ACCEPT_CALL=0
CND_SCRIPT_IGNORE_CALL=257
CND_SCRIPT_REJECT_CALL=258
CND_SCRIPT_MORE_RINGS_NEEDED=259
CND_SCRIPT_LET_IT_RING=260
if [ $# != 5 ]; then
exit $CND_SCRIPT_REJECT_CALL
fi
case $4 in
1) exit $CND_SCRIPT_ACCEPT_CALL;;
# 8414081, accept fax/modem (and also X.75)
2) exit $CND_SCRIPT_ACCEPT_CALL;;
# 8414037, accept X.75 (and also fax/modem).
3) exit $CND_SCRIPT_ACCEPT_CALL;;
# 8414013
# 4) if [ $RING_COUNT -lt 5 ]; then
# exit $CND_SCRIPT_MORE_RINGS_NEEDED
# else
# exit $CND_SCRIPT_ACCEPT_CALL
# fi;;
# # 8414014
esac
exit $CND_SCRIPT_IGNORE_CALL
Now, when it's not X.75, mvm is called, and mvm does the
equivalent of:
case $CALLED_ID in
8414013) exec /usr/lib/mgetty/mvm_vgetty_script.sh;;
esac
exit 3
So, if it's voice (8414013), do voice, or exit 3 to go
to data/fax.