[Asterisk-doc] Hardware IRQ

Randolph Resnick asterisk-doc@lists.digium.com
Tue, 11 May 2004 12:28:33 +0200


Hi,

I just went through this issue myself two months ago. I have repeated 
this stuff on #asterisk at least 5 times to others who had problems. 
It's basic, but the question comes up often by people like me who bought 
the devel kit. I thought my TDM was a bad board until I got the IRQ set 
up right!

I don't know if there is a format to submit these suggestions, but my 
time is very limited so I hope the following can be of use. I think the 
basic idea is to provide a mini-guide of how to get entry-level hardware 
up and running. Sometimes people (like me) know almost nothing about linux.

If what I'm doing is not the way to post, be gentle and it won't happen 
again :)

------------------------
Chapter 2
Hardware Installation
IRQ sharing issues

additional material:

To free up the most IRQ you can disable USB, serial and parallel port 
support in BIOS.

Note: One thing to watch out for on some mobo is slots *sharing* IRQs. 
Look in the BIOS and check if it has an entry like "1/5" in the IRQ 
table. Most BIOS will allow you to manually assign IRQ to specific slots.

Once booted, do this to see the assigned IRQ:

# cat /proc/interrupts

            CPU0
   0:   41353058          XT-PIC  timer
   1:       1988          XT-PIC  keyboard
   2:          0          XT-PIC  cascade
   3:  413437739          XT-PIC  wctdm <-- TDM400
   4:    5721494          XT-PIC  eth0
   7:  413453581          XT-PIC  wcfxo <-- X100P
   8:          1          XT-PIC  rtc
   9:  413445182          XT-PIC  wcfxo <-- X100P
  12:          0          XT-PIC  PS/2 Mouse
  14:     179578          XT-PIC  ide0
  15:          3          XT-PIC  ide1
NMI:          0
ERR:          0

Above you can see the three Digium cards each on its own IRQ.
If this is the case, then do this:

Here is /etc/zaptel.conf for the three-card setup above :

fxsks = 1,2
fxoks = 3,4,5
loadzone = us
defaultzone = us


#modprobe zaptel
#modprobe wcfxo
#modprobe wcfxs




# ztcfg -vv

Zaptel Configuration
======================


Channel map:

Channel 01: FXS Kewlstart (Default) (Slaves: 01)
Channel 02: FXS Kewlstart (Default) (Slaves: 02)
Channel 03: FXO Kewlstart (Default) (Slaves: 03)
Channel 04: FXO Kewlstart (Default) (Slaves: 04)
Channel 05: FXO Kewlstart (Default) (Slaves: 05)

5 channels configured.

Looks right. Note the FXS signaling on the first two (FXO) cards and FXO 
signaling on the FXS. Now we need to configure asterisk before starting it.

Here is /etc/asterisk/zapata.conf :

[channels]
language=en

; X100P modem card1
context=from-Line1
signalling=fxs_ks
usecallerid=yes
echocancel=yes
echocancelwhenbridged=yes
immediate=no
transfer=yes
cancallforward=yes
echotraining=yes
rxgain=0.0
txgain=0.0
musiconhold=default
channel => 1

; X100P modem card2
context=from-Line2
signalling=fxs_ks
usecallerid=yes
echocancel=yes
echocancelwhenbridged=yes
callwaiting=yes
callwaitingcallerid=yes
callprogress=no
busydetect=yes
busycount=7
immediate=no
threewaycalling=yes
transfer=yes
cancallforward=yes
echotraining=yes
rxgain=0.0
txgain=0.0
musiconhold=default
channel => 2

callerid="Bernie A.H. Sales" <2005>
signalling=fxo_ks
context=inhouse
immediate=no
relaxdtmf=yes
callgroup=1
pickupgroup=1
; if there are groups other than default
; in voicemail.conf the voicemail context name
; must be given for MWI to work
; all users of phones on TDM400 are
; inhouse obviously
mailbox=2000@inhouse
channel => 3

callerid="Judy (Blonde)" <2006>
signalling=fxo_ks
context=inhouse
immediate=no
relaxdtmf=yes
callgroup=1
pickupgroup=1
mailbox=2001@inhouse
channel => 4

callerid="Clueless Boss Alert!" <2007>
signalling=fxo_ks
immediate=yes
; boss picks up phone and rings you!
; This is done in the [theboss] context
; of extensions.conf
context=theboss
relaxdtmf=yes
callgroup=1
pickupgroup=1
mailbox=2002@inhouse
channel => 5