The Care and Feeding of ISDN4BSD | ||
---|---|---|
12.1 Overview | 12 Setting up the | 12.3 Program Parameters |
12.2 isdnd.rc Setup
The isdnd.rc entry for a telephone answering machine is simple:
#---------------------------------------
# test - example of a configuration file for the i4b isdn daemon
# last edit-date: [Fri Oct 30 16:27:45 1998]
#---------------------------------------
system
ratesfile = /etc/isdn/isdnd.rates
useacctfile = on
acctfile = /var/log/isdnd.acct
acctall = on
#==============================================================================
# telephony test
#==============================================================================
entry
name = I4BTEL # name for reference
usrdevicename = tel # ipr, tel, rbch
usrdeviceunit = 0 # unit number
isdncontroller = 0 # controller to use or -1 to use any
isdnchannel = -1 # channel (1/2) to use or 0 or -1 for any
# numbers used to verify at DIAL IN
local-phone-incoming = 37 # we take calls for this local number
remote-phone-incoming = * # we take calls from this remote machine
dialin-reaction = answer # accept, reject, ignore, answer
answerprog = answer # program to use
b1protocol = raw # hdlc, raw
idletime-incoming = 10
The system section should be obvious (if not, have a look the the sections describing the PPP and the IP over raw HDLC interface setups) and the entry section too - with some exceptions:
Now what will happen when someone calls in ?
- the keyword remote-phone-incoming now has a wildcard (``*'') parameter which allows anybody to access the answering machine,
- the dialin-reaction is answer to select the telephony answering system
- the b1protocol must be set to raw
- and finally by use of the keyword answerprog a program or script under the directory /etc/isdn must be specified, in this case /etc/isdn/answer will run when someone calls extension 37.
When a telephony call is coming in, the kernel will switch the B-channel trough to the selected /dev/i4btel0 device and isdnd will run the script selected by the answerprog keyword in background. Typically these scripts will copy some audio data to or from the /dev/i4btel0 by using the dd program.