Dahdi seems not ready for Primetime

For those that don’t care about the problems with Asterisk as it stands, my questions are ALL at the bottom.

The other day, our working phone system died, It was Asterisk, it was about 5 years old. It died because the Motherboard died, not because of software errors, or lightning (parts of the mother board still work).

When it died we decided to upgrade asterisk, and bring over our config, but that has proven to be a very arduous task due to a tool set that seems woefully difficult task for the following reasons.

We have a 4 channel (Fractional T1), and we use about 7 internal lines

We first grabbed AsteriskNOW, created a CD, and loaded it up on another machine (with 3 PCI slots) that had been serving as a test machine for our development group. After about 1 hour, we had nothing. Asterisk NOW didn’t see our cards, and wasn’t usable for anything other than an linux distro that took 30 minutes to boot (strange, because the machine is now on Ubuntu and books in about 10 seconds)

Then we blew that away and loaded the latest ubuntu, used apt-get to install asterisk and dahdi, did a dahdi_genconf, and our config was mapped out as

wctdm+ e159:0001 Wildcard TDM400P REV I
wcte11xp+ e159:0001 Digium Wildcard TE110P T1/E1 Board
wctdm+ e159:0001 Wildcard TDM400P REV I

where the T1 card is “span 2”.

I got the Framing issues resolved and the T1 looks functional (from the CSU), but all 4 channels were “busy” and could not accept any kind of incoming calls.

I got fed up with it, and removed asterisk and dahdi. Primarily because all I got out of dahdi_cfg was error 22, with no indication as to WHAT was wrong with the config that dahdi_genconf had created.

Then I downloaded from asterisk.org and built the most recent dahdi myself.

Now, my config looks like:

pci:0000:06:00.0 wctdm+ e159:0001 Wildcard TDM400P REV I
pci:0000:06:01.0 wctdm+ e159:0001 Wildcard TDM400P REV I
pci:0000:06:02.0 wcte11xp+ e159:0001 Digium Wildcard TE110P T1/E1 Board

Notice that the current config makes the T1 card “span 3”, rather than span 2

In our pre-dahdi config, the T1 card was “span 1” and as we added more internal lines, they came below in the config. The way it is today, adding 4 more internal lines will result in redoing all our config because the T1 will shift to Span4 (maybe)

When I first got involved with asterisk, it was somewhat technical, but manageable to setup. I hooked it up as a VMail system to a Toshiba DK282 and it worked pretty well.

Now, it seems to have descended into a nicely undocumented mess that requires paid support to sort it out. Maybe that is why the documentation seems to be missing about a lot of Dahdi, its a “Free” system, but you have to pay for support. Well, that a lot like saying Public Radio doesn’t have commercials.

[b]QUESTIONS are here:

So, enough of the rant. Where is the documentation that allows me to setup a usable system?
How do you get the 3 cards to appear in the order you want (everytime)?
Where did dahdi_tool go (it was there from apt-get, but once I build the current one:
dahdi_cfg dahdi_monitor dahdi_speed
dahdi_genconf dahdi_registration dahdi_test
dahdi_hardware dahdi_scan
is all I have)
What is a bchan or a dchan on a non ISDN T1?[/b]

I’ve modified my system.conf to be:

[quote]# Autogenerated by /usr/sbin/dahdi_genconf on Fri Mar 5 11:21:51 2010

If you edit this file and execute /usr/sbin/dahdi_genconf again,

your manual changes will be LOST.

Dahdi Configuration File

This file is parsed by the Dahdi Configurator, dahdi_cfg

Span 1: WCTDM/4 “Wildcard TDM400P REV I Board 5” (MASTER)

fxoks=25
fxoks=26
fxoks=27
fxoks=28

Span 2: WCTDM/4 “Wildcard TDM400P REV I Board 5”

fxoks=29
fxoks=30
fxoks=31
fxoks=32

Span 3: WCT1/0 “Digium Wildcard TE110P T1/E1 Card 0”

span=3,1,0,esf,b8zs

termtype: te

bchan=1-4
dchan=5-24

Global data

loadzone = us
defaultzone = us[/quote]

But the first 4 lines worry me, since this file is autogenerated. HOW do you get it to generate in a rational usable sense?

   The dahdi_genconf script can generate various kinds of configuration
   files as specificed by the generator arguments.  Each generator is a
   perl classes in Dahdi::Config::Gen namespace.  The generator names on
   the command line are the class names in lowercase.

What are these kinds of configurations? You mean the only way to figure it out is to read the PERL source? What kind of system is being built here? And before you point out that I can use perldoc, I’d like to point out how un helpful the information is in the output.

To Quote:

[quote]Dahdi::Config::Gen::SyUser(Contributed Perl DocumDahdi::Config::Gen::System(3)

NAME
dahdi - Generate configuration for dahdi drivers.

SYNOPSIS
use Dahdi::Config::Gen::Dahdi;

    my $cfg = new Dahdi::Config::Gen::Dahdi(\%global_config, \%genopts);
    $cfg->generate(@span_list);

DESCRIPTION
Generate the /etc/dahdi/system.conf. This is the configuration for
dahdi_cfg(1).

   Its location may be overriden via the environment variable
   DAHDI_CONF_FILE.

perl v5.10.0 2010-03-05 Dahdi::Config::Gen::System(3)[/quote]

or

[quote]Dahdi::Config::Gen::ChUserhContributed Perl DoDahdi::Config::Gen::Chandahdi(3)

NAME
chandahdi - Generate configuration for chan_dahdi channels.

SYNOPSIS
use Dahdi::Config::Gen::Chandahdi;

    my $cfg = new Dahdi::Config::Gen::Chandahdi(\%global_config, \%genopts);
    $cfg->generate(@span_list);

DESCRIPTION
Generate the /etc/asterisk/dahdi-channels.conf This is used as a
configuration for asterisk(1). It should be included in the main
/etc/asterisk/chan_dahdi.conf.

   Its location may be overriden via the environment variable
   "CHAN_DAHDI_CHANNELS_FILE".

OPTIONS
freepbx
With this option we do not generate channel definitions for FXS,
Input and Output ports. This is done because these channel
definitions need to be generated and inserted into freepbx database
anyway.

   The freepbx option may be activated also by adding a "freepbx yes" line
   to the "genconf_parameters" file.

perl v5.10.0 2010-03-05 Dahdi::Config::Gen::Chandahdi(3)
[/quote]

Well, I found that you have to manually build and install dahdi_tool, it no longer builds by default. And you have to edit the Makefile for tools to specify -lnewt so it will link

And genconf is broken like so:

[quote]$ sudo dahdi_genconf chandahdi
Use of uninitialized value $type in hash element at /usr/local/share/perl/5.10.0/Dahdi/Config/Gen/Chandahdi.pm line 160.
Use of uninitialized value $type in hash element at /usr/local/share/perl/5.10.0/Dahdi/Config/Gen/Chandahdi.pm line 161.
Use of uninitialized value $type in hash element at /usr/local/share/perl/5.10.0/Dahdi/Config/Gen/Chandahdi.pm line 162.
Use of uninitialized value $type in string eq at /usr/local/share/perl/5.10.0/Dahdi/Config/Gen/Chandahdi.pm line 166.
Use of uninitialized value $type in concatenation (.) or string at /usr/local/share/perl/5.10.0/Dahdi/Config/Gen/Chandahdi.pm line 167.
missing default_chan_dahdi_signalling for chan #1 type at /usr/local/share/perl/5.10.0/Dahdi/Config/Gen/Chandahdi.pm line 167.
[/quote]