login | register
Wed 19 of Nov, 2008 [19:01 UTC]

voip-info.org

Discuss [16] History

Asterisk Fedora Core 3

Created by: lesnet,Last modification on Tue 25 of Apr, 2006 [18:44 UTC] by zishanov
For packages see ATrpms


Setup Instructions for Asterisk using Fedora Core 3.

If you are interested in a more detailed how to, read how to install asterisk on fedora core 3 with single HFC PCI card.


Lesnet Nov 8, 2004

These instructions will show you how to setup Asterisk cvs-head on a Fedora Core 3 machine. The instructions were edited as I performed the Fedora Core Installation and Asterisk Installation.

Started at approximately 21:00hrs, finished at 01:00hrs. And had time to make a chicken stirfry.

The machine I am using is a Compaq 850R.
Dual Processor Pentium Pro 200 MHz 256k Cache
384 Meg Ram
Compaq Array 2/P Battery backed up SCSI Raid 5 Controller
3 Hot Swap 4.3 Gig SCSI Drives.
On Board NIC & Video
(Your typical $150 EBAY Special)

This machine worked excellent with RedHat Enterprise 3, my TDM400P, and Asterisk cvs-head for 4 months. Now it's Fedora Core 3 time.

Acquire and burn ISOs for Fedora Core 3 from http://fedora.redhat.com/download/ or from the Torrent at http://torrent.linux.duke.edu/

Do your basic Linux setup, next, next, etc. next,
- Autopartition
- SELinux Active
- Selected CUSTOM Installation
- Unselected ALL packages (I like minimal installs)

This type of minimal install will only require Disk 1 of Fedora Core 3.

Rebooted system. Logged in via SSH over the Internet, things look fine. (ie: the network works, so we can download Asterisk)

Powered down. Installed my TDM400P with single FXS Module.

Booted system, KUDZU found "Tiger Jet Direct Inc. Tiger3XX Modem/ISDN interface"
- Selected Ignore

Since this was a minimal install, you will be missing some RPMS. You can mount each CD, and copy all your RPMS to /var/rpms if you like, or just the RPMS we need. When you are done with them you can simply delete /var/rpms.


Login as root, ensure the following RPMS exist in /var/rpms

Disk 1
cpp-3.4.2-6.fc3.i386.rpm

Disk 2
cvs-1.11.17-3.i386.rpm
bison-1.875c-2.i386.rpm
e2fsprogs-devel-1.35-11.2.i386.rpm
krb5-devel-1.3.4-7.i386.rpm


Disk 3

glibc-kernheaders-2.4-9.1.87.i386.rpm
glibc-headers-2.3.3-74.i386.rpm
glibc-devel-2.3.3-74.i386.rpm
gcc-3.4.2-6.fc3.i386.rpm
libidn-devel-0.5.6-1.i386.rpm
zlib-devel-1.2.1.2-1.i386.rpm
openssl-devel-0.9.7a-40.i386.rpm

Disk 4

RPMS to install in this order:
cd /var/rpms
rpm -i cvs-1.11.17-3.i386.rpm
rpm -i cpp-3.4.2-6.fc3.i386.rpm
rpm -i glibc-kernheaders-2.4-9.1.87.i386.rpm
rpm -i glibc-headers-2.3.3-74.i386.rpm
rpm -i glibc-devel-2.3.3-74.i386.rpm
rpm -i gcc-3.4.2-6.fc3.i386.rpm
rpm -i bison-1.875c-2.i386.rpm
rpm -i zlib-devel-1.2.1.2-1.i386.rpm
rpm -i e2fsprogs-devel-1.35-11.2.i386.rpm
rpm -i krb5-devel-1.3.4-7.i386.rpm
rpm -i openssl-devel-0.9.7a-40.i386.rpm
rpm -i libidn-0.5.6-1.i386.rpm
rpm -i pkgconfig-0.15.0-3.i386.rpm
rpm -i libidn-devel-0.5.6-1.i386.rpm

MISC STUFF
cd /usr/src
ln -s /lib/modules/2.6.9-1.667/build/ linux-2.6

EDIT /etc/udev/rules.d/50-udev.rules and add
KERNEL="zapctl", NAME="zap/ctl"
KERNEL="zaptimer", NAME="zap/timer"
KERNEL="zapchannel", NAME="zap/channel"
KERNEL="zappseudo", NAME="zap/pseudo"
KERNEL="zap[0-9]*", NAME="zap/%n"

REBOOTED

We're go for Asterisk acquisition and compilation.

Download Asterisk cvs-head
cd /usr/src
export CVSROOT=:pserver:anoncvs@cvs.digium.com:/usr/cvsroot
cvs login - the password is anoncvs.
cvs checkout zaptel asterisk

MAKE ZAPTEL
cd /usr/src/zaptel
make clean
make linux26
make install

and if you want asterisk to start automatically add

make config

MAKE ASTERISK
cd /usr/src/asterisk
make clean
make install
make samples

and if you want asterisk to start automatically add

make config

SIMPLE CONFIG
/etc/zaptel.conf
loadzone = us
fxoks=1

/etc/asterisk/zapata.conf
[channels]
signalling=fxo_ks
language=en
context=incoming
channel => 1

/etc/asterisk/extensions.conf
[general]

[incoming]
exten => _X.,1,Answer
exten => _X.,2,Playback(invalid)
exten => _X.,3,Hangup


STARTING ASTERISK
modprobe zaptel
modprobe wcfxo
ztcfg
asterisk -vvvvvvvvvvvvvvvcg

TESTING
Pickup your handset connected to the FXS port, you should hear a dialtone, then dial 9999. You should hear "I am sorry that is not a valid extension, please try again"


I'm pretty sure I documented everything that I did to install this. I will do a complete fresh install and follow my instructions verbatim perhaps Tuesday to re-verify.



Here's my notes on getting the Zaptel stuff working on Fedora Core 3:

Installation of TDM400P (1-4 port FXS/FXO modules) and X100P on FC3
        with SELinux disabled and all development tools installed

 1.  Make a symlink /usr/src/linux-2.6 -> /lib/modules/`uname -r`/build

 2.  In the shell, do:

     cd /usr/src
     export CVSROOT=:pserver:anoncvs@cvs.digium.com:/usr/cvsroot
     cvs login         — password is "anoncvs"
     cvs checkout zaptel
     cd zaptel

 3.  Copy the designated lines from README.udev into
     /etc/udev/rules.d/<filename>.rules where <filename>
     can be something like "66-zaptel.rules"

 4.  From /usr/src/zaptel, do:

       make clean; make linux26; make install         — for 2.6 kernels

     This will put the *.ko modules in /lib/modules/<version>/misc/, and
     puts entries in /etc/modprobe.conf for all the modules that will
     run /sbin/ztcfg on each module loaded with modprobe.  The /sbin/ztcfg
     program reads /etc/zaptel.conf for config parameters.

 5.  Create /etc/zaptel.conf config file (see below)

 6.  Power down and unplug the PC

 7.  Plug in the cards and attach a power connector to the TDM400

 8.  Power on

 9.  When the hardware checker finds a new "Tiger Jet" device, just
     ignore it.  (Choose "Do nothing" and it should stop bothering you)

10.  Do:
        "modprobe wcfxo" for the X100P, and/or
    "modprobe wctdm" (was "wcfxs", which is now an alias) for the TDM400P.

     If they work, you should see messages like:

    Found a Wildcard FXO: Wildcard X101P              — for the X100P
    Found a Wildcard TDM: Wildcard TDM400P REV E/F    — for the TDM400P

      On the TDM400P, the light turns green next to the jack
      when the module is loaded,
      regardless of whether a phone is plugged in.

The hardware now is set up. However, there is a delay in the
creation of the /dev/zap/* devices after running the modprobes
that should be taken into account when running asterisk.

Doug



To get Zaptel going as a service, you gotta edit the init file (same as fedora core 2 with new kernel, thanks Jean-Yves)

from your Zaptel source folder, do
make config

Edit the file /etc/init.d/zaptel and replace all:
insmod with modprobe
and rmmod with modprobe -r

That's it. Make sure it works by starting the script
/etc/init.d/zaptel start
or just
service zaptel start
doing lsmod should show the wcfxs and zaptel module being installed, and ztcfg should show no errors.
then install and run asterisk as usual.
-IronHelix

Another way to update your init script

The zaptel.init file contained in CVS HEAD (on 20050511, this is r1.12) has been modified to use modprobe as described here, and has had extra modules trimmed from its module list. I am using this successfully in a Fedora Core 3 installation.

To use this version instead of the v1-0 version, check out the HEAD revision of the zaptel package, and then:
cp zaptel/zaptel.init /etc/rc.d/init.d/zaptel

-Alan



Help!: line 146: Unable to open master device '/dev/zap/ctl'

You are probably running udev and don't know it.. were you paying attention during the make? If you were, you would have seen this fly by:
**** Dynamic filesystem detected -- not creating device nodes
**** If you are running udev, read README.udev

If you didn't, try doing a:

[root@localhost zaptel]# make devices


In your zaptel directory and see if it comes up.. If it does, view the suggested README.udev.

Run "udevstart" to re-read the new configuration and to create the zap nodes.

Note: My Fedora Core 3 install which came with a 2.6.9 kernel did just this. If you follow the directions in README.udev, you will fix this.

See also:



Comments

Comments Filter
222

333Re: Working But Error logs in /var/log/messages

by lingolep, Saturday 04 of March, 2006 [04:57:06 UTC]
sandeep did you solve those errors? If thats a fedora core 3 installation you have, try rpmfind.net to look for a newer udev. Running ``rpm --upgrade udev-039-10.FC3.8.i386.rpm'' seemed to resolve those messages.


222

333FC3 Linux kernel 2.6.12-1.1372_FC3

by mensaiq, Tuesday 19 of July, 2005 [06:18:18 UTC]
After installing the updated kernel.i686 at 2.6.12-1.1372_FC3, I could no longer compile zaptel using "make linux26". It appears that they changed the way that "/lib/modules/2.6.12-1.1372_FC3/build" directory gets updated, and it has been moved. I had to install module "kernel-devel.i386" to get everything to compile again.
222

333Working But Error logs in /var/log/messages

by sandeep_a_s, Thursday 07 of April, 2005 [06:57:45 UTC]
Thanks for this post.Was usefull very much .
Dial in and Dial out through ZAP Interface is working .But /var log messages show this .
(Ihave TDM400P with 4FXO modules )
either wait_for_sysfs (udev 03 9) needs an update to handle the device '/class/zaptel/zap1' properly (no device  symlink) or the sysfs-support of your device's driver needs to be fixed, please  report to 
either wait_for_sysfs (udev 03 9) needs an update to handle the device '/class/zaptel/zap2' properly (no device  symlink) or the sysfs-support of your device's driver needs to be fixed, please  report to 
either wait_for_sysfs (udev 03 9) needs an update to handle the device '/class/zaptel/zap3' properly (no device  symlink) or the sysfs-support of your device's driver needs to be fixed, please  report to 
either wait_for_sysfs (udev 03 9) needs an update to handle the device '/class/zaptel/zap4' properly (no device  symlink) or the sysfs-support of your device's driver needs to be fixed, please  report to 
what would be the reason ?




222

333What about no FX?/PRI hardware

by nethab, Friday 25 of March, 2005 [23:15:50 UTC]
I don't have nor do I want any extra hardware in my system. I have external sip gateway devices and sip service providers. What steps and packages can I skip when installing fedora.
222

333Asterisk installation on Fedora Core 3 with one HFC PCI Card

by Alberto[at]soolid, Friday 25 of March, 2005 [08:50:11 UTC]
I wrote a step by step guide to get asterisk up, running and configured on Fedora Core 3 with a HFC ISDN pci card.

you can read it here http://blog.soolid.it/?p=16
222

333This page has saved my life

by , Thursday 17 of February, 2005 [00:04:26 UTC]
Thanks to all the people who posted this. I just installed Fedora Core 3 on a HP ProLiant ML110 with a Digium TE405P and it's working great thanks to all the info I gathered from here. I compiled everything like it says here, installed the service, modified it with a pause between modprobe zaptel and modprobe wtc4xxp, and another between that and ztcfg, and now it boots to asterisk being ready to receive calls with an IVR I setup.

BTW this is deployed inside a cellphone company in the Dominican Republic. So the calls come from cellphones, through two T1's (that was also very interesting because ISDN is not supported here and SS7 is not suported by asterisk - the middle ground was D4, AMI and supposedly E&M wink on their side but I had to set it up as featdmf on asterisk, and the caller ID comes in as the called extension...)
222

333Timing is Critical re /dev/zap/ctl

by , Tuesday 08 of February, 2005 [19:51:09 UTC]
I too hit the problem of /dev/zap/ctl not being available when I upgraded to FC3. It's the udev stuff that creates devices on-the-fly. The problem is that when the zaptel module is loaded, it takes up to 5 seconds for the udev daemon to actually create the /dev/zap/ctl device. Unfortunately the startup script (/etc/init.d/zaptel) immediately runs the ztcfg command, before the device is ready.

Solutions: (1) manually run the "service zaptel reload" command after boot, as it just re-reuns the ztcfg command and by now the device is ready or (2) add a "sleep 5" command in your /etc/init.d/zaptel script just before ztcfg is run. Both fixed my problem.

222

333Compilation caveat

by , Monday 31 of January, 2005 [20:59:52 UTC]
A really brief note on the (great) installation instructions that I'm embarassed to say tied me up.

I installed OS, downloaded zaptel and asterisk as directed. I had a minor problem with one of the X100Ps (IRQ conflict, I think) and so restarted without completing the zaptel compilation / 'make install' in order. Installed and config'd asterisk with internal SIP phones to test installation and went back and fixed the zaptel installation second.

Everything seemed to be fine: zttool & /proc/zaptel reported devices were OK, configs were stock (as per examples), asterisk was working fine, but I couldn't get either dial-tone on the FXS channel phones or get a response from asterisk on dial-in on the FXO channel.

I figured out finally that the chan_zap.so hadn't been compiled during the asterisk install (due to the unsatisfied dependency on the initial zaptel compile). This is easily verified in asterisk itself using the zap * commands (ie 'zap show channels') - if they're not there / not available, it's not installed.

A simple re-compile/install (in order!) of zaptel and asterisk patched everything up nicely and didn't even disrupt the config files. Sorry about doubting you, asterisk.

Chris
222

333Re: Fedora Core 3 compile errors

by mensaiq, Tuesday 18 of January, 2005 [04:43:09 UTC]
This also happened to me when upgrading from FC2 to FC3. Installing the libidn-devel-0.5.6-1.i386.rpm package fixed it.
222

333Fedora Core 3 compile errors

by , Tuesday 28 of December, 2004 [03:21:16 UTC]
Installing the Fedora Core 3 using Custom install and add software development, I was still unable to compile asterisk. Gave the following compile error while running a make.
"/usr/bin/ld: cannot find -lidn". After some research found that I needed the libidn and libidb-devel packages which were missing. Anyway I was sucessful in completing the make, now about to run make install and make sample.