📄 readme
字号:
and the "connection" between the low-level-layer and the link-level-layer is established and kept until the end of the connection. In all other cases no connection is established. Isdn4linux can be configured to either do NOTHING in this case (which is useful, if other, external devices with the same EAZ/MSN are connected to the bus) or to reject the call actively. (isdnctrl busreject ...) For an outgoing call, the inactive physical lines are searched. The call is placed on the first physical line, which supports the requested protocols for the B-channel. If a net-interface, however is pre-bound to a channel, this channel is used directly. This makes it possible to configure several network interfaces and ttys for one EAZ, if the network interfaces are set to secure operation. If an incoming call matches one network interface, it gets connected to it. If another incoming call for the same EAZ arrives, which does not match a network interface, the first tty gets a "RING" and so on.2 System prerequisites: ATTENTION! Always use the latest module utilities. The current version is named in Documentation/Changes. Some old versions of insmod are not capable of setting the driver-Ids correctly.3. Lowlevel-driver configuration. Configuration depends on how the drivers are built. See the README.<yourDriver> for information on driver-specific setup.4. Device-inodes The major and minor numbers and their names are described in Documentation/devices.txt. The major numbers are: 43 for the ISDN-tty's. 44 for the ISDN-callout-tty's. 45 for control/info/debug devices.5. Application a) For some card-types, firmware has to be loaded into the cards, before proceeding with device-independent setup. See README.<yourDriver> for how to do that. b) If you only intend to use ttys, you are nearly ready now. c) If you want to have really permanent "Modem"-settings on disk, you can start the daemon iprofd. Give it a path to a file at the command- line. It will store the profile-settings in this file every time an AT&W0 is performed on any ISDN-tty. If the file already exists, all profiles are initialized from this file. If you want to unload any of the modules, kill iprofd first. d) For networking, continue: Create an interface: isdnctrl addif isdn0 e) Set the EAZ (or MSN for Euro-ISDN): isdnctrl eaz isdn0 2 (For 1TR6 a single digit is allowed, for Euro-ISDN the number is your real MSN e.g.: Phone-Number) f) Set the number for outgoing calls on the interface: isdnctrl addphone isdn0 out 1234567 ... (this can be executed more than once, all assigned numbers are tried in order) and the number(s) for incoming calls: isdnctrl addphone isdn0 in 1234567 g) Set the timeout for hang-up: isdnctrl huptimeout isdn0 <timeout_in_seconds> h) additionally you may activate charge-hang-up (= Hang up before next charge-info, this only works, if your isdn-provider transmits the charge-info during and after the connection): isdnctrl chargehup isdn0 on i) Set the dial mode of the interface: isdnctrl dialmode isdn0 auto "off" means that you (or the system) cannot make any connection (neither incoming or outgoing connections are possible). Use this if you want to be sure that no connections will be made. "auto" means that the interface is in auto-dial mode, and will attempt to make a connection whenever a network data packet needs the interface's link. Note that this can cause unexpected dialouts, and lead to a high phone bill! Some daemons or other pc's that use this interface can cause this. Incoming connections are also possible. "manual" is a dial mode created to prevent the unexpected dialouts. In this mode, the interface will never make any connections on its own. You must explicitly initiate a connection with "isdnctrl dial isdn0". However, after an idle time of no traffic as configured for the huptimeout value with isdnctrl, the connection _will_ be ended. If you don't want any automatic hangup, set the huptimeout value to 0. "manual" is the default. j) Setup the interface with ifconfig as usual, and set a route to it. k) (optional) If you run X11 and have Tcl/Tk-wish version 4.0, you can use the script tools/tcltk/isdnmon. You can add actions for line-status changes. See the comments at the beginning of the script for how to do that. There are other tty-based tools in the tools-subdirectory contributed by Michael Knigge (imon), Volker G鰐z (imontty) and Andreas Kool (isdnmon). l) For initial testing, you can set the verbose-level to 2 (default: 0). Then all incoming calls are logged, even if they are not addressed to one of the configured net-interfaces: isdnctrl verbose 2 Now you are ready! A ping to the set address should now result in an automatic dial-out (look at syslog kernel-messages). The phone numbers and EAZs can be assigned at any time with isdnctrl. You can add as many interfaces as you like with addif following the directions above. Of course, there may be some limitations. But we have tested as many as 20 interfaces without any problem. However, if you don't give an interface name to addif, the kernel will assign a name which starts with "eth". The number of "eth"-interfaces is limited by the kernel.5. Additional options for isdnctrl: "isdnctrl secure <InterfaceName> on" Only incoming calls, for which the caller-id is listed in the access list of the interface are accepted. You can add caller-id's With the command "isdnctrl addphone <InterfaceName> in <caller-id>" Euro-ISDN does not transmit the leading '0' of the caller-id for an incoming call, therefore you should configure it accordingly. If the real number for the dialout e.g. is "09311234567" the number to configure here is "9311234567". The pattern-match function works similar to the shell mechanism. ? one arbitrary digit * zero or arbitrary many digits [123] one of the digits in the list [1-5] one digit between '1' and '5' a '^' as the first character in a list inverts the list "isdnctrl secure <InterfaceName> off" Switch off secure operation (default). "isdnctrl ihup <InterfaceName> [on|off]" Switch the hang-up-timer for incoming calls on or off. "isdnctrl eaz <InterfaceName>" Returns the EAZ of an interface. "isdnctrl delphone <InterfaceName> in|out <number>" Deletes a number from one of the access-lists of the interface. "isdnctrl delif <InterfaceName>" Removes the interface (and possible slaves) from the kernel. (You have to unregister it with "ifconfig <InterfaceName> down" before). "isdnctrl callback <InterfaceName> [on|off]" Switches an interface to callback-mode. In this mode, an incoming call will be rejected and after this the remote-station will be called. If you test this feature by using ping, some routers will re-dial very quickly, so that the callback from isdn4linux may not be recognized. In this case use ping with the option -i <sec> to increase the interval between echo-packets. "isdnctrl cbdelay <InterfaceName> [seconds]" Sets the delay (default 5 sec) between an incoming call and start of dialing when callback is enabled. "isdnctrl cbhup <InterfaceName> [on|off]" This enables (default) or disables an active hangup (reject) when getting an incoming call for an interface which is configured for callback. "isdnctrl encap <InterfaceName> <EncapType>" Selects the type of packet-encapsulation. The encapsulation can be changed only while an interface is down. At the moment the following values are supported: rawip (Default) Selects raw-IP-encapsulation. This means, MAC-headers are stripped off. ip IP with type-field. Same as IP but the type-field of the MAC-header is preserved. x25iface X.25 interface encapsulation (first byte semantics as defined in ../networking/x25-iface.txt). Use this for running the linux X.25 network protocol stack (AF_X25 sockets) on top of isdn. cisco-h A special-mode for communicating with a Cisco, which is configured to do "hdlc" ethernet No stripping. Packets are sent with full MAC-header. The Ethernet-address of the interface is faked, from its IP-address: fc:fc:i1:i2:i3:i4, where i1-4 are the IP-addr.-values. syncppp Synchronous PPP uihdlc HDLC with UI-frame-header (for use with DOS ISPA, option -h1) NOTE: x25iface encapsulation is currently experimental. Please read README.x25 for further details Watching packets, using standard-tcpdump will fail for all encapsulations except ethernet because tcpdump does not know how to handle packets without MAC-header. A patch for tcpdump is included in the utility-package mentioned above. "isdnctrl l2_prot <InterfaceName> <L2-ProtocolName>" Selects a layer-2-protocol. (With the ICN-driver and the HiSax-driver, "x75i" and "hdlc" is available. With other drivers, "x75ui", "x75bui", "x25dte", "x25dce" may be possible too. See README.x25 for x25 related l2 protocols.) isdnctrl l3_prot <InterfaceName> <L3-ProtocolName> The same for layer-3. (At the moment only "trans" is allowed) "isdnctrl list <InterfaceName>" Shows all parameters of an interface and the charge-info. Try "all" as the interface name. "isdnctrl hangup <InterfaceName>" Forces hangup of an interface. "isdnctrl bind <InterfaceName> <DriverId>,<ChannelNumber> [exclusive]" If you are using more than one ISDN card, it is sometimes necessary to dial out using a specific card or even preserve a specific channel for dialout of a specific net-interface. This can be done with the above command. Replace <DriverId> by whatever you assigned while loading the module. The <ChannelNumber> is counted from zero. The upper limit depends on the card used. At the moment no card supports more than 2 channels, so the upper limit is one. "isdnctrl unbind <InterfaceName>" unbinds a previously bound interface. "isdnctrl busreject <DriverId> on|off" If switched on, isdn4linux replies a REJECT to incoming calls, it cannot match to any configured interface. If switched off, nothing happens in this case. You normally should NOT enable this feature, if the ISDN adapter is not the only device connected to the S0-bus. Otherwise it could happen that isdn4linux rejects an incoming call, which belongs to another device on the bus. "isdnctrl addslave <InterfaceName> <SlaveName> Creates a slave interface for channel-bundling. Slave interfaces are not seen by the kernel, but their ISDN-part can be configured with isdnctrl as usual. (Phone numbers, EAZ/MSN, timeouts etc.) If more than two channels are to be bundled, feel free to create as many as you want. InterfaceName must be a real interface, NOT a slave. Slave interfaces start dialing, if the master interface resp. the previous slave interface has a load of more than 7000 cps. They hangup if the load goes under 7000 cps, according to their "huptimeout"-parameter. "isdnctrl sdelay <InterfaceName> secs." This sets the minimum time an Interface has to be fully loaded, until it sends a dial-request to its slave. "isdnctrl dial <InterfaceName>" Forces an interface to start dialing even if no packets are to be transferred. "isdnctrl mapping <DriverId> MSN0,MSN1,MSN2,...MSN9" This installs a mapping table for EAZ<->MSN-mapping for a single line. Missing MSN's have to be given as "-" or can be omitted, if at the end of the commandline. With this command, it's now possible to have an interface listening to mixed 1TR6- and Euro-Type lines. In this case, the interface has to be configured to a 1TR6-type EAZ (one digit). The mapping is also valid for tty-emulation. Seen from the interface/tty-level the mapping CAN be used, however it's possible to use single tty's/interfaces with real MSN's (more digits) also, in which case the mapping will be ignored. Here is an example: You have a 1TR6-type line with base-nr. 1234567 and a Euro-line with MSN's 987654, 987655 and 987656. The DriverId for the Euro-line is "EURO". isdnctrl mapping EURO -,987654,987655,987656,-,987655 ... isdnctrl eaz isdn0 1 # listen on 12345671(1tr6) and 987654(euro) ... isdnctrl eaz isdn1 4 # listen on 12345674(1tr6) only. ... isdnctrl eaz isdn2 987654 # listen on 987654(euro) only. Same scheme is used with AT&E... at the tty's.6. If you want to write a new low-level-driver, you are welcome. The interface to the link-level-module is described in the file INTERFACE. If the interface should be expanded for any reason, don't do it on your own, send me a mail containing the proposed changes and some reasoning about them. If other drivers will not be affected, I will include the changes in the next release. For developers only, there is a second mailing-list. Write to me (fritz@isdn4linux.de), if you want to join that list.Have fun! -Fritz
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -