SARK V4.0.0 Raspi

From sailpbx
Revision as of 20:19, 1 April 2013 by Apmutha (talk | contribs) (Step 3 - install sark)
Jump to: navigation, search

back to SARK Main Page

INTRODUCTION

SARK V4.0.0 can be run for test and evaluation purposes on the low-cost Raspberrypi ARM platform. This platform is NOT recommended for use in a production environment (we suggest you consider the SARK200 commercial ARM-based platform if you require a low-cost/low-power SIP PBX) but it's great for learning SARK in a low cost environment. You'll also be surprised at just how fast the SARK4 browser app runs on the little ARM processor.

Raspi Install

Installing your Raspberrypi is easy! Download and unzip a raspberry wheezy image from http://www.raspberrypi.org/downloads Just imagecopy (use dd under linux) the Raspberrypi "Raspbian" image onto a 4Gb (or larger) SD Card on your development box. Under Ubuntu this might look something like this (assuming the sdcard is at /dev/sdb)...


sudo dd bs=1M if=2013-02-09-wheezy-raspbian.img of=/dev/sdb

Now, insert the SDcard into your Raspi, power it up, and log in using ssh, either from a linux machine or using something like putty if you have a windows machine. You'll probably need to scratch your head and do a bit of detective work to figure out which IP address the little Raspi is running at. The default login is uid=pi pwd=raspberry. Now, follow the steps below to install a full function SARK image.

Step 1 - expand the image to fill the disk

run raspi-config to expand the partition to fill the SD Card

sudo raspi-config
reboot

Step 2 - install SARK prerequisites

log back into your raspi cli and install the pre-reqs


sudo apt-get update
sudo apt-get upgrade
sudo apt-get install asterisk apache2 sqlite3 php5-sqlite php-pear \
xinetd tftpd libio-socket-multicast-perl libapache2-mod-php5 libdbi-perl \
libdbd-sqlite3-perl runit sox mysql-server asterisk-mysql php5-mysql \
nmap zip ntp ssmtp php-net-ipv4 libfile-readbackwards-perl \
shorewall tofrodos dahdi asterisk-dahdi curl
  • specify the mysql root password when it asks
  • specify your country-code for Asterisk when it asks

Now, get a cup of tea; the above takes about 30 minutes to finish...

Step 3 - install sark

You'll need to get the lastest install packs from the sark download servers. Create a directory on your raspi; cd into it and download the software.

mkdir ~/software
cd ~/software
wget sailpbx.com/sail/sail-4.0-testing/raspi/sailhpe_4.0.0-32_armhf.deb
wget sailpbx.com/sail/sail-4.0-testing/debs/sail_4.0.0-56_all.deb

You can now install the files you've downloaded. Their release numbers may well be different from the example below so you'll need to list, copy and paste the actual names of the two files into the command.

sudo dpkg -i sailhpe_4.0.0-32_armhf.deb sail_4.0.0-56_all.deb

Step 4 - set up the cdr database

You need to run the command below to set up the cdr database schema in MySQL. The password you specify will be the root MySQL password you entered during step 2. We usually use a default sql password of sarkroot and that's what we've used in the example but you may have chosen a different password for your setup.

mysql -u root --password=sarkroot < /opt/sark/stat/asterisk-stat-v2/cdr-mysql-setup.sql

Step 5 - have a play and make a few calls

The system is now installed. You can browse to SARK at the IP address of the Raspi. The default access creds are

  • UID = admin
  • PWD = sarkadmin

It's a full V4 install so it will do everything big-sark will do (well, it won't run a 1000+ seat call-centre, but you get the idea). The only thing missing on the Raspi release is a timing source so you can't use the Asterisk conference facility.

You can find more information on V4 elsewhere in this wiki.