[asterisk-users] Problems with zaptel and HFC-S PCI card

Jaap Winius jwinius at umrk.to
Fri Dec 28 12:12:00 CST 2007


Hi list,

Now that I've got my Asterisk server to recognize my HFC-PCI card, I've run
into some serious problems. The first thing I noticed was this message
that would show up every five seconds on the CLI:

    Dec 27 15:46:42 WARNING[12484]: chan_zap.c:2512 pri_find_dchan: No
    D-channels available!  Using Primary channel 3 as D-channel anyway!
      == Primary D-Channel on span 1 down

Second, the syslog and the kern.log were quickly filling up with messages
like these:

Dec 27 16:52:53 bitis kernel: zaphfc: sync lost, cpu throtteling enabled.
Dec 27 16:52:53 bitis kernel: zaphfc: sync lost, pci performance too
low. you might have some cpu throtteling enabled.
Dec 27 16:52:53 bitis last message repeated 31 times
Dec 27 16:52:53 bitis kernel: zaphfc: bchan rx fifo not enough bytes
to receive! (z1=4069, z2=4062, wanted 8 got 7), probably a buffer
overrun.

Asterisk doesn't even have to be running for this to happen, but it  
can be brought to a halt by unloading the zaphfc module. I'm not aware  
of any CPU throttling on this system (an AMD Athon running at 1100 MHz).

The OS is Debian etch running Linux kernel 2.6.18 (-5-k7). I've  
installed asterisk and asterisk-bristuff 1.2.13~dfsg-2etch2, as well  
as zaptel and zaptel-source 1.2.11.dfsg-1 to compile the necessary  
modules.

My current configuration is as follows:

cat /proc/zaptel/*

   Span 1: ZTHFC1 "HFC-S PCI A ISDN card 0 [TE] layer 1 ACTIVATED (F7)" AMI/CCS

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

I think TE mode is fine, since I only need it to connect an outside  
line. Internally, I plan (hope) to use only SIP phones.

/etc/asterisk/zapata.conf :

    [trunkgroups]

    [channels]
    language=en
    context=isdn-in
    switchtype=euroisdn
    pridialplan=local
    prilocaldialplan=unknown
    nationalprefix = 0
    internationalprefix = 00
    overlapdial=yes
    signalling=bri_cpe_ptmp
    rxwink=300
    usecallerid=yes
    hidecallerid=no
    callwaiting=yes
    usecallingpres=yes
    callwaitingcallerid=yes
    threewaycalling=yes
    transfer=yes
    canpark=yes
    cancallforward=yes
    callreturn=yes
    echocancel=yes
    echocancelwhenbridged=yes
    echotraining=yes
    rxgain=4.5
    txgain=-3
    group=1
    callgroup=1
    pickupgroup=1
    immediate=yes
    #include zapata-channels.conf

Incidentally, this needs to work in the Netherlands.

/etc/asterisk/zapata-channels.conf

    switchtype = euroisdn
    signalling = bri_net
    channel => 1-2

To connect to an outside line, I think "signalling" may need to be set  
to something else, but I'm not sure. The genzaptelconf shell script I  
used to produce it is buggy, so for all I know these settings may be  
wrong or even incomplete.

/etc/asterisk/modules.conf

    [modules]
    autoload=yes
    noload => pbx_gtkconsole.so
    noload => pbx_kdeconsole.so
    noload => app_intercom.so
    noload => chan_modem.so
    noload => chan_modem_aopen.so
    noload => chan_modem_bestdata.so
    noload => chan_modem_i4l.so
    noload => chan_capi.so
    load => res_musiconhold.so
    noload => chan_alsa.so
    [global]

I've so far made no changes to extensions.conf to use the ISDN card.

The linux modules zaptel, xpp and zaphfc get loaded automatically, but I
haven't figured out yet from where. I'm thinking the zaphfc module may need
to be loaded with a few (extra?) parameters before it starts behaving itself.

Any help would be most welcome.

Thanks!

Jaap



More information about the asterisk-users mailing list