[asterisk-users] debian/dahdi/zaphfc - Unable to receive TEI from network!

Alex alex at massive.ch
Fri Oct 1 05:37:05 CDT 2010


Hello,

The harddisk of my etch/bristuffed asterisk1.2 box finally died. I moved
the cheap (1397:2bd0) HFC-S card to a squeeze host (i686) and built
dahdi modules 2.3.0.1 using m-a. After zaptel->dahdi and asterisk
1.2->1.6 config adaptations, everything seems ok, except for the BRI
side, unable to bring layers 1/2 up.

Asterisk reports:
chan_dahdi.c:12393 dahdi_pri_error: 1 Unable to receive TEI from network!

deskpro*CLI> pri show spans
PRI span 1/0: Provisioned, Down, Active

Of course, trying to dial out using the channel results in:
app_dial.c: Unable to create channel of type 'DAHDI' (cause 34 -
Circuit/channel congestion)

I'm a little puzzled as to what's wrong, as I didn't change anything on
the ISDN side compared to my very stable etch setup: same HFC-S card
working in TE-mode, same bri_cpe_ptmp signalling, same NT1, I even
reused the same cable. I tried the force_l1_up=1 kmod parameter, without
seeing any change. I tried using fcshdlc instead of hardhdlc with no
luck. I even swapped the NT1 with a new one, also without result. Any
pointers on how to debug this TEI assignment
problem are welcome.

I have an plain ISDN phone that's also connected to the NT1's S-bus
which works fine. I can swap the cables between the phone and HFC-S card
or disconnect the phone, it doesn't change anything.

OS-level and asterisk-level stuff looks as per my expectations (which
may be misguided...). The only strange thing is the warn_slowpath_common
warning when loading zaphfc module, but I'm not sure whether this is
relevant as people seem to have a working setup despite seeing this
warning. Can anyone confirm that this is not relevant?

I include some info on my setup below. I can also provide config files
for the previously running etch/asterisk1.2 setup, if requested.

Thanks for any help

  alex

--------------------
(I filtered out stuff that's IMHO non-relevant)

# dmesg
[    7.795103] WARNING: at
/usr/src/modules/dahdi/drivers/dahdi/dahdi-base.c:5866
dahdi_register+0x39/0x296 [dahdi]()
[    7.795110] Hardware name: Deskpro
[    7.795115] Modules linked in: zaphfc(+) dahdi snd_intel8x0(+)
snd_ac97_codec ac97_bus crc_ccitt snd_pcm snd_timer parport_pc i2c_i801
snd shpchp parport soundcore processor button pcspkr evdev i2c_core
pci_hotplug snd_page_alloc rng_core ext3 jbd mbcache dm_mod raid1 md_mod
sd_mod crc_t10dif ata_generic uhci_hcd ata_piix ehci_hcd e100 libata
usbcore thermal floppy mii nls_base scsi_mod thermal_sys [last unloaded:
scsi_wait_scan]
[    7.795201] Pid: 429, comm: modprobe Not tainted 2.6.32-5-686 #1
[    7.795207] Call Trace:
[    7.795231]  [<c103014d>] ? warn_slowpath_common+0x5e/0x8a
[    7.795241]  [<c1030183>] ? warn_slowpath_null+0xa/0xc
[    7.795252]  [<e0d48d47>] ? dahdi_register+0x39/0x296 [dahdi]
[    7.795275]  [<c126b4e3>] ? printk+0xe/0x13
[    7.795296]  [<e0d7bc34>] ? hfc_probe+0x8db/0xb64 [zaphfc]
[    7.795309]  [<e0d7bd1c>] ? hfc_probe+0x9c3/0xb64 [zaphfc]
[    7.795334]  [<c1145895>] ? local_pci_probe+0xb/0xc
[    7.795343]  [<c11461df>] ? pci_device_probe+0x41/0x63
[    7.795359]  [<c11b2306>] ? driver_probe_device+0x8a/0x11e
[    7.795368]  [<c11b23da>] ? __driver_attach+0x40/0x5b
[    7.795378]  [<c11b1d49>] ? bus_for_each_dev+0x37/0x5f
[    7.795386]  [<c11b21d9>] ? driver_attach+0x11/0x13
[    7.795395]  [<c11b239a>] ? __driver_attach+0x0/0x5b
[    7.795403]  [<c11b1811>] ? bus_add_driver+0x99/0x1c5
[    7.795412]  [<c11b260b>] ? driver_register+0x87/0xe0
[    7.795422]  [<c10e8e5f>] ? proc_register+0xf8/0x142
[    7.795431]  [<c11463b0>] ? __pci_register_driver+0x33/0x89
[    7.795442]  [<e0d7f000>] ? hfc_init_module+0x0/0x30 [zaphfc]
[    7.795451]  [<c100113e>] ? do_one_initcall+0x55/0x155
[    7.795461]  [<c1057135>] ? sys_init_module+0xa7/0x1d7
[    7.795475]  [<c10030fb>] ? sysenter_do_call+0x12/0x28
[    7.795482] ---[ end trace c3edff8cea26edee ]---
[    7.799466] vzaphfc: card 0: resetting
[    7.816194] vzaphfc: card 0 configured for TE mode at mem 0x40100000
(0xe0d84000) IRQ 18
...
[   17.835509] dahdi_transcode: Loaded.
[   17.865454] dahdi_echocan_oslec: Registered echo canceler 'OSLEC'
[   18.851312] dahdi: Registered tone zone 30 (Switzerland)
[   18.851372] vzaphfc: card 0: chan B1: TX FIFO has become empty
[   18.851381] vzaphfc: card 0: chan B1 opened as ZTHFC1/0/1.
[   18.851413] vzaphfc: card 0: chan B1 closed as ZTHFC1/0/1.
[   18.851434] vzaphfc: card 0: chan B2: TX FIFO has become empty
[   18.851440] vzaphfc: card 0: chan B2 opened as ZTHFC1/0/2.
[   18.851455] vzaphfc: card 0: chan B2 closed as ZTHFC1/0/2.
[   18.851476] vzaphfc: card 0: chan D opened as ZTHFC1/0/3.
[   18.851486] vzaphfc: card 0: chan D closed as ZTHFC1/0/3.
[   25.788850] vzaphfc: card 0: chan B1 opened as ZTHFC1/0/1.
[   25.789108] vzaphfc: card 0: chan B2 opened as ZTHFC1/0/2.
[   25.789512] vzaphfc: card 0: chan D opened as ZTHFC1/0/3.

a single module handles the card (after I blacklisted hfcpci):
# lspci -vv
02:09.0 Network controller: Cologne Chip Designs GmbH ISDN network
controller [HFC-PCI] (rev 02)
        Subsystem: Cologne Chip Designs GmbH ISDN Board
        Flags: bus master, medium devsel, latency 16, IRQ 18
        I/O ports at 1040 [disabled] [size=8]
        Memory at 40100000 (32-bit, non-prefetchable) [size=256]
        Capabilities: [40] Power Management version 1
        Kernel driver in use: vzaphfc

IRQ is not shared:
# cat /proc/interrupts
  18:    4930240   IO-APIC-fasteoi   vzaphfc

# dahdi_hardware
pci:0000:02:09.0     zaphfc+      1397:2bd0 HFC-S ISDN BRI card

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

           1 ZTHFC1/0/1 Clear (In use) (SWEC: OSLEC)
           2 ZTHFC1/0/2 Clear (In use) (SWEC: OSLEC)
           3 ZTHFC1/0/3 Hardware-assisted HDLC (In use)
(that's with asterisk running)

# cat /etc/dahdi/system.conf
span=1,1,0,ccs,ami
bchan=1-2
hardhdlc=3
echocanceller=oslec,1-2
loadzone        = ch
defaultzone     = ch

# dahdi_cfg -vvvv
DAHDI Tools Version - 2.2.1.1

DAHDI Version: 2.3.0.1
Echo Canceller(s): OSLEC
Configuration
======================

SPAN 1: CCS/ AMI Build-out: 0 db (CSU)/0-133 feet (DSX-1)

Channel map:

Channel 01: Clear channel (Default) (Echo Canceler: oslec) (Slaves: 01)
Channel 02: Clear channel (Default) (Echo Canceler: oslec) (Slaves: 02)
Channel 03: Hardware assisted D-channel (Default) (Echo Canceler: none)
(Slaves: 03)

3 channels to configure.

Setting echocan for channel 1 to oslec
Setting echocan for channel 2 to oslec
Setting echocan for channel 3 to none

# lsmod
dahdi_echocan_oslec     1038  2
echo                    2988  1 dahdi_echocan_oslec
dahdi_transcode         3798  0
dahdi                 175978  9 dahdi_echocan_oslec,dahdi_transcode,zaphfc
crc_ccitt               1039  1 dahdi

# dahdi_test
Opened pseudo dahdi interface, measuring accuracy...
99.994% 99.986% 99.993% 99.991% 99.992% 99.991% 99.993% 99.990%
99.992% 99.986% 99.992% 99.992% 99.993% 99.992% 99.992% 99.992%
99.991% 99.992% 99.993% 99.992% 99.992% 99.992% 99.992% 99.992% ^C
--- Results after 24 passes ---
Best: 99.994 -- Worst: 99.986 -- Average: 99.991602, Difference: 99.991601

# cat /etc/asterisk/chan_dahdi.conf
[trunkgroups]
[channels]
language=fr
switchtype=euroisdn
...
group=1
signalling=bri_cpe_ptmp
context=from-isdn
channel => 1-2

deskpro*CLI> pri show spans
PRI span 1/0: Provisioned, Down, Active

deskpro*CLI> dahdi show status
Description                              Alarms  IRQ    bpviol CRC4
Fra Codi Options  LBO
HFC-S PCI A ISDN card 0 [TE]             OK      0      0      0
CCS AMI  YEL      0 db (CSU)/0-133 feet (DSX-1)

deskpro*CLI> dahdi show channels
   Chan Extension  Context         Language   MOH Interpret
Blocked    State
 pseudo            default                    default
      In Service
      1            from-isdn       fr         default
      In Service
      2            from-isdn       fr         default
      In Service





More information about the asterisk-users mailing list