After few tests i succesfully configured my Nokia E60 to connect to our Asterisk / TrixBox local server. We have a working trixbox server with static ip address and a Nokia E60 with wireless lan configured and already working.
Here what you have to do:
1. Connect via browser to asterisk FreePBX control panel. Select Setup>Extension and create a new sip extension with these settings:

Extension number: [the number you want to set for your nokia "2021" for example]
Secret: [the password you want to set. "pizza" for example]
type: friend
qualify: no
port: 5060
notransfer: yes
host: dynamic
context: from-internal
disallow: all
allow: alaw

If you don’t have FreePBX installed you can add this extension by editing sip.conf file.

2. Now grab your nokia and start to configure it to connect to asterisk.

Open tools > Settings > Conection > Sip Settings and change settings as follow:

Add a new profile by select “use default profile” and add these settings

Profile name: [give a name to your profile
Service profile: IETF
Default access point: [Select your wifi lan from the list]
Public user name: sip:[thenumberyouchose es 2021]@[domain assigned to your phone]
Use compression: No
Regristration: Always on
Use security: No

3. Now enter the Proxy server settings and add:
Proxy server address: sip:[ip of your asterisk server]
Realm: asterisk (this is the default for trixbox but it may be different on other installations)
User name: [your SIP user, 2021 in our example]
Password: [Your password, pizza in our example
Allow loose routing: Yes
Transport type: UDP
Port: 5060

4. Now enter in Registar server and add:
Registrar serv.addr.: sip:asterisk
Realm: -
User name: -
Password: -
Transport type: UDP
Port: 5060

Then navigate to Tools->Settings->Connection->Internet tel. settings: and create a new profile in the Options menu with the following settings:

name: choose a name
SIP profile: previously defined profile

If you did everything correclty you should read a notification message and your phone should be registered on your server, now digit any internal number in your lan, select options>call> internet call and your phone should ring.

Our first Asterisk experience was good and few days ago i decided to update our installation on AMD machine with single HFC ISDN card. Surfing the web i found a new interesting project on sourceforge called Asterix@Home: a CentOs distribution with asterisk, zap, amp and everything else you need to set up a dedicaded, professional and free PBX. This is our installation experience, some goals are changed to the previous version. Hardware is unchanged.

Keep in mind: this is my own experience you follow these howto at your own risk!
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

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

  • Asterisk@home 2.7 (CentOS 4.3 with 2.6.9 Kernel)
  • Working internet connection

# # # # # # I. OS INSTALLATION # # # # # #
Download A@H from a mirror, burn disks, insert it into your machine and set your bios to boot from CDROM. Press enter for boot and go grab a snack, The installer will install linux distribution, reboot and compile asterisk.
Pay Attention, this installation will erase all data on your hard drive.!

After several minuts your sistem will’be ready to login. enter as root using “password” as password.

Type setup on command line and set keyboard, timezone and network in order to fit your system. Enter in system services and unselect zaptel (this will prevent zaptel start at boot).

Exit back to command line and restart network interface with

service network restart

For obvious security reasons change root password with your favorite
passwd

Now launch a system update

yum updatereb

This will update your system’s packages including kernel (in this case to kenel 2.6.9-34.EL)

Reboot your sistem with
reboot

First Step is over

# # # # # # II. Recompile Softwares # # # # # #

Unfortunately A@H package don’t have isdn hfc card built-in support so we need zaphfc driver from bristuff package and Florz patch.

Stop asterisk, and fop server with:
amportal stop

Go to sources directory and download bristuff

cd /usr/src
wget http://www.junghanns.net/downloads/bristuff-0.3.0-PRE-1l.tar.gz
tar -zxvf
bristuff-0.3.0-PRE-1l.tar.gz
Enter uncompressed directory and launch download script, it will download asterisk zaptel etc. from Junghanns website
cd bristuff-0.3.0-PRE-1l
./download.sh

Make sure your /usr/src directory contains symbolic links to current kernel source.
verify your current kernel:

[root@asterisk1 ~]# uname -r
2.6.9-34.EL

Verify symbolic links destination:
[root@asterisk1 ~]# ls /usr/src/ -la
lrwxrwxrwx 1 root root 33 Apr 10 2006 linux -> /usr/src/kernels/2.6.9-22.EL-i686
lrwxrwxrwx 1 root root 33 Apr 10 2006 linux-2.6 -> /usr/src/kernels/2.6.9-22.EL-i686

Replace link with your current kernel source (in this case 2.6.9-34.EL)
rm /usr/src/linux /usr/src/linux-2.6
ln -s /usr/src/kernels/2.6.9-34.EL-i686/ /usr/src/linux
ln -s /usr/src/kernels/2.6.9-34.EL-i686/ /usr/src/linux-2.6

Now, to avoid zaptel compilation erros we need to change a line in kernel sources (spinlock.h), as explained in this bug entry on digium website.

vi /usr/src/kernels/2.6.9-34.EL-i686/include/linux/spinlock.h

At line 407 you'll find something like this:

#define DEFINE_RWLOCK(x) rw_lock_t x = RW_LOCK_UNLOCKED
Change it as follow

#define DEFINE_RWLOCK(x) rwlock_t x = RW_LOCK_UNLOCKED

(you have only to delete underscore "_" on rwlock.)

Save and exit

Now we're going to compile zaptel:

cd /usr/src/bristuff-0.3.0-PRE-1f/zaptel-1.2.3
make clean
make
make install
cd ..

Now we're going to compile libpri

cd /usr/src/bristuff-0.3.0-PRE-1l/libpri-1.2.2
make clean
make
make install
cd ..

Now compile zaphfc
cd /usr/src/bristuff-0.3.0-PRE-1l/zaphfc/
make clean
make
cp zaptel.conf /etc/zaptel.conf

Answer yes to overvrite existent zaptel.conf file

Now we need to configure system in order to set up zaphfc module on boot. This step is a workaround, if you know a better way to do this, let me know.

Open /etc/rc.d/rc.local in your favorite text editor

vi /etc/rc.d/rc.local

Add these lines after comments:

modprobe zaptel
insmod /usr/src/bristuff-0.3.0-PRE-1l/zaphfc/zaphfc.ko
sleep 10
ztcfg -vv

Now you need to configure zapata.conf to fit your requirements (vi /etc/asterisk/zapata.conf). Check Voip.info.org for information and samples. This is our zapata configuration for italian ISDN:

;
; SOOLID ZAPATA CONFIGURATION
;
[channels]
language=it
switchtype=euroisdn
pridialplan=local
prilocaldialplan=local
signalling = bri_cpe_ptmp
rxwink=300
usecallerid=yes
callwaiting=yes
hidecallerid=no
usecallingpres=yes
threewaycalling=yes
callwaitingcallerid=yes
transfer=yes
cancallforward=yes
echocancel=yes
callreturn=yes
echocancelwhenbridged=yes
rxgain=0.0
txgain=0.0
nationalprefix = 0
internationalprefix = 00
faxdetect=incoming
group=0
callgroup=1
pickupgroup=1
immediate=yes
context=from-pstn
channel => 1-2

Finally we have to recompile asterisk.
cd /usr/src/bristuff-0.3.0-PRE-1l/asterisk-1.2.4
make clean
make
make install

Done, now reboot your box, we're going to set up our PBX.

# # # # # # III. Asterisk Configuration # # # # # #

At this point you should have a rebooted linux machine with asterisk running both connected to lan and isdn, one or more ip Phones connected to your local network and a computer with an opened web browser.

Insert news password when prompted.Now open your web browser and point to your machine (in my case http://192.168.0.8 ) and click on the last link "Asterisk Management Portal (AMP)" Insert maint a username and password as password.

[Writing In Progress, sorry]

Login again on your asterisk machine and change all default password with your favorite by running these command:

passwd-amp
passwd-maint
passwd-meetme

# # # # # # IV. About this guide # # # # # #

To do's

  • Add Digital Receptionist configuration

Reference
Some guides/howto/forum post that help me to write this guide

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>