<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.0.4">
</HEAD>
<BODY>
Hello all--<BR>
<BR>
When I bought the TDM400P and the two FXO cards to prototype (small-scale) what could be done with Asterisk, I got a single sheet of paper with the cards, that explained how to insert the card, and fetch the source for asterisk, zaptel, and whatnot. But, before I could get it working, there were a few things that had to be done, that are not explained on the paper!<BR>
<BR>
So, to help the poor newbies who are starting from scratch, I humbly throw in the following two-cents, hoping to ease their pain. Please, feel free to correct anything that I have gotten wrong.<BR>
<BR>
First, the sheet I got is called &quot;Installation Instructions for the TDM400P (1-4 port FXS PCI Interface card)&quot;.<BR>
<BR>
The Instructions are split into &quot;Hardware Installation&quot;, and &quot;Driver and Asterisk Installation&quot;.<BR>
<BR>
There is nothing wrong with either section. Actually, anything to add would be under a third section, &quot;Pulling it all together&quot;.<BR>
<BR>
<FONT SIZE="5"><B>&quot;Pulling It All Together&quot;</B></FONT><BR>
<BR>
<FONT SIZE="4"><B>Interrupt Priority.</B></FONT><BR>
<BR>
On Redhat Linux (and perhaps other brands), you can issue the command:<BR>
<BR>
cat /proc/interrupts<BR>
<BR>
and it will show you how the different hardware devices are assigned to the different interrupt levels or Iterrupt Request numbers, or whatever.<BR>
<BR>
Everything will work better if you have each card you just inserted on its own interrupt number. However, depending on your motherboard/BIOS combination, this may be difficult or impossible to achieve.<BR>
<BR>
You may swiftly find that the machine that will host phone hardware and Asterisk should be dedicated to this purpose, and all unnecessary options provided by the motherboard should be turned off in the BIOS -- at least, anything that requires an interrupt slot.<BR>
<BR>
For MY situation, everything fancy was turned off. USB taking up interrupt slots? Turn them off. Joystick, serial ports, etc? Disable them.&nbsp; The fewer things contending for interrupt slots, the better.<BR>
<BR>
Also, most BIOS setups allow you to assign interrupt numbers to cards, based on the slot you plug them into. Keep to the top slots in the system, closest to the AGP slot.&nbsp; Some have asserted that XT-PIC is an antiquated way to handle the interrupts, but I do not have the kernel option skills necessary to modify this so far. This is what I get:<BR>
<BR>
cat /proc/interrupts<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CPU0<BR>
&nbsp; 0:&nbsp;&nbsp;&nbsp; 18311297&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; XT-PIC&nbsp; timer<BR>
&nbsp; 1:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 39583&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; XT-PIC&nbsp; keyboard<BR>
&nbsp; 2:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; XT-PIC&nbsp; cascade<BR>
&nbsp; 3:&nbsp;&nbsp; 182857694&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; XT-PIC&nbsp; wcfxo<BR>
&nbsp; 5:&nbsp;&nbsp; 183672409&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; XT-PIC&nbsp; eth0, wcfxo<BR>
&nbsp; 8:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; XT-PIC&nbsp; rtc<BR>
10:&nbsp;&nbsp;&nbsp; 182826511&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; XT-PIC&nbsp; wcfxs<BR>
11:&nbsp;&nbsp;&nbsp;&nbsp; 45661576&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; XT-PIC&nbsp; es1371<BR>
12:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 408175&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; XT-PIC&nbsp; PS/2 Mouse<BR>
14:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1688558&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; XT-PIC&nbsp; ide0<BR>
NMI:&nbsp;&nbsp;&nbsp; 0<BR>
ERR:&nbsp;&nbsp;&nbsp; 0<BR>
<BR>
I personally have tried many different arrangements, and this seems the best I can do. I'd like to get the wcfxo card on a different interrupt number than the one that eth0&nbsp; is on, but the system seems adamant about keeping them together. I'm using an MSI board, fairly late model.<BR>
<BR>
I have seen previous mailings, that seem to indicate that it is unwise to put more than 2 or 3 cards into a single machine. So, if you have hundreds or thousands of phones, split them up into groups no larger than what maybe 2 quad-span T1 (or E1) cards can handle (4*24= 96), times 2 is 192 lines per system, right?&nbsp; You'll have to figure out yourself how to split things up from there.<BR>
<BR>
It was suggested I obtain the latest, bleeding edge version of the kernel (nptl?), but I found that version wouldn't run X11 for some reason. So, I use the extent version of RH9, with all the neat RHN patches applied. The audio doesn't work at all, and I don't know why, but we'll leave that alone for now.<BR>
<BR>
<BR>
<FONT SIZE="4"><B>Configuring channels and Order dependency.</B></FONT><BR>
<BR>
I have proven one thing: The order you declare your channels in the zaptel.conf file, and the order you load your modules MATTERS. Do it in the wrong order, and you will have problems. The instructions don't mention much if anything about this little detail.<BR>
<BR>
With this in zaptel.conf:<BR>
<BR>
fxsks=1,2<BR>
fxoks=3-6<BR>
<BR>
I find that I should issue the commands in this sequence:<BR>
<BR>
modprobe wcfxs<BR>
modprobe wcfxo<BR>
ztcfg -v -v -v<BR>
<BR>
Swapping the order of the probes for fxs &amp; fxo will issue error messages when you run asterisk.<BR>
If you run into this sort of channel allocation problem, reverse the order of your modprobes, but reboot between attempts. <BR>
<BR>
And, if all else fails, permute the order of the boards as they are plugged into your PCI slots.<BR>
<BR>
Oh, and even if you get the commands in the right sequence, you will most likely get some error or warning messages from the modprobes and/or the ztcfg... If asterisk runs OK, then these can be ignored.<BR>
<BR>
The existing documentation is very verbose about another possible point of confusion-- FXS hardware is signalled via FXO protocols, and vice versa for FXO hardware. Notice above that the FXS card has 4 ports, and is signalled via FXO signalling. And, the cards from Digium are all Kewlstart. You'll have to really root around on the web site for a while before you are certain of this.<BR>
<BR>
murf<BR>
<BR>
<BR>
</BODY>
</HTML>