Debian DAHDI

From sailpbx
Revision as of 11:31, 17 February 2014 by Adminwiki (talk | contribs) (Background)
Jump to: navigation, search

back to SARK Main Page

Background

There isn't a great deal of documentation on how to install Digium's DAHDI component onto Debian.

The "Debian way" to install driver components use a tool call m-a a-i. What it will do is drag the source code from the libraries, compile it an then build an installable deb on-the-fly. Here's how you use it. It should work on any Debian Wheezy image.

This assumes you have already installed SAIL using the guide here (this means that all of the correct Asterisk stuff will already be installed.

apt-get install dahdi-source
m-a a-i dahdi

This will chug along for a while. When it finishes, you will have a little further work to do.

Unpack and copy the /etc/dahdi samples into /etc/dahdi

cp /usr/share/doc/dahdi/examples/system.conf.sample /etc/dahdi/system.conf
cp /usr/share/doc/dahdi/examples/genconf_parameters /etc/dahdi/ 

There is a bug in one of the DAHDI Perl routines which will cause problems if you don't fix it. There is a published fix from Digium but it won't verify on Debian (Span.PM is in a different place to EL6) so you'll need to fix it manually. Fortunately, it's not very big and only concerns a single module; Span.PM. You will find it in /usr/share/perl5/Dahdi/Span.pm

At, or around line 230 you will find the following code

                        $self->{IS_DIGITAL} = 1;
                        $self->{IS_PRI} = 1;
                        $self->{TERMTYPE} = $termtype;
                        $self->init_proto($proto);
                        last;
                }
        }
        $self->{IS_SOFT_TERM_TYPE} = 0;
        foreach my $cardtype (@soft_term_type_strings) {
                if($head =~ m/$cardtype/) {
                        $self->{IS_SOFT_TERM_TYPE} = 1;
                        last;
                }
        }
<pre>

Add this

<pre>
                        $self->{IS_DIGITAL} = 1;
                        $self->{IS_PRI} = 1;
                        $self->{TERMTYPE} = $termtype;
                        $self->init_proto($proto);
                        last;
                }
        }
#
# Digium Patch code here
#
        if (($self->is_soft_term_type == 0) and ($self->termtype eq "UNKNOWN")) { 
           $self->{IS_SOFT_TERM_TYPE} = 1;
        }
#
# End of Digium patch code
#
        $self->{IS_SOFT_TERM_TYPE} = 0;
        foreach my $cardtype (@soft_term_type_strings) {
                if($head =~ m/$cardtype/) {
                        $self->{IS_SOFT_TERM_TYPE} = 1;
                        last;
                }
        }