this is older information for installation on Trixbox.
Based on instructions from Steve Davies (steve at connection-telecom.com), adapted for later Zaptel release and UK specific BT issues… The instructions below are based on Trixbox 2.2 on an HP Proliant ML110G4 using the B410P as a PSTN gateway, as at 17/07/2007.
Install the B410P hardware.
Install Trixbox as normal, booting to non-SMP kernel at every boot (ie. the kernel that is listed that does not contain the words SMP).
Check for shared interrupts by entering the following:
cat /proc/interrupts
(and)
lspci -vb
If a conflict exists, try moving the card to another PCI slot.
Update Trixbox:
yum –y update
shutdown –r now
After reboot, login, check and make note of version of Asterisk installed:
asterisk –rx 'show version'
For B410P install, use stable 2.6.17 kernel:
cd /usr/src/linux
wget
Unpack kernel:
tar xjf linux-2.6.17.14.tar.bz2
ln -s linux-2.6.17.14 linux
Configure kernel:
cd linux
cat < /boot/config-2.6.9-34.0.2.EL >.config
(remove the spaces between the < and /boot, and EL and >.config - for some reason it wouldn't render properly when posting)
make oldconfig
(and hit enter - a lot! - at all the new options)
Compile and install kernel:
make && make modules_install && make install
(Wait a while for new kernel to build)
Edit grub.conf and make sure new kernel is the default:
nano /boot/grub/grub.conf
("default=0" at the top)
Before rebooting, fetch zaptel and asterisk source...
Fetch latest zaptel:
cd /usr/src
wget
Check again what asterisk version Trixbox is running (asterisk -rx 'show version')
Fetch the source of that same version (1.2.20 at the time of writing):
cd /usr/src
wget
Unpack them:
cd /usr/src
tar xzf zaptel-1.2.19.tar.gz
tar xzf asterisk-1.2.20.tar.gz
Now reboot the box into the new kernel. Once it has rebooted, we need to rebuild Zaptel and build misdn:
cd /usr/src/zaptel-1.2.19
make && make install
/etc/init.d/zaptel start
cd /usr/src/zaptel-1.2.19
make b410p
Configure misdn:
/etc/init.d/misdn-init scan
(should find card)
/etc/init.d/misdn-init config
Edit the misdn config file:
nano /etc/misdn-init.conf
Adjust port settings to be te_ptmp, te_ptp, nt_ptmp or nt_ptp as required. In the UK with BT ISDN2e lines (with 10 DDIs) this was ‘te_ptp’, although some implementations by BT require ‘te_ptmp’. We left everything else in the file as is.
Start misdn and check things look ok:
/etc/init.d/misdn-init start
Set misdn to start on reboot:
chkconfig --add misdn-init
Now we use the Asterisk source we downloaded to build chan_misdn.so and copy it to the /usr/lib/asterisk/modules directory. Doing it this way means we don't disturb existing add-on modules like rxfax etc. This will only work if you make sure the source you downloaded is the
same version as Trixbox had before…
cd /usr/src/asterisk-1.2.20
make clean && make (NOT make install!)
cp channels/chan_misdn.so /usr/lib/asterisk/modules/
Lastly, generate an misdn.conf for Asterisk…
Copy the sample misdn.conf file (change 1.2.20 to the version of Asterisk installed) into the Asterisk config directory:
cp /usr/src/asterisk-1.2.20/configs/misdn.conf.sample /etc/asterisk/misdn.conf
Now edit the misdn.conf config file:
nano /etc/asterisk/misdn.conf
Make the following changes, listed in the order you'll find them in the file:
Just after "[default]", find "context=misdn" and change it to "context=from-pstn"
Change "far_alerting=no" to "far_alerting=yes"
Change ";echocancel=no" to "echocancel=yes" (note the removal of the semi-colon)
Add “echotraining=no” below “echocancel=yes”
At the end of the file, remove everything after “hdlc=no” add the following, changing “ports=” to include the ports you have connected to the ISDN network (eg. 1,2,3,4 or 1,2 or 3,4 as in this case):
[out]
ports=3,4
context=from-pstn
msns=*
If your ISDN lines don't have MSN or DDI numbers, then you also need to:
Change ";immediate=no" to say "immediate=yes" in the [default] section (note removal of the semicolon)
Save the modified file and exit nano.
Now enter Asterisk and load the chan_misdn.so:
asterisk -r
load chan_misdn.so
misdn show stacks
This will also show the ports you have connected – if you have connected them to the wrong ones (eg. you thought you had 1,2 and adjusted misdn.conf as such, but they are in fact 3,4), re-connect accordingly. Lastly, reboot the whole thing and check that all comes up as expected.
Login to the web interface of Trixbox and go into FreePBX – set up an inbound route for ‘any – any’ and send it to an extension. Commit changes, and then run ‘asterisk –r –vvvvvvvvvvvvvvv’ from a shell prompt and call one of your ISDN numbers/DDIs. Check inbound number passed from the provider – in our case (with BT) they only passed the last 6 digits of the DDI. With this information set up inbound routes in FreePBX accordingly, remembering to remove the ‘any – any’ rule.