I have an Asterisk server at home I built few years ago. It has an old Intel atom processor running on CentOS 6. It works quite well. I have couple SIP trunks to severial ITSP, including Google Voice. The Asterisk is version 11 LTS and it is a vinilla installation.
The current Asterisk LTS version is 13 and it come with support of PJSIP. I never had a chance to learn PJSIP configuration. And I just happen to have a Raspberry Pi 3 on hand. So I think I should give a try.
First, I load Raspbian on a 8GB micro SD card and boot it up. I try to keep this system clean and tight so I used “Raspbian Jessie Lite” (Release date: 2016-09-23) without Desktop.
After the RPi up and running, set the timezone.
timedatectl set-timezone America/Vancouver
And bring it up to date:
sudo apt-get update
sudo apt-get upgrade
After reboot, start installation as root
I need to use MySQL database to save CDR.
sudo apt-get install mysql-server -y
The database creation and configration is just starand as on other platform. So I just skip them here.
Some dependencies need to be installed:
apt-get install build-essential
apt-get install openssl libxml2-dev libncurses5-dev uuid-dev sqlite3 libsqlite3-dev pkg-config libjansson-dev subversion libiksemel-dev libspeex-dev libssl-dev libmyodbc unixodbc-dev libsrtp0-dev
Installation of Astersik is quite simple:
tar zvxf asterisk-13-current.tar.gz
make -j 4
In order to compile the g729 codec for a Raspberry Pi(ARM processor), the fastest way is to build it with the bcg729. The bcg729 is a software encoder for g729a and decoder library written from scratch.
The resulting codec will be x2 slower than if it has been compiled with IPP, but it’s good enough for my home use.
sudo apt-get install dh-autoreconf
Restart asterisk and log in CLI:
core show translation
It looks good, g729 is on the list!
Time to learn chan_pjsip now.