16.09.2019
Posted by 
Installing asterisk on synology server

This area is for more advanced users looking to 'roll-their-own' or do a manual install. If you'd like quick install please see the FreePBX distro page. This section is a continual work in progress by Bryan Walters, Andrew Nagy and Rob Thomas. This Document covers asterisk basic installation on docker. Since till now there is no official asterisk image on Docker hub we will use Debian core to install the asterisk. Prerequisites Linux host to install docker, Internet connectivity and docker account to download docker images. Installing Docker (Ensure your Internet connectivity.

I run a Synology Diskstation network-attached storage (NAS) at home (specifically a model DS114). I use it primarily for backups but it is really a little server so you can do almost anything on it. This is especially true if you run packages written by the community (though Synology publishes very good ones, too). I run CrashPlan on it so things I store on it are backed up to 'the cloud' automatically (see and for instructions).

I've plugged in a cheap-o USB audio adapter, connected it to my stereo, and can run Shairport on it (originally I ran but now run the ). This lets me easily stream audio from my computer to my stereo (using ).

Freepbx

I also connect my USB printer to it so I can print wirelessly.One thing I've often wanted to run on it was Asterisk. Asterisk is a program that manages telephone lines and services (especially VoIP lines). Synology officially provides an Asterisk package that even includes a web GUI (though Digium using it). The problem with this package, however, is that they don't include the chanmotif module, which is necessary for running Google Voice lines with it.While ambitious me usually doesn't stick around too long when he shows up, he was around long enough to try to take the Asterisk source and Synology toolchains from the and rebuild their package from source, this time including chanmotif.

Voip Docker

I remember getting stuck on building some dependencies for my platform and ended up stopping there.Months later I decide to revisit this problem. Looking through SynoCommunity's repository for their tool, I was thinking that maybe this would allow me to more easily create my own Asterisk package.

Further looking led me to find their for using Debian Chroot (I liked, too). What is this?! It's running a second, parallel OS on your Diskstation. (I've run Optware on a PogoPlug v2 and on my Asus Router that had DD-WRT at the time (now Tomato) and I hated it.

Installing

I can't remember why but I remember thinking it was such a pain in the neck. I have had zero desire to run it on my Diskstation from day one. That PogoPlug, by the way, lasted less than 18 months before I chucked it in the garbage. I don't miss it. It all made me want to poke my eyeballs out.

That was a long parenthetical.)So?Well Debian offers their own package of Asterisk that does include the chanmotif module! No rebuilding from source necessary. (Just a simple 'sudo apt-get install asterisk' is all you neeed.) Now we're cooking with.Now I've seen how things like this go and I am telling you right now that I will not become the go-to guy for support when you want to get Google Voice on Asterisk going on your Diskstation. This is what worked for me in early 2016.

May this page go into the rubbish bin of irrelevance and be deemed out-dated not far into the future. I don't care! I have a life to live here, people. I think they get it. Lay off on the attitude a little. (Phrases like 'lay off on' make me love English.))If you want instructions for getting Google Voice going on your Asterisk installation, you can start with but I would recommend the excellent book Asterisk: The Definitive Guide, 4th Edition which covers it in Chapter 18 (beg your library to get it or if you have a Safari subscription, it's there, too).

It's a good book for all things Asterisk.

My apartment building has an old hard-wired Enterphone intercom to buzz visitors in. This poses a slight annoyance since the dependency of the phone line in conjunction with a conventional corded telephone means I have to walk to the phone in order to answer the intercom.Given the low rate of visitors and the small size of my apartment, in retrospect, this isn’t really a big deal. Most normal people would just buy a cheap cordless phone and call it a day.But that only helps if I’m in the apartment.

Synology App

What if I wanted to be able to buzz myself in if I somehow got locked out?My solution Phone line to VoIPI purchased a from eBay which cost about $60. Despite being a discontinued product, it still seems quite readily available online, however, any VoIP gateway device with an FXO port (a phone jack specifically to connect directly to a phone line, not a phone device) would probably do this job (The Obihai Obi110 was another option I read about). This would do the job of converting the incoming intercom phone line to VoIP. Now I needed something to route the incoming now-VoIP call to one or more phones. Call routingis a popular free and open source VoIP PBX software.

A PBX is a system that manages and connects calls within an organization. For example, an office might have a PBX setup with extension lines to each employee’s phone (allowing internal calls among employees), answering incoming calls with an automated menu system, as well as routing outgoing calls from an extension through a standard phone line. Asterisk does this job over IP networks (computer networks).I setup an Asterisk server in a Docker container on my Synology DiskStation, the only computer I have reliably on 24/7.

I found a FreePBX + Asterisk Docker image which would give me both Asterisk and FreePBX, a web-based configuration interface. Setting up the container took quite a while due to various issues. Since Asterisk works better when using host networking, that created port conflicts with the default web/database services on the DiskStation.

I ended up forking the image to my own which allowed me to set custom port numbers. Judul skripsi teknik industri. (I’ll write up some read-me for that Docker image soon)I used FreePBX to create PJSIP extensions for the incoming Enterphone line and my real physical phone. Then, I configured the SPA3102 to “log in” to these extensions.

Installing Asterisk On Synology

I also created some test extensions so that I could also “log in” from my computer and phone. I used soft phone apps and for Mac and iPhone respectively. Next, I created a ring group to ring all of these extensions at once.

Finally, the SPA3102’s dial plan was configured to automatically call this ring group upon receiving an incoming Enterphone call. Concluding thoughtsSo finally with a lot of effort, I was able to get the Enterphone ringing the real phone in my apartment and also any other phone logged into the system.There are some limitations of this setup: Power has to be on, my Synology DiskStation has to be online, Asterisk has to be running, and the SPA3102 has to be online and registered. However, it does give me the freedom of now being able to unlock the front door regardless of where I am.