Asterisk additions for Pulse DID with Decadic Signalling (2007-05-21) -------------------------------------------------------- This is a short description of the Decadic signalling I have added to the Asterisk PBX software, version 1.2 and 1.4. * Purpose: to be able to interface a PBX using Decadic signalling for DID (Direct Inward Dialling). * Status: up and running since 2006-12-12 (Asterisk version 1.2). An Asterisk with these additions connected to a legacy PBX does DID. The Decadic signalling is described in (this document is in both swedish and english): http://www.its.se/its/ss6363x/SS636347-ed2.pdf The signalling model is standardized (SS636347) in Sweden, but differs from the corresponding American standard T1.405-1995: http://ftp.tiaonline.org/TR-41/TR41.1/Public/0-Archive/2001-11-Greensboro/TR41.1-01-11-059-Draft-T1.405.pdf I think Asterisk can do analog (pulse) DID according to the American standard, but I haven't tested it. Asterisk can not do analog DID according to the swedish standard without my additions to the source code. Important details in the Decadic signalling (SS636347): * The signalling is done in one direction only. Ie, the receiveing PBX uses the phone lines for incoming calls only, separate phone lines are used for outgoing calls. * No exotic voltages, impedances or frequencys are used. This means that standard hardware can be used. But the signalling is a bit different, this is how it works: - The sending PBX is FXS (providing battery voltage) and the receiveing PBX is FXO. This is the normal way of connecting a Telco to an office PBX. - The idle state is high impedance, without any voltage. (This is a bit odd.) - A DID call is initiated by applying the battery voltage (normally used for on-hook.) - The DID pulse sequence is sent when the receiveing PBX goes low impedance (off-hook). - The receiveing PBX acknowledges the DID by returning to high impedance. The call is sent to the addressed telephone. - When the telephone hook is lifted the receiveing PBX goes low impedance and the voice channel is opened. This can be acknowledged be the sending PBX by a polarity reversal, but this is not necessary since it only says that the call is considered to have started for charging purposes. * The Decadic signalling has been used for many years in Sweden, but no Telco does new installations (since one-two years). I do not know if it is used elsewhere in the world. In addition to the Decadic signalling there is a minor difference in pulse counting compared to how it is normally done in Asterisk. This is according to the Swedish standard. The number of pulses is one plus the digit dialed, compared to the equal number of pulses, and ten pulses for zero. The source code additions are minor, most parts are using already existing code. In short: - A new FXO signalling called "Decadicstart" - Additions are garded by conditions on signalling = Decadicstart - The main logic is in asterisk/channels/chan_zap.c - Signal level logic is in zaptel/zaptel.c - A new flag for pulse count start at digit one or zero. In addition to the asterisk/zaptel changes there are some small additions the Sangoma drivers: - Startup Si3210 voltage calibration relaxed limit due to battery on triggered the DID start sequence. - Override some on/off hook logic in FXO "Decadicstart". Since I only have Sangoma hardware no other drivers are tested. I had problem finding detailed descriptions of the A/B/C/D bits in the Digium cards. It is propably fairly simpe to adapt the changes to any driver since the logic is in zaptel.c and chan_zap.c. The running installation: - Fedora Core 6 - Asterisk 1.2.13 - Sangoma wanpipe 2.3.4 - 3 GHz Asus box (disks mirrored in Linux) - Sangoma Remora A200 with 12 FXS ports, used: 5 in and 5 out (DID) The legacy PBX still in service is a Nitsuko DX-E with 30 extensions and 5+5 (in+out) trunk lines. The Nitsuko was branded Doro in Sweden. The main reason for choosing Fedora was thar it was the easiest way of getting a new enough kernel for the disk drivers. The reason for using the Sangoma card was that my old test box wasn't PCI 2.2 compliant, and then I continued with the same type of card in the real PBX. This work made me dig quite deep into the zaptel code. One thing I found was that the analog dialing pulse length configuration did not work. It is described on the Wiki, but adding the zaptel.pulse.* directives to the configuration only caused errors. I found that code exists to perform different pulse lengths, but the the settings are never read from the configuration file. I added a few statements to do this, and also added a new configuration variable for the pulse count. These are now recognized: zaptel.pulse.countzerofirst zaptel.pulse.break zaptel.pulse.make zaptel.pulse.pause I used these when testing since the swedish standard is different from the american, using 60/40/800 instead of 50/50/750. Later I found that the difference does not matter, it works with the default values. But the count start setting is needed, else the digits are offset by one. I did the testing with asterisk 1.2, that also is the running version. But I have the old test box still operational, and now I have used it to test my code with asterisk 1.4.0. It works. Files changed: asterisk/channels/chan_zap.c zaptel/ zaptel.c zaptel.h ztcfg.c wanpipe/patches/kdrivers/src/net/ sdla_remora.c sdla_remora_tdmv.c --- Olle Olsson, Ergodata AB, Sweden mailto:Olle.Olsson@Ergodata.se