Asterisk, running on one of my Pis, has been giving me grief recently and dropping calls at random times for apparently random reasons. It reports that it loses contact with the gateway, or that after 11 seconds a critical packet wasn’t received (usually on call setup), or that there’s been no RTP traffic, even when I’m talking and the other person can hear me.
So, enter FreeSWITCH and FusionPBX. I’m not a great fan of shell-based installers, but it’s isolated in a LXC container at least, and most of what the installer is doing is installing stuff from the Debian repositories.
Problem 1 – DNS lookups for a UUID
The first problem I ran in to was setting up a Gateway. I filled in all the fields I thought I needed to fill in, but skipped over the Proxy field; the provider I was using said don’t bother with this field. The end result is that FreeSWITCH would try to do SRV and A record lookups for the gateway_uuid field in the database, instead of the gateway field. Turns out the gateway field is just for human consumption. Add a proxy setting (thanks to mcrane on the #fusionpbx channel on FreeNode), and all is good – registrations occur, and I can place an outbound call. mcrane said they’d check why the form didn’t validate the missing proxy field.
Problem 2 – GSM module not included
The GSM module for FreeSWITCH is not included in the default Debian packages that you can download from freeswitch.org. Careful examination of the source tree for FreeSWITCH shows in the debian/ directory that mod_gsmopen is deliberately excluded in bootstrap.sh. This has led me on a merry chase (or not so merry) of trying to get custom Debian packages built, so that I can install the GSM module (to support my USB GSM dongle for inbound calls) from a package – installing from source when the rest is a package is not something I want to try.
Sub-problem 1 – git clone https://freeswitch.org/stash/scm/fs/freeswitch.git pulls down version 1.9.something, while the released packages are for v1.8.2. Easily solved with git clone https://freeswitch.org/stash/scm/fs/freeswitch.git -bv1.8. I’m not a fan of this particular approach, because v1.8 will change over time as the upstream does minor version releases – I’d much prefer to be able to say -bv1.8.2 for instance.
Sub-problem 2 – files.freeswitch.org dropped off the network. This causes problems with the build process, as something has written a MIRRORSITE entry to /etc/pbuilderrc, which in turn breaks pbuilder because it can’t use that URL as a mirror. I’ve been unable to determine what did this, but after removing the line it hasn’t come back.
Sub-problem 3 – Because util.sh had to be edited to find workaround URLs for sub-problem 2 (the util.sh script has several getlib function calls that try to download things like Sphinx and PocketSphinx from files.freeswitch.org), this triggered the unclean repo check. Simple answer – disable the unclean repo check.
Sub-problem 4 – pbuilder is unhappy with a lack of InRelease files for some extra repositories that the FusionPBX installer added. Easy, move those out of the way.
At this point, having gone round and round and round with the build system and trying to work around the FreeSWITCH server being offline, I opted to try again the next day.
With the FreeSWITCH file server back online, even if not serving up the repository, I can at least try a fresh checkout of the 1.8 branch. Getting a 503 now on the 1.8 repo URL, but I don’t think I need that right now to do a build.
debian/util.sh build-all -cstretch
Well, that claimed it had built all the deb files, but I can’t find them anywhere on the machine that’s doing this build. That would be because it actually failed to build the files, but decided to claim that everything was OK. In the log file for the build, “pbuilder-satisfydepends failed”. Heck, the builds-ok.txt file says false.
Something to pick up later; I can live without the GSM dongle for the time being, and instead focus on getting inbound calls to work.