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?
- Where is the SILK codec enabled in FreePBX?
- 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?
In a typical setup with RasPBX, 10 concurrent calls are possible. 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):
update-rc.d freepbx remove
Apache can also be disabled if the GUI is not needed at all:
update-rc.d apache2 remove
This file needs to be downloaded and placed in /etc/init.d/:
chmod 755 /etc/init.d/asterisk update-rc.d asterisk defaults
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 asterisk11 package first:
apt-get remove asterisk11
If you don’t remove it, your changes will be overwritten on the next asterisk11 package update.
Follow these steps to get the menuselect screen:
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 cd /usr/src/ wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-11-current.tar.gz tar -xvzf asterisk-11-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.
Edit the file res/pjproject/config.status and replace every occurence of ccar with ar and ccranlib with ranlib. Then continue:
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 asterisk11
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 (make sure upgrade #15 is installed):
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
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.
in FreePBX open Settings – Asterisk SIP Settings, scroll down to Other SIP Settings, and enter
allow = silk8
Possible bandwidths include 8, 12, 16 and 24, add appropriate allow statements for each bandwidth you want to use.
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:
Run this command to install the Asterisk VoiceXML interpreter (latest upgrades required):
Asterisk 13 is provided as an optional install. It will be included by default soon, in one of the next image updates. A Debian Jessie based image (Feb. 2015 or later, older images are not suported) is required. Follow these installation steps:
raspbx-upgrade apt-get update amportal stop apt-get purge asterisk11 apt-get install asterisk13 amportal start
Once installed your Asterisk 13 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.