Dockerized FreePBX 14(w/ Asterisk 15)

Post Reply
crazyquark
Posts: 316
Joined: Thu Jan 15, 2015 4:22 pm
languages_spoken: english, french, romanian
ODROIDs: C1,C1+,C2,HC1,XU4
Has thanked: 2 times
Been thanked: 4 times
Contact:

Dockerized FreePBX 14(w/ Asterisk 15)

Unread post by crazyquark » Sat Jul 20, 2019 1:51 am

Hi,

I've been trying for a while to get rid of a Raspberry Pi running RasPBX and replace it with a Docker container on one of my Odroids and today I finally managed to do it.
My modified fork of FreePBX Docker image can be found here: https://github.com/crazyquark/freepbx/, use branch armhf.
Image is pushed on Docker Hub as crazyquark/freepbx:14-armhf, see https://hub.docker.com/r/crazyquark/freepbx.

Now I ran this on DietPi but it should work on Ubuntu as well without modification.
If you need chan_dongle like I did, on the host you will need to install package usb-modeswitch and add user group called asterisk with GID 1000 (I just couldn't get Asterisk to run under the dialout group in a sane way).
You will also need to modify udev rules to change the group for the dongle to asterisk, use this rule: https://github.com/crazyquark/freepbx/b ... ngle.rules.

The installation is pretty bare so if you need other things you will have to install them(there is also a problem with the Mailer Daemon which I didn't get into - mailq fails under the user 'asterisk').

Hope this helps.
These users thanked the author crazyquark for the post:
mad_ady (Tue Jul 23, 2019 9:26 pm)

User avatar
odroid
Site Admin
Posts: 32534
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 186 times
Been thanked: 350 times
Contact:

Re: Dockerized FreePBX 14(w/ Asterisk 15)

Unread post by odroid » Mon Jul 22, 2019 8:13 pm

Glad to a fully working FreePBX docker image for ODROID-XU4 series.

Can we build a VOIP/Telephony server with many chan-dongles based on your FreePBX docker something like this?
Image

User avatar
mad_ady
Posts: 6795
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 216 times
Been thanked: 166 times
Contact:

Re: Dockerized FreePBX 14(w/ Asterisk 15)

Unread post by mad_ady » Tue Jul 23, 2019 7:19 pm

Starting to make automated prank calls, or are you branching off in thr telemarketing business?
Who uses phones anyway (ignoring the fact that I work for a telecom giant)?

crazyquark
Posts: 316
Joined: Thu Jan 15, 2015 4:22 pm
languages_spoken: english, french, romanian
ODROIDs: C1,C1+,C2,HC1,XU4
Has thanked: 2 times
Been thanked: 4 times
Contact:

Re: Dockerized FreePBX 14(w/ Asterisk 15)

Unread post by crazyquark » Tue Jul 23, 2019 8:21 pm

I had a disagreement with my ISP and could not get their included landline. Turns out we wanted a landline so.. I made my own.
Though to be fair it's not a real landline because it uses GSM but I can also use trunks from SIP providers.
But mostly because it's fun! (I did not know anything about SIP/VoIP when I first did my setup 2 years ago)

@odroid... humm not sure how chan_dongle handles multiple dongles but why not :). Not sure about the USB bandwidth needed for that many dongles!(not to mention power)
I have pushed a new tag 15-armhf which includes Asterisk 16 and FreePBX 15 but there is a problem with sendmail currently, so use the 14-armhf tag(Asterisk 15 w/ FreePBX 14).
I think I will also try to build FreePBX 14 + Asterisk 16.

Assuming you were not joking :), I would recommend adapting my build script for your own needs: https://github.com/crazyquark/freepbx/

Fun fact, I also tried cross building the image on x86(using buildx from Docker 19) and it was slower than building directly on the Odroid-HC1.
These users thanked the author crazyquark for the post:
odroid (Wed Jul 24, 2019 9:20 am)

User avatar
odroid
Site Admin
Posts: 32534
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 186 times
Been thanked: 350 times
Contact:

Re: Dockerized FreePBX 14(w/ Asterisk 15)

Unread post by odroid » Wed Jul 24, 2019 9:20 am

Sorry.. it was a sort of joke. :oops:

My weekend farm is very in the mountains and landline service is not available.
I just wanted to reuse a few 2G / 3G USB modem dongles for my weekend farm IoT project.

User avatar
mad_ady
Posts: 6795
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 216 times
Been thanked: 166 times
Contact:

Re: Dockerized FreePBX 14(w/ Asterisk 15)

Unread post by mad_ady » Wed Jul 24, 2019 2:18 pm

It may have started as a joke, but you may be on to something. I suspect you want data out of your dongles, right?

There's a way called multilink ppp to bundle several ppp connections (each one running on a different link) into a larger bandwith channel that provides load balancing and fault toleration. We used to configure it for our isdn customers more than a decade ago. Their links were different timeslots on a E1 line.
The same can be done with multiple 3G dongles, linux and some tinkering. You may need to tunnel ppp over udp over each link to create the bundle - and that has some cost in terms of efficiency. For an exit node you'll need some computer to aggregate the links and perform nat. I have no idea what the overhead will be, especially since the links go through different providers and you'll have variable delay...
If you want to give it a try and have signal from multiple providers at your location, I could set-up a test bed and see what is needed.
Last week I was on vacantion in the mountains and the cabin I stayed at was off the grid but provided free wifi over 3G. One 3G link for 25 people, so I understand your pain. Luckly my ssh/mosh sessions coped with low bandwidth quite well... :)

User avatar
odroid
Site Admin
Posts: 32534
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 186 times
Been thanked: 350 times
Contact:

Re: Dockerized FreePBX 14(w/ Asterisk 15)

Unread post by odroid » Wed Jul 24, 2019 3:39 pm

There is an XU4Q board which runs Zonminder with two IP cameras in the farm. But it is an off-line local recording system at this moment.
I want to monitor soil moisture, wildlife invasion, and whether fruits are growing well with some Arduino stuff too.
3mbps/3G prepaid usim card price is around US$10/month in Korea but I will check the real transfer speed in the farm since I couldn't find a base station nearby,

So I thought I need a couple of dongles if the real speed is less than 1mbps.
But, I have no idea how much multiple dongles can increase overall transfer speed.

User avatar
mad_ady
Posts: 6795
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 216 times
Been thanked: 166 times
Contact:

Re: Dockerized FreePBX 14(w/ Asterisk 15)

Unread post by mad_ady » Wed Jul 24, 2019 4:26 pm

Theoretically, if they are from different providers they'll be using different radio channels/different towers and you should get the sum of the individual bandwidths. Would be an interesting research project by itself :) I'll put it on my to-do list, though I wouldn't be using it (so lower priority). One dongle can get you telemetry data just fine, but for video streaming off-site you may need more than one. Are you data capped as well? Actually, if it's prepay you're probably limited in volume.
Sorry for the offtopic @crazyquark!

User avatar
odroid
Site Admin
Posts: 32534
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 186 times
Been thanked: 350 times
Contact:

Re: Dockerized FreePBX 14(w/ Asterisk 15)

Unread post by odroid » Wed Jul 24, 2019 4:32 pm

Right.. too much off-topic.
@crazyquark, Really sorry for my rude hijacking.

I will make a new thread if I decide to use 3G modems for my dumb farming hobby. ;)

crazyquark
Posts: 316
Joined: Thu Jan 15, 2015 4:22 pm
languages_spoken: english, french, romanian
ODROIDs: C1,C1+,C2,HC1,XU4
Has thanked: 2 times
Been thanked: 4 times
Contact:

Re: Dockerized FreePBX 14(w/ Asterisk 15)

Unread post by crazyquark » Wed Jul 24, 2019 7:55 pm

Hey no problem :))
Might I suggest looking into LoRa for sensors monitoring?
and then you need only one internet-connected host to relay that information where you need it.
You could easily build LoRa gateways with Odroids, the sensors themselves would probably need a chip that can connect to a LoRa gateway, I know there is an Adafruit Feather than has this capability, and then there is the Particle Photon thingie but... this is probably more expensive than repurposing existing hardware.

Reading the previous posts it seems what you really want is 3G bandwidth; I went offtopic on the offtopic :D.

User avatar
odroid
Site Admin
Posts: 32534
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 186 times
Been thanked: 350 times
Contact:

Re: Dockerized FreePBX 14(w/ Asterisk 15)

Unread post by odroid » Thu Jul 25, 2019 10:02 am

Thank you for the suggestions.
I think 3G + low power RF sensor nodes seem to be a solution for my application.

Post Reply

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 0 guests