Live data from Hacker News

RasPBX Installation for Beginners

github.com

11–20 of 27 posts

Re: RasPBX Installation for Beginners

#11
post #10
post #7

Earlier quoted context omitted.

Yes, calling any other EU country from the EU costs a lot. 1 dollar/minute and more. The most expensive plans (50+ dollars a month) usually include 100 EU minutes or so, but not many people have these plans. Data costs vary a lot across the EU. I pay 70 dollars a month for unlimited data with unlimited speed, for example.

That's not true for over two years. Capped by EU at 19 eurocents a minute. And 70 dollars is pretty expensive, I think you should check if there aren't better deals available (I assume it's CZ?) https://ec.europa.eu/commission/presscorner/detail/en/MEMO_1...

Within the EU, you will not pay more for being in a different country.

Data and voice may not cost more when roaming

Re: RasPBX Installation for Beginners

#12

How is this better than just getting a VoIP line in the country you want cheap calls to/from, and installing a SIP softphone app on your phone or computer? Or using something like Signal, where the call is not only better than "HD voice", it's e2ee encrypted? There are other services that offer varying levels of encryption. Does it really cost lots of money to call someone from one part of the EU to another? As an Am…

I run my own XMPP server, and I can literally call anyone anywhere in the world on the XMPP network. End-to-end encrypted. No phone numbers required. For free.

https://blog.wirelessmoves.com/2020/05/xmpp-voice-and-video-...

Re: RasPBX Installation for Beginners

#13

While these tutorials are a great way to teach system administration to those who want to start tinkering, I wish people would put more energy into building well crafted firmware images using frameworks like openembedded or buildroot and teaching people how to use those. Most of the raspbian-based tutorials or images out there treating the raspberry pi like a normal server are just going to trash the SD or fail becau…

That is not for the feint of heart though. Here’s my vendored buildroot for an irc bouncer on an SBC.

https://git.drk.sc/Derecho/irc-sbc-buildroot

Re: RasPBX Installation for Beginners

#14
post #9

While these tutorials are a great way to teach system administration to those who want to start tinkering, I wish people would put more energy into building well crafted firmware images using frameworks like openembedded or buildroot and teaching people how to use those. Most of the raspbian-based tutorials or images out there treating the raspberry pi like a normal server are just going to trash the SD or fail becau…

That sounds actually like a good idea. Do you have a resource on how to get started?

Its true that buildroot/yocto-based immutable images are a lot more resilient and prevent regular sd-card death, for most one-off uses you can get 90% of the way by simply using the "overlay file system" option in raspi-config already built-into the Raspberrypi OS.

Essentially, you start with your Rpi OS, configure it the way you want it - install services etc, and once you are done, just do "sudo raspi-config", select "Performance Options" and under that enable "overlay file system" (also select "read-only /boot" when asked). Reboot when prompted to complete this setup.

This will cause all changes to go to a temporary ramfs - and these changes will be lost on reboot. Most importantly, this means your SDcard won't be written to at all during normal operation. Do note that if you are using one of the older Rpis with 1GB RAM, you might face issues with RAM availability - depending on the amount of changes you make while the overlay is enabled. RPI4 variants with 4GB/8GB ram work really well, though.

If you do need to make persistent changes, just repeat the process starting with "sudo raspi-config", disable the overlay and read-only /boot, reboot, make changes, then renable the overlay. Its is a good idea to do an apt update/upgrade every month of so after disabling overlay.

Another thing you can do is to simply use USB sticks or USB drives as boot media (on RPI4). Those have much better lifetimes than sdcards, and are much faster as well.

While this does not compare to the performance/speed/safety/etc of a fully custom buildroot/yocto image, its a good compromise considering its almost effortless.

Shameless plug: I build such custom OS images for RPI and other SBCs for a living.

Re: RasPBX Installation for Beginners

#15
post #2

I am going to show you, how you can install telephony server Asterisk on a small computer RaspberryPi in order to be able to make calls from your computer or smartphone to ordinary phone numbers. So basically, you will end up literally with your own PBX in your pocket. Actually no, because RaspberryPi needs to be connected to power supply and network, and you would look weird with cables going into your pocket, but y…

I've worked with Asterisk in a former job, but we needed a VOIP provider to make the link to the normal network. But everyone connected to the company Asterisk server could phone with eachother for free, all around the world.

Re: RasPBX Installation for Beginners

#16

How is this better than just getting a VoIP line in the country you want cheap calls to/from, and installing a SIP softphone app on your phone or computer? Or using something like Signal, where the call is not only better than "HD voice", it's e2ee encrypted? There are other services that offer varying levels of encryption. Does it really cost lots of money to call someone from one part of the EU to another? As an Am…

So one of the things you can do with Asterisk and Freeswitch on the PSTN network is hook up a Cisco/Linksys SPA122 adapter or use something more recent. If using a VOIP line, some providers in some countries let you control the VOIP line entirely so you can spoof phone numbers to the PSTN network, and as Asterisk/Freeswitch lets you do things like call record and will send the ringing tones (or what ever you choose to play to someone calling your VOIP line) before you answer it, you can also listen to people talking waiting for you to pick up and answer or direct to a voicebox. In effect you can create a voicebox where you never get charged for leaving a message, ideally for covert activities, legal or otherwise, and its done because of the way the channels are handled. Whilst you are playing the dialling tone back to the caller, you have asterisk/freeswitch setup to record the call from the time the tones are played to the caller, only you never answer and the caller can leave whatever message on the PBX because officially according to internation standards a call was never made and thus charged for. I dont know the legality of it, but it seems to be an exploitable weakness in international standards, for covert activity.

There's lots of things you can do with these and Freeswitch also works on a Pi2B.

You'll find some telco providers have just taken Asterisk or Freeswitch and recoded it enough to class it as their own, but you could run an entire phone company in a country on Asterisk/Freeswitch if the HW is powerful enough.

If you look at the Caller ID standards, the EU standard is based on the old dialup v.23 baud rate. https://en.wikipedia.org/wiki/Caller_ID#Operation https://en.wikipedia.org/wiki/ITU_V.23

So if you want to do some HW hacking, you could start with any old modem and turn it into your own SPA122, and once you have done that you could look at taking an ADSL router and turn it into a SPA122 of sorts. These are just devices with some hw capabilities but could do more.

Re: RasPBX Installation for Beginners

#17
post #14
post #9

Earlier quoted context omitted.

That sounds actually like a good idea. Do you have a resource on how to get started?

Its true that buildroot/yocto-based immutable images are a lot more resilient and prevent regular sd-card death, for most one-off uses you can get 90% of the way by simply using the "overlay file system" option in raspi-config already built-into the Raspberrypi OS. Essentially, you start with your Rpi OS, configure it the way you want it - install services etc, and once you are done, just do "sudo raspi-config", sele…

>Another thing you can do is to simply use USB sticks or USB drives as boot media (on RPI4). Those have much better lifetimes than sdcards, and are much faster as well. >Shameless plug: I build such custom OS images for RPI and other SBCs for a living.

I havent seen anyone using a rpi to usb boot other pi's via a usb hub, do you think thats possible? :-)

Re: RasPBX Installation for Beginners

#18
post #13

While these tutorials are a great way to teach system administration to those who want to start tinkering, I wish people would put more energy into building well crafted firmware images using frameworks like openembedded or buildroot and teaching people how to use those. Most of the raspbian-based tutorials or images out there treating the raspberry pi like a normal server are just going to trash the SD or fail becau…

That is not for the feint of heart though. Here’s my vendored buildroot for an irc bouncer on an SBC. https://git.drk.sc/Derecho/irc-sbc-buildroot

You might want to consider using the BR2_EXTERNAL feature[1] to keep your customizations outside of the buildroot tree.

[1]: https://buildroot.org/downloads/manual/manual.html#outside-b...

Re: RasPBX Installation for Beginners

#19

How is this better than just getting a VoIP line in the country you want cheap calls to/from, and installing a SIP softphone app on your phone or computer? Or using something like Signal, where the call is not only better than "HD voice", it's e2ee encrypted? There are other services that offer varying levels of encryption. Does it really cost lots of money to call someone from one part of the EU to another? As an Am…

> How is this better than just getting a VoIP line ..

Many countries block this, and even make it illegal for international calls. Both for security and financial reasons. Telecom companies around the world have an understanding with other on interconnection charges. Security reason should be obvious - it is easier to track people and collect metadata on foreign calls if everything happens through your network.

E.g. Many countries even block voice calls through Signal, Skype, WhatsApp etc.

Re: RasPBX Installation for Beginners

#20
post #14

Earlier quoted context omitted.

Its true that buildroot/yocto-based immutable images are a lot more resilient and prevent regular sd-card death, for most one-off uses you can get 90% of the way by simply using the "overlay file system" option in raspi-config already built-into the Raspberrypi OS. Essentially, you start with your Rpi OS, configure it the way you want it - install services etc, and once you are done, just do "sudo raspi-config", sele…

>Another thing you can do is to simply use USB sticks or USB drives as boot media (on RPI4). Those have much better lifetimes than sdcards, and are much faster as well. >Shameless plug: I build such custom OS images for RPI and other SBCs for a living. I havent seen anyone using a rpi to usb boot other pi's via a usb hub, do you think thats possible? :-)

That needs the "boot host" rpi to be a usb device or usb otg - afaik, only the pi0 and pi4 have usb otg. These can emulate a usb storage device via the usb gadget subsystem. Additionally, only RPI4 has USB boot capability, and it does not work with all usb devices.

More importantly - something like this can only be hooked up to _one_ boot device, so the usb hub and multiple pi's are a no go. I don't see any advantage compared to just using a usb stick instead of making a rp0/rpi4 pretend to be a usb stick.

You should look into network booting the multiple pi's - if thats suitable for your use case. You will still need an sdcard in each pi to provide the network bootloader, but once the boot is done, the sdcard isn 't used anymore (until the next boot)

Post reply on HN