Random question, but has anyone implemented Music on Hold ( MoH ) for a SIP phone using a pure Linux ( ideally containerized ) solution, without a complete PBX?
I recently weeded out FreePBX ( what a vast and gnarled monstrosity ) and went with straight SIP connections controlled by vendor-specific IVR ( but abstracted because vendors are interchangeable with mostly the same functionality and barely different APIs now ) with highly granular webhooks.
But that just removed Hold Music, which is actually pretty important. It is funny auditing call recordings to hear the reactions to people being on hold for ~90 seconds. Even when there is “comfort noise” ( slight static / white-noise ) generated by the carrier itself, people are still in the background going “hey did the connection die honey?” And you hear the caller have to make a faith-based statement and get all doubtful and concerned. It is pretty much like clockwork.
Anyway! Not a great experience, thus, hold music to let our hearts be stilled. Yes! The connection is still live!
Most SIP phones have a MoH URI which receives a SIP INVITE command with send-only participation once the Hold button is pressed on the phone, which essentially joins the call, but finding a server that supports that almost always leads right back into full-scale PBX systems.
Anyone have a clue of either how to implement one of these, or where there is an easily deployable/containerized implementation of an MoH server?
You can probably setup a Asterisk instance just for MoH without FreePBX. Asterisk supports SIP INVITE with send-only mode so you can inject hold music without being a full PBX.
Configure musiconhold.conf to point to an audio file or stream and setup a simple dial plan in extensions.conf to handle the MoH request. Another option is FreeSwitch which also supports MoH as a standalone service with minimal setup.
If you prefer a more straightforward approach, some SIP devices support RTSP-based MoH which can be served via VLC or Icecast. There are also Dockerized Asterisk or FreeSwitch MoH servers for quick deployment. For Asterisk check out Asterisk.org and the MoH documentation. MusicOnHold - Asterisk Documentation. Hopefully, this is helpful as far as available directions.
Great idea. I totally forgot about vanilla Asterisk
But when I think about FreeSwitch and even Asterisk I immediately think of ~47 year-old design thinking, fixed in >21 years ago.
Feels like booting up a space ship to travel a city block.
Makes me wonder if it is possible/easy to fire-up even a node.js based SIP server that focuses on MoH with something like:
Crystal or other would probably be a better language, but I am thinking within the same Typescript world that the common person can be expected to use.
And a great internship project for a bright young mind
But in the meantime at least I can see Asterisk working, and I appreciate that nudge. Feels extremely heavy for such a tiny ( yet important ) need, but that does seem to be par-for-the-course on SIP still… massive server with a tangle of features written by an engineer without overall design perspective.