[asterisk-users] Asterisk 1.4 and ISDN-BRI support -- Solution

Jaap Winius jwinius at umrk.to
Tue Jan 15 13:24:24 CST 2008


Quoting Jaap Winius <jwinius at umrk.to>:

> Has anyone been able to get ISDN-BRI support to work reliably on
> Asterisk 1.4? If so, I'd love to know how you did it (hardware, distro,
> kernel, modules, versions, config files).

Thanks to the support I received here I now have a working system, so  
I thought I'd show my appreciation by posting my configuration here  
for anyone who's interested.

Telco: KPN Telecom (Netherlands)

ISDN hardware: HFC-S PCI card (Cologne chip).

OS: Debian GNU/Linux stable (etch)

Kernel: 2.6.18-5-k7  (for an AMD Athlon CPU)

Relevant links in /etc/apt/sources.list:

    deb http://updates.xorcom.com/rapid etch main
    deb-src http://updates.xorcom.com/rapid etch main


Relevant installed debian packages:

    asterisk                          1.4.14~dfsg-0.4849
    asterisk-config                   1.4.14~dfsg-0.4849
    asterisk-doc                      1.4.14~dfsg-0.4849
    asterisk-sounds-main              1.4.14~dfsg-0.4849
    zaptel                            1.4.7.xpp.r5178-2
    zaptel-firmware                   1.4.7.xpp.r5178-2
    zaptel-modules-2.6.18-5-k7        1.4.7.xpp.r5178-2+2.6.18.dfsg.1-17 *
    zaptel-source                     1.4.7.xpp.r5178-2

    *) Compiled from zaptel-source using the command
       "m-a a-i zaptel".

    Note: All of these packages are from xorcom.com. Debian etch
    provides v1.2 of the Asterisk and Zaptel packages, which I
    found to be too problematic.


Relevant loaded modules:

    xpp                    89088  0
    vzaphfc                24984  3
    zaptel                185956  10 xpp,vzaphfc
    firmware_class         10048  0
    crc_ccitt               2560  1 zaptel

    Note: The zaptel-modules package includes both the older zaphfc
    and the newer vzaphfc modules. If "genzaptelconf -d" is run, both
    get loaded, which is confusing at best. Therefore, I opted to
    remove the older zaphfc module. I'm not sure the xpp and
    firmware_class modules are necessary either: they also get loaded,
    but don't seem to cause any trouble. Finally, I've found that the
    modules I do need don't work properly unless they get loaded with
    the "genzaptelconf -d" command. I guess that it loads them with
    some parameters.

/etc/asterisk/zapata.conf:

    [trunkgroups]

    [channels]
    context=isdn-in
    language=en
    overlapdial=yes
    rxwink=300
    usecallerid=yes
    hidecallerid=no
    callwaiting=yes
    usecallingpres=yes
    callwaitingcallerid=yes
    threewaycalling=yes
    transfer=yes
    canpark=yes
    cancallforward=yes
    callreturn=yes
    callerid=asreceived
    rxgain=4.5
    txgain=-3
    callgroup=1
    pickupgroup=1
    pridialplan=unknown
    prilocaldialplan=unknown
    nationalprefix=0
    internationalprefix=00
    echocancel=yes
    echotraining=100
    echocancelwhenbridged=yes
    faxdetect=incoming
    immediate=no
    group=1
    switchtype=euroisdn
    signalling=bri_cpe
    channel=>1-2

    Note: I doubt all of these settings are absolutely necessary,
    but this works for me.


Relevant parts of /etc/asterisk/extensions.conf:

    [globals]

    [general]

    [isdn-in]
    exten => isdn-in,1,Goto(0715134449,1)
    exten => 0031715134449,1,Goto(0715134449,1)
    exten => 0715134449,1,Dial(SIP/1000,30)
    exten => 0715134449,n,Hangup()

    [outgoing]
    exten => _003171.,1,Dial(Zap/g1/${EXTEN},,r)

    [internal]
    exten => 1000,1,Verbose(1|Extension 1000)
    exten => 1000,n,Dial(SIP/1000,30)
    exten => 1000,n,Hangup()

    [phones]
    include => internal
    include => outgoing

    Note: In the dial command, "Dial(Zap/g1/${EXTEN},,r)", "g1"
    corresponds to "group=1" in /etc/asterisk/zapata.conf.


/etc/asterisk/indications.conf:

    [general]
    country=nl

    [nl]
    description = Netherlands
    ringcadence = 1000,4000
    dial = 425
    busy = 425/500,0/500
    ring = 425/1000,0/4000
    congestion = 425/250,0/250
    callwaiting = 425/500,0/9500
    dialrecall = 425/500,0/50
    record = 1400/500,0/15000
    info = 950/330,1400/330,1800/330,0/1000
    stutter = 425/500,0/50


Some diagnostic information:

    # cat /proc/zaptel/*
    Span 1: ZTHFC1 "HFC-S PCI A Zaptel Driver card 0 [TE]" (MASTER) AMI/CCS

               1 ZTHFC1/0/1 Clear (In use)
               2 ZTHFC1/0/2 Clear (In use)
               3 ZTHFC1/0/3 HDLCFCS (In use)

    Note: These channels are "(In use)" because Asterisk is using them.


    # cat /proc/interrupts
               CPU0
      0:  218203798    IO-APIC-edge  timer
      6:          3    IO-APIC-edge  floppy
      8:          1    IO-APIC-edge  rtc
      9:          0   IO-APIC-level  acpi
     15:        129    IO-APIC-edge  ide1
    169:   95059844   IO-APIC-level  skge
    177:   10547626   IO-APIC-level  libata
    185:          0   IO-APIC-level  uhci_hcd:usb1, uhci_hcd:usb2, ...
    193: 3923488639   IO-APIC-level  vzaphfc
    201:          0   IO-APIC-level  via82cxxx
    NMI:          0
    LOC:  218195472
    ERR:          0
    MIS:          0


    # asterisk -rx 'zap show channels'
       Chan Extension  Context         Language   MOH Interpret
     pseudo            isdn-in         en         default
          1            isdn-in         en         default
          2            isdn-in         en         default


    # asterisk -rx 'pri show spans'
    PRI span 1/0: Provisioned, Up, Active


Comments welcome.

Cheers,

Jaap



More information about the asterisk-users mailing list