THE EXCHANGE

The Linux-Call-Router is capable of Signalling System No. 5. It does not only understand the tones and digits, but implements the real signalling system, which is close to the ITU (CCITT) standard. It can be used on ISDN links (without using D-channel), IP links or virtual links without an physical interface between.

Additionally it allows to clear the line using a long 2600 Hz tone. With this it is possible to use classic blue boxes without modification. Even pulse dialing with 2600 Hz tones is possible.

I my case I use two virtual ISDN interfaces at 'interfaces.conf':

[ss5_out]
portname mISDN_l1loop.1
ccitt5 suppress connect nodisconnect

[ss5_in]
portname mISDN_l1loop.2
tones_dir tones_ss5
channel-out 2,1
ccitt5 suppress starrelease bell nodisconnect connect

The interfaces will use the 'mISDN_l1loop.ko' kernel module for two virtual connected isdn BRI interfaces. The maximum number of calls can be two in this case. Larger intefaces are possible if two PRI interfaces would be used. The 'suppress' parameter is used to mute signalling tones as soon as they are recognized. In case of a call routed twice through Signalling System No. 5, the tones will not disturb each other. The 'connect' parameter will connect the call as soon as it is received, so the caller can hear inband signalling procedure and is able to bluebox. If it is not given, audio from external lines may not be through-connected. The 'nodisconnect' parameter will keep the caller connected after receiving a busy-flash or clear-back signal. To lower the risk of simulaniously selecting the same channel by both sides, the channel selection order is reversed by one interface. Since 'ss5_out' interface selects a free channel in the order of 1, 2, the 'ss5_in' interface select the channels in the order 2, 1. The 'bell' parameter will allow to disconnect the call using 2600 Hz tone, to simulate old bell systems. Alternatively 'starrelease' allows to release the line with 11 short pulses of 2600 Hz. (Neven mind about that.)

In order to route an incomming call, we need to change the 'routing.conf':

[extern]
...
dialing=9737083      : nothing connect timeout=2 : extern interfaces=ss5_out prefix=KP1-9090-ST
...

[intern]
...
dialing=9090         : extern interfaces=ss5_out prefix=KP1-9090-ST
...
In the 'extern' ruleset, I use a 2 seconds delay action while answering the incomming call from my external line. This ensures that the audio path is through-connected. After that I route the call to the interface 'ss5_out' and dial the string 'KP1-9090-ST'. For internal phones, I also dial the string when dialing the internal number '9090'.

Now a call will be received at 'ss5_in' interface. We need to add a new ruleset to the 'routing.conf':

[main]
interface=ss5_in     : goto ruleset=ss5
...

[ss5]
dialing=a9090                           : play sample=ringing alerting timeout=2 : play sample=/usr/local/lcr/ss5_welcome connect
dialing=a9001,a*,a#                     : intern extension=202
dialing=a02,a030,a031,a033-a039,a04-a06,a0702-a0799,a08,a0907-a0999 : goto ruleset=ss5_outdial
dialing=a9099,a99                       : test
dialing=a9091                           : vbox-record extension=201
                                        : disconnect cause=1
					
[ss5_outdial]
dialing=a                               : extern
A call that has been received from 'ss5_in' interface is now routed to its own rule 'ss5'. There the KP1 digit is checkd by using the 'a' digit, the KP2 digit by using the 'b' digit. The ST digit is always omitted. The '*' and '#' stand for the operator codes 11 and 12. To dial external numbers starting with '0', I check the prefixes first, so only fixed network calls to German subscribers can be made. In the ruleset 'ss5_outdial' the KP1 ('a') is removed. The leading '0' is not removed, because it is re-used as national area code prefix.