Asterisk for Raspberry Pi on Raspbian: Difference between revisions

From KlavoWiki
Jump to navigationJump to search
Line 46: Line 46:
<pre>
<pre>
sudo apt-get install vim mlocate zip unzip gcc make hgsvn libssl-dev \
sudo apt-get install vim mlocate zip unzip gcc make hgsvn libssl-dev \
libtiff4-dev libxml2 libsqlite3-dev subversion mysql-server libmysqlclient18 \
libtiff4-dev libxml2 libsqlite3-dev subversion mysql-server mysql-client \
libnewt-dev libuuid1 uuid-dev libxslt1-dev liburiparser1 libncurses5-dev \
libmysqlclient18 libnewt-dev libuuid1 uuid-dev libxslt1-dev liburiparser1 \
libjansson-dev speex libspandsp2 libjansson4 mime-construct sendmail
libncurses5-dev libjansson-dev speex libspandsp2 libjansson4 \
mime-construct sendmail
</pre>
</pre>



Revision as of 00:29, 8 January 2014

If you don't want to follow these instructions and would prefer to download an image you can do so by downloading the image from Asterisk for Raspberry Pi Image.

The following instructions are based on Raspbian (2013-12-20-wheezy-raspbian.zip)

Write Image to SD Card

Using Win32DiskImager and the latest version of Raspbian from Raspberry Pi write the image to the SD card.

Once the image is written insert the SD card into the Raspberry Pi and boot. The device will get an IP address from DHCP.

Update and Configure the OS

Log into the operating system with the default username and password.

Username : pi
Password : raspberry

Run raspi-config and configure all requires settings.

sudo raspi-config

If you have not already done so from raspi-config update the operating system by running:

sudo apt-get update
sudo apt-get upgrade

Set required IP Address

Static_IP_Address_for_Raspbian

Create ll alias

Add the following line

alias ll="ls -la --color --group-directories-first"

to the file /home/pi/.profile

reboot

sudo reboot

Install Utilities and Prerequisites

The following packages are for Asterisk dependencies and utilities to mange the operating system and packages.

sudo apt-get install vim mlocate zip unzip gcc make hgsvn libssl-dev \
libtiff4-dev libxml2 libsqlite3-dev subversion mysql-server mysql-client \
libmysqlclient18 libnewt-dev libuuid1 uuid-dev libxslt1-dev liburiparser1 \
libncurses5-dev libjansson-dev speex libspandsp2 libjansson4 \
mime-construct sendmail

Asterisk

cd /usr/src
sudo wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-12-current.tar.gz
sudo tar xvf asterisk-12-current.tar.gz
cd asterisk-12......

sudo ./contrib/scripts/get_mp3_source.sh
sudo ./configure
sudo make menuselect

sudo make
sudo make install
sudo make samples
sudo make config

sudo ldconfig


logrotate

sudo vi /etc/logrotate.d/asterisk

add the following lines to the file

/var/log/asterisk/messages /var/log/asterisk/*log {
   missingok
   notifempty
   rotate 12
   weekly
   create 0640 root root
   postrotate
       /usr/sbin/asterisk -rx 'logger reload' > /dev/null 2> /dev/null
   endscript
}

logger

sudo vi /etc/asterisk/logger.conf

change from:

;dateformat=%F %T

to

dateformat=%F %T %Z