Zap channel module loading order

rwalker
Posts: 35
Member Since:
2006-11-17

I have a Wildcard TDM400P and Wildcard TE110P in a Trixbox that I have tried with both 2.4 and 2.6. When the machine boots it randomly loads one before the other. So one time it will have the TE110P as Span 1 and the TDM400P as Span 2, then reboot and they are reversed (checking /proc/zaptel/{span #}).

How do I statically define the loading order so it does not do this? I realize one options is going in and disabling all the boot stuff so it doesn't try to redetect on boot, but that seems like a lot of hassle.

Thanks,
Roy



rwalker
Posts: 35
Member Since:
2006-11-17
Things I have tried

I tried moving the "first" card I want loaded to the top of the /etc/modprobe.d/zaptel file and the "second" card to the bottom. Hoping this would give me a more reliable loading order. It is still swapping them randomly. I went through the /etc/init.d/zaptel file and don't see why it would ever load them out of order in the file.

I have another machine with completely different hardware it does the same thing (one is a 845 chipset, other is a 915). So this is not some isolated issue with the hardware.

I have not gone as far as commenting out all the module stuff in the init.d zaptel file and statically loading it in /etc/modprobe.conf. I can't be the only person who has had this problem and I don't want to "break" the way Trixbox works, making upgrades difficult later.

Roy



disgruntled_cli...
Posts: 13
Member Since:
2007-08-28
You're not the only one

I was about to post the same thing and I saw your post. I have a box with a tdm400, an x100p and an x101p card. I recently upgraded to trix 2.4.2 and things seemed at first to work. I don't seem to have any irq issues. I had lots of problems with the 2.2 series. Anyway, I have two fxs modules in the tdm card. (Eventually I will get the fxo modules and replace the 2 x10x cards, but that's for another dat 8-) )The system comes up like this:

Channel map:

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

4 channels to configure.

Sometimes when I reboot I get:

Changing signalling on channel 1 from Unused to FXO Kewlstart
ZT_CHANCONFIG failed on channel 1: Invalid argument (22)
Did you forget that FXS interfaces are configured with FXO signalling
and that FXO interfaces use FXS signalling?

I have to stop asterisk, unload and reload zaptel to get the cards detected in the correct order. Then load asterisk.

I have tweaking with /etc/sysconfig/zaptel and /etc/sysconfig/zaptel.tb and I can't get a consistent loading order.

Hopefully, someone will shine some light on getting them loading in a predictable order.



Joe
Posts: 78
Member Since:
2006-05-31
Could it be an interupt sharing/handling problem

Digium cards are infamous for having interupt sharing/handling problems. Maybe it's just with their older cards, I don't know. If your motherboards have onboard graphics, try turning that off and using a cheap video card. I'm no expert, but if that doesn't help I would experiment with the kernel parameters in "/boot/grub/grub.conf" . Try it with and without "noapic" and with and without "acpi=off". I think you should probably not be using an SMP kernel, also. Try turning off hyperthreading in the BIOS setup if your have a processor and motherboard with this feature. I know that these are kind of stabs in the dark, but you're desperate, right?

One thing I do feel reasonbly sure of is that your problems are more likely to be hardware issues that need to be worked around rather than a configuration error.



rwalker
Posts: 35
Member Since:
2006-11-17
Not a hardware issue

It's not like moving the cards around in different PCI slots changes anything. This is strictly an issue of the zaptel init script and udev not detecting the cards in the same order every time. For a sound card or nic this is easily corrected with either a udev rule to pass an option and control the module loading order, or by statically loading the modules in /etc/modprobe.conf. However, since I don't really want to break my Trixbox setup (would defeat the whole purpose of using it, if I can't upgrade it anymore), I need to find a workable solution without crippling everything around the zaptel stuff.



rwalker
Posts: 35
Member Since:
2006-11-17
The fix! Thanks Digium support!

Edit /etc/modprobe.d/blacklist and add the following lines to the bottom of the file:

# Do not load zaptel modules let the Zaptel init script do it
blacklist pciradio
blacklist tor2
blacklist torisa
blacklist wcfxo
blacklist wct1xxp
blacklist wctdm
blacklist wcte11xp
blacklist wcusb
blacklist ztd-eth
blacklist ztd-ethmf
blacklist ztd-loc
blacklist wct4xxp
blacklist wctc4xxp
blacklist wctdm24xxp
blacklist wcte12xp
blacklist wcfxs
blacklist wctdm8xxp
blacklist wct2xxp



disgruntled_cli...
Posts: 13
Member Since:
2007-08-28
Perfect!

This works perfectly! Thanks a lot!



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.