Bananian

FREE Asterisk / FreePBX image for m1 - Bananian (Jessie)

2 2641
blunted  
Edited by blunted at Sep 17, 2016 23:39

I needed a cheap asterisk box for a project, and had two Bpis sitting around.  

There wasnt an freely accessible image with Asterisk/FreePBX for banana pi available . So I built this one.


Details:

Asterisk 13.11.2  
FreePBX version is currently 13.0.188.1

User / Password

root / fr33pbx  


hostname is 'freepbx'


Image download link:

https://mega.nz/#!o10niZAQ!D9zP1 ... G-_eIo4I0KUqE9xtdVE

(796 MB compressed (7zip) , 7.8gig uncompressed IMG file.)

Created with win32discimager, should be able to be written with this or with dd on linux/mac

Just needs the  freepbx install to be run which is very simple.

logged in as root:

cd /usr/src
wget http://mirror.freepbx.org/module ... pbx-13.0-latest.tgz
tar vxfz freepbx-13.0-latest.tgz
rm -f freepbx-13.0-latest.tgz
cd freepbx
./start_asterisk start



meetme conference module needs to be manually started

asterisk -r
module load app_meetme.so
quit

then install freepbx

./install -n

The reason I have included these manual steps,  rather than providing the FreePBX GUI already installed is the install process for FreePBX sets up and secures MySQL for asterisk with unique password etc. If I just supplied a complete image this would be a security problem...


The freepbx admin page (ip address/admin) does NOT work after installing FreePBX so you then need to do the following:

a2enmod rewrite
service apache2 restart

This will fix the problem but cause a "tampered" error in the FreePBX framework module.

To fix the signature issue and redownload the files:

fwconsole chown
fwconsole ma refreshsignatures
fwconsole reload

then <IPADDRESS>/admin will get you to the admin page
Is setup for dhcp , scan or check your router logs for ip address.

This last part is because of  a current bug with FreePBX / Apache - see:

Sourceforge


You will need setup starting asterisk  via rc.local etc (sorry I forgot to do this part before I made the image!)

/usr/sbin/fwconsole start

will manually start



Misc Notes:

This may work with other Bpi models too , don't know I can't test (I only have a couple of M1's here).  Latest Bananian dist so in theory it will , but ymmv.  

XMPP module in freepbx does not work (needs custom Prosody server centos rpm, cant find source for this) but the asterisk module does work so if you need this functionality (like I did) it will mean using the hairy chested asterisk via CLI method (manual configs).

Source etc has been included in image /usr/src for stuff not installed via aptitude etc. This can be deleted if not required.

Some dependancies may need to be installed in bananian for certain freepbx modules to work.

Free free to redistribute this image or host it elsewhere.

I suggest using fail2ban etc and setup a firewall (again that particular freepbx module requires custom rpm). I've left this to peoples personal preferences.

This was done roughly based on the debian 8.1 install instructions at the freepbx wiki. There are more than few issues with following this generic guide on bananian. So I've done all the work for you

It's running great for my purposes, which is a basic IVR with text to speech and some interactive features.
I've built an interactive survey box using much the same setup for a customer recently.






If any of this has been useful, and you'd like to donate a little something for the effort gone into getting this working, and distributing this image .  then there are details below.

This is entirely optional , I don't think its right to put GPL stuff behind a paywall.  

Remember - people who tip are sexy


bitcoin: 1P9rfzJYRWwGCQt8zeDYDutf7mC1fCdnQh
paypal




Thanks for sharing

blunted  
Edited by blunted at Sep 22, 2016 06:18

Just another note , fail2ban doesnt work all that well with the latest versions of asterisk / freepbx.

I've switched to apf and bfd:

https://www.rfxn.com/projects/advanced-policy-firewall/
https://www.rfxn.com/projects/brute-force-detection/

default rules for asterisk work well. I also added a rule to find "Rejected from unknown SIP" messages too.

changing the default SIP port 5060 (sip.conf bindport=) to something else  is also probably not a bad idea given all the scanning going on these days  for sip services.  I got hammered by these until I changed the default.

I've been using flynumber and they dont offer an option to change , just add an iptables redirect to 5060 and NAT it on your router to allow the providers WAN IP only if you have a similar issue.

eg

iptables -t nat -A PREROUTING -i eth0 -p udp --dport 5060 -j REDIRECT --to-ports xxxx

One last issue ive found , mwi external module was also built alongside app_voicemail.so but asterisk defaults to it (duh not very intuitive)

to fix this and get internal voicemail working add

preload = app_voicemail.so


to /etc/asterisk/modules.conf





You have to log in before you can reply Login | Sign Up

Points Rules