This information is completely out of date. it is here as reference only.
The first effort at completing this with the Pidora Remix had failed. Here we are going to try and complete this with Raspbian as it is native to the Pi.
Download the latest Raspian Wheezy and install it onto an SD Card.
Do the Following:
The Pi Kernel Operations need to be performed before going any futher.
Install prerequisites needed for the build of dahdi and asterisk:
apt-get install libncurses5-dev bison libssl-dev libnewt-dev zlib1g-dev procps gcc make binutils libusb-dev libasound2-dev alsa-oss libpri-dev
While App_Rpt has been created to use Zaptel, up until Kernel version 3.10, it was able to be modified to compile. They have taken some legacy routines out of the kernel which means it will not compile without a major overhaul.
Go to the Asterisk website and download the latest version of Dahdi Complete. By using the latest version we have no conflicting problems with the kernel
wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz
Untar the file:
tar -xzvf dahdi-linux-complete-current.tar.gz
Go into the linux folder inside the Dahdi folder and run:
make make install
Go into the tools folder inside the Dahdi folder and run:
make make install make config
now we need to make sure dahdi will run on boot:
update-rc.d dahdi enable
To free up resources from dahdi, edit the /etc/dahdi/modules and # out all the modules (we do not need any of them).
As we do not want to use the onboard audio driver (and to free up more resources), we need to edit /etc/modules:
sudo nano /etc/modules
Edit the file to look like this:
# /etc/modules: kernel modules to load at boot time. # # This file contains the names of kernel modules that should be loaded # at boot time, one per line. Lines beginning with "#" are ignored. # Parameters can be specified after the module name. #snd-bcm2835 snd_pcm_oss snd_mixer_oss
To download the VKlink version of Asterisk with app_rpt, contact VK3VS via the forum. This is now required as our version of the software has been modified completely from the original Allstar version.
I have modified a version of chan-usbradio.tar.gz This file could be an old version of the file.
We now need to edit the chan_usbradio.c file. Remove any occurences of this string:
&& !defined(AST_BUILDOPT_LIMEY)
This will make sure that chan_usb compiles correctly under the kernel that the pi runs.
cd ~/asterisk/channels nano chan_usbradio.c
You also need to add the following includes at the start of the file:
#include <dirent.h> #include <libgen.h>
This goes between #include <search.h> and #include <linux/ppdev.h> around line 50 or so.
Move into the Asterisk source folder created above. (or trunk/asterisk if using AllStarLink version)
Run the following command:
./configure && make menuselect
When the menu appears, make sure you select app_rpt and chan_usbradio.
After selecting all the items you want, save the changes.
edit the makeopts file to change the architecture:
nano makeopts
There is a line reading PROC=armv6l
Change this to read PROC=arm
. Otherwise it will fail during compile.
Now run:
make && make install && make config
Asterisk should be installed.
To enable asterisk at boot, go to the contrib/init.d/ folder in the Asterisk build folder and run:
sudo cp rc.debian.asterisk /etc/init.d/asterisk
To allow asterisk to start without errors, we need to make some basic config files. Go to the configs folder in the asterisk build folder, and run:
sudo cp *.conf /etc/asterisk
Then depending on which interface you are going to use, go to that folder, for example usbradio and run the same command:
sudo cp *.conf /etc/asterisk
We now need to make users and groups for Asterisk so it does not run as root Run the following commands:
echo "asterisk:x:104:104:Asterisk PBX daemon,,,:/var/lib/asterisk:/bin/false" >> /etc/passwd echo "asterisk:x:104:" >> /etc/group
Now edit /etc/init.d/asterisk and uncomment:
#AST_USER="asterisk" #AST_GROUP="asterisk"
Since the asterisk user can't write to /var/run (and we don’t want it to) we’ll create a place for it’s process id file. Edit /etc/asterisk/asterisk.conf and change:
astrundir => /var/run
to:
astrundir => /var/run/asterisk
Create the new directory and change the owner to the asterisk users:
mkdir /var/run/asterisk && chown asterisk:asterisk /var/run/asterisk
We also have to fix the file ownship on the rest of the places the asterisk user needs to write to:
chown -R asterisk:asterisk /var/log/asterisk chown -R asterisk:asterisk /var/spool/asterisk chown -R asterisk:asterisk /var/lib/asterisk/
You’ll also need to add asterisk to the audio group:
adduser asterisk audio
Reboot the pi and asterisk should magically start.
you now need to change into the sounds folder in the source folder and run the following:
cp * /var/lib/asterisk/sounds
This will copy the required sound file for the repeater application.
In order to make the DSP work correctly, we need to have a big cleanout go the Cleaning Up section for more
Install the packages we need: (this may not be all, but these two will automatically download the rest as dependencies)
sudo apt-get install lighttpd php5-cgi
Enable the fastcgi module and the php configuration with
sudo lighty-enable-mod fastcgi sudo lighty-enable-mod fastcgi-php
Reload the lighttpd daemon
sudo service lighttpd force-reload
To test if it's working create the file /var/www/index.php with the following contents:
<?php phpinfo(); ?>
and check out http://localhost/index.php in your browser.