Asterisk on Fedora Core 3 with single HFC card.
March 18th, 2005
These instructions will show how we’ve successfully installed Asterisk on a Fedora Core 3 Linux Distribution with a HFC isdn pci card. We’re not linux gurus so if you have any suggestion on this installation feel free to drop us a line. This tutorial is protected by Creative Commons license.
Our goals:
- Connect 5 Phones together with their own extension
- Route incoming calls to selected extension.
- Manage our 2-lines ISDN
- Avoid expensive hardware or software
- Integrate personal voicemail
- Integrate fax support
Hardware setup
- A rackmount Machine with AMD Athlon Xp 1800, 512 Mb Ram, Asus A7V880 Motherboard with integrated lan, a 15 Gb ST HDD, a vintage video card, 52x Lg Cd-Rom, and floppy drive. (A sort of recycled machine)
- This Digicom ISDN HFC Card
- 5 GrandStream Budgetone 100
Software Setup
- Fedora Core 3 iso images: disk 1 and 3 only
- Various software from the internet (about 70 mb to download)
- Off course, latest Stable Asterisk
# # # # # # Fedora Setup # # # # # #
Download from a mirror Fedora Core 3 only disk 1 and 3, burn them and perform a minimal installation with automatic disk partition (if you don’t care about the content of your disk, delete all previous partition.).
NOTE: During installation you must provide valid network informations in order to follow these instructions.
Now we’re going to set up the machine in order to install Asterisk and all of its components: login as root and follow these steps (you can copy/paste the commands in your terminal but read carefully what they do)
Import a public gpg key:
rpm --import /usr/share/rhn/RPM-GPG-KEY-fedora
Update installed packages (including kernel, libraries etc):
yum update
If you have anything else to do, it’s the right moment, this operation will take many time, according to your internet connection.
Now reboot your machine, it will boot with the updated kernel (in this case 2.6.10-1.770_FC3) you can test it with:
[root@hermes ~]# uname -r
2.6.10-1.770_FC3
Now we’ll install some required software and we’ll do some kernel related operation:
ALL these packages MUST BE installed
yum install qt-devel
yum install rpm-build
yum install gcc
yum install gcc-c++
yum install redhat-rpm-config
yum install gtk2-devel
yum install ncurses-devel
yum install readline-devel
yum install bison
yum install krb5-devel
yum install openssl-devel
yum install cvs
yum install patchutils
yum install libidn-devel
Yum will solve automatically all dependencies.
Now we must download the kernel source rpm, in this case kernel-2.6.10-1.770_FC3.src.rpm from the updates
mkdir /downloads
wget (url of kernel-2.6.10-1.770_FC3.src.rpm)
Now cd to /downloads directory (or where you downloaded the package) and install the package with:
rpm -Uvh kernel-2.6.10-1.770_FC3.src.rpm
If you get this error
error: cannot create %sourcedir /usr/src/redhat/SOURCES
you must create 2 directories:
mkdir /usr/src/redhat
mkdir /usr/src/redhat/SOURCES
and retry Update the source rpm.
Now move to specs directory
cd /usr/src/redhat/SPECS
open with your favorite text editor the file kernel-2.6.spec
vi kernel-2.6.spec
and change this line to fit as follow:
%define buildup 0
%define buildsmp 0
%define buildsource 1
%define builddoc 0
Save, exit and build your new rpm:
rpmbuild --target i686 -ba kernel-2.6.spec
Let fedora working and don’t stop the process. When it’s done move to i686 dir and update your rpm
cd /usr/src/redhat/RPMS/i686
/kernel-sourcecode-2.6.10-1.770_FC3.root.i686.rpm
Fax Support
Before installing our pbx we’ll install fax support with tiff library. If you are not interested in fax support jump to Asterisk Setup.
Get latest tiff library from Maptools.org (in this case tiff-3.7.2)
cd /usr/src
wget http://dl.maptools.org/dl/libtiff/tiff-3.7.2.tar.gz
tar -zxvf tiff-3.7.2.tar.gz
cd tiff-3.7.2
./configure
make
make install
Get and compile the latest Spand Fax software (in this case 0.0.2pre10) from this ftp server
cd /usr/src
wget (latestspand)
tar -zxvf spandsp-0.0.2pre10.tar.gz
cd spandsp-0.0.2
./configure
make
make install
NOTE: This section is under construction
# # # # # # Asterisk Setup # # # # # #
Get the latest bristuff package from junghanns.net (in this case 0.2.0-RC7k) and unpack it
cd /usr/src
wget (latest bristuff)
tar -zxvf bristuff-0.2.0-RC7k.tar.gz
Now we have to make some changes in order to get asterisk and zap working on fedora:
cd /usr/src
Add these 2 links:
ln -s /lib/modules/2.6.10-1.770_FC3/build/ /usr/src/linux-2.6
ln -s /usr/src/linux-2.6.10-1.770_FC3.root/ /usr/src/linux
edit in your text editor /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"
You must also edit some header files in order to avoid compile errors
in file /usr/src/linux/include/asm-i386/irq.h
at 16 change:
#include "irq-vectors.h" to:
#include "mach-default/irq_vectors.h"
(and not to: #include "mach-default/irq-vectors.h" as said on this tutorial on voip-info.org)
in file /usr/src/linux/include/asm-i386/mpspec.h at line 18 change:
asm/mpspec .h to:
asm/mach-default/mach_mpspec.h
in file /usr/src/linux/include/asm-i386/smp.h at line 71 change:
mach_apicdef .h to: asm/mach-default/mach_apicdef.h
Now we're ready to download and compile asterisk. We'll use the bristuff that will download, patch and compile automatically all packages.
We first need to do some changes in compile.sh file:
cd /usr/src/bristuff-0.2.0-RC7k
vi compile.sh
Change lines 3/4/5/6 from this:
cd zaptel-1.0.6
make clean all
make install
cd ..
to this:
cd zaptel-1.0.6
make clean all
make config
make linux26
make install
cd ..
Change lines 38/39/40/41 from:
cd zaphfc
make clean all
make install
cd ..
to:
cd zaphfc
make clean all
make loadlinux26NT
make install
cd ..
In order to install sample configuration you must uncomment line 55:
change
# make samples
to
make samples
save, exit and launch installation with:
./install
If you don’t recive errors, you have successfully compiled Asterisk.
Music on hold software
We’ll install some packages in order to get music on hold working without mpg123 that has some serious security bugs.
Download and compile Libid3tag, required by madplay
cd /usr/src
wget (latest libid3tag)
tar -zxvf libid3tag-0.15.1b.tar.gz
cd libid3tag-0.15.1b
./configure
make
make install
Download and compile LibMad required by madplay
cd /usr/src
wget (latest LibMad)
tar -zxvf libmad-0.15.1b.tar.gz
cd libmad-0.15.1b
./configure
make
make install
Download and compile Madplay
cd /usr/src
wget (latest madplay)
tar -zxvf madplay-0.15.2b.tar.gz
cd madplay-0.15.2b
./configure
make
make install
To avoid Errors loading shared libraries edit ld.so.conf:
vi /etc/ld.so.conf
add this line:
/usr/local/lib
finally, run ldconfig to create the necessary links and cache.
ldconfig
Fax Add-ons
Download and compile latestsendEmail in order to easily send email with attach from command line.
cd /usr/src
wget (latest SendEmail)
tar -zxvf sendEmail-v1.52.tar.gz
cd sendEmail-v1.52
cp sendEmail /usr/local/bin/
chmod +x /usr/local/bin/sendEmail
cd ..
rm -Rf sendEmail-v1.52
Download my modified version of the modified version of faxmail script and customize it to suit your needs.
mkdir -p /var/lib/asterisk/scripts/
cd /var/lib/asterisk/scripts/
wget http://blog.soolid.it/data/faxmail
chmod +x faxmail
# # # # # # Asterisk Configuration# # # # # #
This section must be improved
zapata.conf
Open file /etc/asterisk/zapata.conf and paste these lines:
[channels]
switchtype = euroisdn
; p2mp TE mode
signalling = bri_cpe_ptmp
;signalling = bri_cpe
; p2mp NT mode
;signalling = bri_net_ptmp
; p2p NT mode
;signalling = bri_net
pridialplan=local
prilocaldialplan=local
echocancel=no
immediate=no
group = 1
context=default
channel => 1-2
This configuration works in my configuration with a isdn box labeled NT1 Plus provided by TELECOM ITALY.
Zaptel.conf
Open /etc/zaptel.conf and paste these lines:
# hfc-s pci a span definition
# most of the values should be bogus because we are not really zaptel
loadzone=it
defaultzone=it
span=1,1,3,ccs,ami
bchan=1-2
dchan=3
Same thing as above: works with my italian isdn configuration.
Define SIP phones – sip.conf
Before using our Budgetone, we must tell to Asterisk server which phones are attached to it, to do that, you must edit the sip.conf file found in the /etc/asterisk/ directory.
cd /etc/asterisk
vi sip.conf
Add these line for each phone you wish to add:
[YourPhoneName]
type=friend
host=dynamic
defaultip=192.168.0.48 ; (change this to your phone’s ip)
dtmfmode=rfc2833
context=local
callerid=”Your phone name”
Save and Exit.
Now take your Budget tone and Plug power and network. Press menu and arrow-down; select “IP Addr.” and press menu again. Now insert your phone’s ip addres (es. 192.168.0.48).
Now open the ip address in your browser (in this case http://192.168.0.48) use password “admin” for first login and make some changes:
SIP Server : Your Asterisk IP address
SIP User ID : Your Phone name
Authenticate ID : Your phone name
Select “Update button” and “Reboot” button. Repeat this step for each phone.
Back to your terminal and open extension.conf file:
cd /etc/asterisk/
vi extensions.conf
add this line under [local]:
; YourPhone1Name
exten => 48,1,Dial(SIP/192.168.0.48/48)
change all “48″ to your extension number and “192.168.0.48 to your phone1 ip and repeat to each phone. Keep in mind to assign different ips and extension numbers to each phone, maybe if you reached this point without errors it’s usefull to say
Staring Asterisk
Ok now we are ready to start. First, plug your isdn cable in your asterisk box and then test if channels works with:
ztcfg -tvv
If you get an output like this:
Zaptel Configuration
======================
SPAN 1: CCS/ AMI Build-out: 399-533 feet (DSX-1)
Channel map:
Channel 01: Individual Clear channel (Default) (Slaves: 01)
Channel 02: Individual Clear channel (Default) (Slaves: 02)
Channel 03: D-channel (Default) (Slaves: 03)
3 channels configured.
Now you are ready to start Asterisk:
asterisk -vvvvvvc
If you dont get any error you are now in the asterisk command line [*cli>], and, you can try to call your internal phone with:
dial 48
Change 48 to your extension number. Your phone should now ring and your asterisk cli prompt you information about call or any error.
Now read more about Dialplan and configure your new Asterisk based PBX.
# # # # # # About this guide # # # # # #
To do’s
- Improve configurations section
- Add fax configuration
- Build Index and chapters for better navigation
Reference
Some guides/howto/forum post that help me to write this guide>
- http://www.bartroos.com/asterisk/ (not updated, for 2.4 kernel only)
- VoIP Wiki about Fedora Core 3
- VoIP Wiki ZapHFC
- Some posts on www.ip-phone-forum.de
- All Voip-info.org in general
- The Asterisk Doc Project
Credits / Copyright
Written by Alberto Alberti
Original, updated, version can be found on blog.soolid.it
Licensed under Creative Commons License.
The Italian Skateboard Championship, renewed
March 4th, 2005
From this year our Italian Skateboard Championship looks like other national championship with a solid backend, a good judges selection (with a training day), better quality events, and better rank management.
This is the new logo i’ve done (off course, it’s not a DeChirico, but all members voted for this one and not any of these)

And this is an “handmade” translation of the press relase:
In the first days of February, during a meeting in Monaco, Germany, has benn officially founded the European Skateboarding Association (ESA).
This Organization will represent the European skateboarding. SkateboardSociety like a co-founder of this association, will be the italian referent for this new “European Federation”.
To integrate all national championship in single european ranking the old Italian Skateboard Championship (in italian CIS, Campionato Italiano di Skateboard) the old system of contests, categories and ranking has been modified.
The goal is uniform the italian contests to the european way. The main idea is to limitate the number of official events elevating the quality. The following lines explain in chapters all the new features:
OFFICIAL JUDGES AND FORMATION
For the first time in italian skateboarding history, there will be a qualification course on 13 of March 2005 at TempleSkatepark near Reggio Emilia. During this day participants will learn the judging methods of WCS (World Cup Skateboarding). This course is free of charge and open to everyone. For more information or subscription: info(at)skateboardsociety.com.
OFFICIAL CONTESTS
Starting from the 2005 edition the Italian Championship disputed in a single category, distinction between sponsored(cat.A) and no-sponsored(cat.B) skater will no longer exixt.
Parallely to the official contest, (few in number and better selected), wiht access through qualifications, there will bee “non Point” or “Recognized” events that grants preferential access to the Official Championship Contest.
Each official event will be disputed as following: Qualification, semi finals, finals.
The skaters that satisfy to these requirement will access directly to the semi finals:
- First 10 sponsored (Cat.A) skaters in general 2004 ranking
- First 5 no-sponsored (Cat.B) skaters in general 2005 ranking
- First 10 skaters in general 2005 ranking, at time of the contest.
- EverySkater (from Italy or outside) allowed to avoid qualifications in european or world circuit
Those who does not satisfy any of these requirements, will have to dispute the contest from the qualifications.
Qualification and semi finals will be disputed as Jam (3/5 skaters in the same run). Will access to the finals, the first 12 skaters of semi-finals. In finals each skater will ride in 2 1-minuted runs. Judges will choose the best one.
“Recognized” also called “non Point”
These contest are for young / new skater, does not replace the “old” no-sponsored (cat.b) category, but act as a benchmark for not-expert athletes.
Each event will be selected by reliability of the organizer and the quality of the skate course.
Each event called “Non-Point campionato italiano” must respect some quality / seriousness requirements in agreement with SkateboardSociety. These events must be judged at least by 3 judges validated by SkateboardSociety. (in other words 3 of 5 judges must have attended the judges course (as written above). Management and promotion of these events are competence of local organizers.
For further informations check the official SkateboardSociety website. To subscribe or request some informations, write to info@skateboardsociety.com.
Google Autolink – Smart Tag
March 1st, 2005
Usefull article by Zeldman about Autolink Feature in the new Google Toolar.