This is a compilation of questions asked in the forums as well as a few other things of general interest.
- What is the performance of Asterisk running on the Raspberry Pi?
- How to configure a static IP address?
- How do I interface the RPi with an analog line from my telecoms provider?
- How do I interface the RPi with an ISDN line from my telecoms provider?
- Uploading of music on hold doesn’t work, how can I fix it?
- Can I install System Admin or any other module that requires Zend Guard Loader?
- How can I run Asterisk without FreePBX?
- How can I get WiFi connectivity on RasPBX?
- How can I compile Asterisk myself?
- How to call anonymously with chan_dongle?
- How to send voicemail in mp3 format?
- How to install Chan_SCCP?
- Can I use the local audio device for console calling?
- How to build a VoiceXML IVR?
- How to upgrade to Asterisk 13?
- Where can I find sample config files?
- How to enable FreePBX dashboard updates?
- How to install g729?
In a typical setup with RasPBX, 10 concurrent calls are possible on a Pi 1. This is also the case for conferences, meaning 10 participants can join a conference. More than 10 calls do work, but audio quality decreases considerably with every additional call. See also:
On all images from 2016 and later edit /etc/dhcpcd.conf:
Insert at the bottom of this file:
interface eth0 static ip_address=192.168.0.10/24 static routers=192.168.0.1 static domain_name_servers=192.168.0.1
Replace the values above with your addresses.
On older images until 2015 edit the file /etc/network/interfaces:
In this file, remove the line
iface eth0 inet dhcp
and insert instead:
iface eth0 inet static address 192.168.0.50 netmask 255.255.255.0 gateway 192.168.0.1 dns-nameservers 192.168.0.1
Replace the values above with your addresses. Then run:
service networking restart
Up to date there is no hardware available that is interfacing with an analog line and can be directly connected to the RPi. Calls have to go over Ethernet using any of the VoIP protocols supported by Asterisk. Devices with a PSTN FXO port translating the analog line to SIP are for example the Linksys SPA3102 or the Obihai OBi110. These can be configured as SIP trunks in Asterisk.
Same answer as above concerning analog lines. A device capable of converting ISDN to SIP is the AVM FRITZ!Box 7170. Newer models such as the 7390 should work as well.
The default Asterisk MOH files are provided in several different formats to avoid transcoding whenever possible. FreePBX only recognizes .wav files and does not delete the other transcodes when deleting a file within the FreePBX GUI. Before uploading new files remove the old MOH files first (or move them to a different location):
cd /var/lib/asterisk/moh rm *.alaw *.g729 *.gsm *.ulaw *.wav
Can I install System Admin or any other module that requires Zend Guard Loader?
Unfortunately no. Zend Guard Loader is closed source and only available on x86 platforms.
If the FreePBX GUI is not needed and should be prevented from overwriting the Asterisk config files, it can be disabled (without deinstalling it):
systemctl disable freepbx
Apache can also be disabled if the GUI is not needed at all:
systemctl disable apache2
This file needs to be downloaded and placed in /etc/init.d/:
chmod 755 /etc/init.d/asterisk systemctl enable asterisk
This is a startup script from contrib/init.d from the Asterisk sources. On reboot, Asterisk starts directly, without using the amportal startup script from FreePBX. After making these changes, a complete reboot is required.
A power supply rated 1A or better 1.2A or more is required to power both the RPi and your WiFi adapter. Alternatively a powered USB hub can also be used.
Before buying a WiFi adapter, make sure it’s on the verified peripherals list:
The following description has been tested with an Edimax EW-7811Un adapter, but should also work in the same way with most of the supported adapters.
Install required packages:
apt-get install wireless-tools wpasupplicant
Edit the file /etc/network/interfaces and add at the bottom of this file:
auto wlan0 allow-hotplug wlan0 iface wlan0 inet dhcp wpa-ssid your-ssid-here-no-quotes wpa-psk "your-passphrase-here-with-quotes"
Then restart your RPi:
Your WiFi connection should show up as wlan0, wlan1, etc. configured with an IP of your network when calling:
A more detailed description can be found here.
Before using your own self-compiled Asterisk on RasPBX, remove the installed asterisk16 or asterisk13 package first:
apt-get remove asterisk13 asterisk16
If you don’t remove it, your changes will be overwritten on the next asterisk16 or asterisk13 package update.
Follow these steps to get the menuselect screen for Asterisk 16:
apt-get install build-essential libsqlite3-dev libxml2-dev libncurses5-dev libncursesw5-dev libmysqlclient-dev libiksemel-dev libssl-dev libnewt-dev libusb-dev libeditline-dev libedit-dev curl libcurl4-gnutls-dev libjansson-dev cd /usr/src/ wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-16-current.tar.gz tar -xvzf asterisk-16-current.tar.gz cd asterisk-* ./configure make menuconfig
Once you have reached the menu, select from Add-ons: res config mysql, app mysql, cdr mysql. When you are done, select Save & Exit.
make make install
Just in case you ever want to revert using the compiled binary package from the RasPBX repository again, you can install it any time with:
apt-get install asterisk16
This will overwrite your own compiled version with the package from the repository.
If you would like to suppress your caller id when calling out through chan_dongle (GSM/3G), edit the file /etc/dongle.conf and change the original setting callingpres=allowed_passed_screen to
By default, voicemail recordings are presented in wav format, encoded with a gsm codec when sent as attachments to emails. These can be sent in mp3 format instead with the following modifications:
In FreePBX, go to Settings – Voicemail Admin. Change the setting format from wav49|gsm|wav to:
As mailcmd enter
Chan_SCCP-b is a replacement Channel Driver for chan_skinny in the Asterisk Channel Driver Library. Detailed information including full documentation can be found on the original Chan_SCCP Website:
Chan_SCCP can be installed directly from the repository:
apt-get update apt-get install chan-sccp-ast16
In case you are still running Asterisk 13, replace the package name chan-sccp-ast16 with chan-sccp-ast13, which is the correct package for Asterisk 13. After installation, sample configuration files can be found in
A valid sccp.conf configuration file has to be created in /etc/asterisk. Please read the original documentation on how to set up and configure Chan_SCCP. Make sure to disable chan_skinny after installing Chan_SCCP, or Asterisk will fail to start.
On the RPi the built-in headphone jack can be used as an audio device to make calls with chan_alsa. First copy the config file:
cp /usr/share/asterisk/configs/alsa.conf /etc/asterisk/
Then follow this tutorial: Overhead Pager over Soundcard
When using a USB sound card for two-way audio, set the desired audio device accordingly in /etc/asterisk/alsa.conf
An advanced application for Asterisk is available from i6net. Read more details here:
On Debian Stretch based images Asterisk 16 is provided as an optional install. Follow these installation steps:
raspbx-upgrade apt-get update amportal stop apt-get purge asterisk13 apt-get install asterisk16 amportal start
Once installed your Asterisk 16 will be continuously updated with patches and security fixes as usual.
Starting with Asterisk 11.18.0 sample config files can be found in:
They can be useful for Asterisk modules that are not configured by FreePBX. Copy the files you need to /etc/asterisk and edit as necessary, but watch out to not overwrite existing files generated by FreePBX.
The FreePBX dashboard scheduler is disabled on RasPBX by default, because it writes lots of data to the Mysql database every minute depending on the configuration. This has previously reduced the lifetime of SD-cards in many cases. On RasPBX the dashboard scheduler is only run once every hour. To enable dashboard updates every minute edit this file:
and set this option
This config file will be processed on the next hourly cron run, which is usually at minute 17 of every hour.
The g729 codec can be installed with
apt-get install asterisk16-codecg729
or for the older Asterisk 13:
apt-get install asterisk13-codecg729
This codec is based on bcg729 from Belledonne Communications.