SARK V4.0.0 Raspi

From sailpbx
Revision as of 18:45, 27 October 2013 by Adminwiki (talk | contribs) (Seed the CDR database)
Jump to: navigation, search

back to SARK v4.0.0 contents

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 commercial 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 home use or 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.

Raspbian Install

Installing SAIL on your Raspberry pi is easy! Go to http://www.raspberrypi.org/downloads and follow the instructions to install 'Raspbian'. Make sure that your SD Card is at least 4Gb or larger. Depending on the installer you've used, you may need to run raspi-config to expand the Raspbian image to use the whole card.

Once your Rapbian is ready, 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. Now, follow the steps below to install a full function SARK image.

SAIL Install

Set up the sail repo

You can perform these steps with a screen and keyboard if you have them attached to your Pi, but it is much better to use ssh (use Putty if you are working from a Windows desktop). That way you can copy and paste the commands below so there should be less chance of an error.

From the CLI, as root, run the following commands to download and install the public key from the Sail servers and identify the sail repo to Raspbian. Best to copy and paste these commands because if you get 'em just a tiny bit wrong it won't be nice.

if you don't know the root password of your Pi, you can set a new one from the pi user with

sudo passwd root

You can then either log back in as root or become root by typing

su root

First tell your Raspi about the sail repo

wget  http://sailpbx.com/sail/sail-4.0/debs/sail.gpg.key
apt-key add sail.gpg.key
echo deb http://sailpbx.com/sail/sail-4.0/debs/repo/ wheezy main >> /etc/apt/sources.list
apt-get update

Now you can install sail

apt-get install sail

The install will take a good few minutes depending upon the speed of your internet link. During the install you will be asked to enter a root password for MySQL (make a note of it, you'll need it later). You will also be asked to enter the international dial code (IDD) for your country. For example, if you are in the UK, this would be 44. Now, let the install run to its conclusion.

Seed the CDR database

Now you can seed the Asterisk MySQL CDR database with the following command (substitute the MySQL root password you gave during the sail installation).

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

You're done - reboot it

reboot

your sail app will be at http://your.server.ip.address

  • 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 unless you do a full dahdi module install. I'll leave that as an exercise for the reader.

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