From: alex Date: Fri, 11 Feb 2022 07:46:22 +0000 (+0100) Subject: Extend phone info X-Git-Tag: 20240214-emacs~590 X-Git-Url: https://xn--ix-yja.es/gitweb/?a=commitdiff_plain;h=c3c3e3c142f8c61844bf47e533cdc9820581c7bd;p=alex.git Extend phone info --- diff --git a/PERSONAL_INFRA.md b/PERSONAL_INFRA.md index bf4d8a3..ced7c28 100644 --- a/PERSONAL_INFRA.md +++ b/PERSONAL_INFRA.md @@ -191,7 +191,40 @@ https://github.com/alexpdp7/gemini_blog ## Phones -I wanted to eliminate my landlines, because I get a ton of spam there. However, I need to provide calls between my home and another home using physical phones, so I set up FreeSWITCH and two GrandStream HT801 devices. +I wanted to eliminate my landlines, because I get a ton of spam there. +However, I need to provide calls between my home and another home using physical phones (people like wireless headsets- smartphones are not really well designed for extended phone calls). + +The key to this is the SIP protocol. +You can get classical phones that work using the SIP protocol, or ATA devices that turn a regular phone into a SIP phone. + +I installed FreeSWITCH from the [OKay repo](https://okay.network/blog-news/rpm-repositories-for-centos-6-and-7.html). +FreeSWITCH comes with a fairly complete default configuration. +By default it will set up extensions in the 1000...1020 range, with a configurable single password for all extensions, plus some extensions for test calls, etc. + +The major difficulty in setting a SIP server is networking. +I run FreeSWITCH in an LXC container on Proxmox. +I expose the SIP server's SSL TCP port to the Internet, plus a range of UDP ports, using iptables. +(I consulted some SIP forums, and apparently there are no major hardening requirements in exposing a SIP server to the Internet, although I think maybe it's better to use a SIP proxy.) +You can also use STUN/TURN servers, but I had lots of trouble getting that set up. +Also by default, FreeSWITCH figures out a public IP- if you want to get FreeSWITCH working behind a VPN, you need to disable that. + +For the phones, I bought and set up two Grandstream HT801 ATA devices. +Those are quite cheap (around 40€), but they are quite fancy professional network devices, with a rough but featureful UI (they can do OpenVPN, SNMP, etc.). +They connect directly to FreeSWITCH over the Internet, autoconfiguring via DHCP, so in theory they could work anywhere in the world with a network connection. +After configuration and assigning an extension, you only need to connect cheap wireless phones to them, and start making calls with the 1000...1020 extensions. + +For testing and occasional calls I use [Baresip](https://github.com/baresip/baresip) from F-Droid in my smartphone, and from Debian in my laptop. +For smartphones, SIP has the drawback that it requires a persistent connection to the SIP server to receive calls- thus draining the battery a bit. +Some SIP setups use push notifications to get around that, but that seemed to be complex. +So the only devices that are connected 24/7 are the ATAs, I use my smartphone and my laptop occasionally. + +SIP allows many other interesting stuff such as: + +* Instant messaging +* Videoconferencing +* Advanced phone features (conferences, barging in, voicemail, automation) + +So you can do real fancy stuff with it, but I haven't looked at it, because really I just need calls over two households on physical classical wireless handsets. ## Possible improvements