Custom MOH Classes not applying, Also can't record System Messages from Extension

Good day,

Summary

I can’t change my MOH class, i’ve changed it in inbound routes and on queue. It ignores it and defaults to system music (it saves my choice in the GUI though). Also, I can’t record system recordings by calling my extension - I get the error “originate failed” in the GUI.

Changes I’ve made - probably wrongly to be honest! and permissions are a serious contender as is file positioning (I think).

I’ve SCPd some sound recordings and Music on hold classes from my old Free PBX12 box that needed to be decommissioned, being about 10 years old! I SCP’d to the home directory on the new VPS, logging in as root (couldn’t scp as my standard username) and then cp’d them into position.

The “position”/location that I moved my custom files to:

Music on Hold: /var/lib/asterisk/moh/custom (within there, I have put some of my custom music in directories (for example custom/myclassicalmusic), other custom music files just in the custom directory itself. All of my music files are in .wav format.

Permissions on custom directory /var.lib/asterisk/moh/custom - drwxr-xr-x 12 root root 4096 Mar 15 04:07 custom (I am logged in under my username as opposed to root).

In the GUI, I get an option for the custom directory as opposed to the files within there. This suggests that they should reside alongside the stock files in /moh/ rather than /moh/custom?

Permission on an uploaded example directory residing within custom - drwxr-xr-x 2 root root 4096 Mar 14 12:29 AnarchistRadio

Permission on an uploaded file residing within custom - -rwxr-xr-x 1 root root 2944984 Mar 15 04:06

Custom system recordings: I have uploaded these to: /var/lib/asterisk/sounds/custom
Permissions on my custom recordings - -rwxr-xr-x 1 root root 55884 Mar 14 14:23 - all in .wav format. These play fine.
Permissions on this directory: drwxr-xr-x 2 root root 20480 Mar 14 14:23 custom/

Research on Google hasn’t yielded any results other than a) permissions b) somebody managed to delete some files in a post c) recordings may need to go into an en directory.

Noteably, there was not a custom directory within /var/lib/asterisk/moh/ so I created it - mkdir. Didn’t change any permissions when I created it. I can’t recall whether I created a custom directory within /var/lib/asterisk/sounds. Those files within asterisk/sounds do play though.

Basic Information.

FreePBX Version: 16.0.40.7
Ubuntu Version: 20.04.6 LTS (Focal Fossa)
Running on a VPS (they wouldn’t allow me to install the FreePBX .iso and nor would they pop it on for me.)
Sorry i’m not sure about how to get you useful debug. If you can tell me what you want and how to do it, i’ll update this post of course.

Many thanks.

Two issues - one, files were not owned by Asterisk (they were owned by root) so I chowned them - i’m not even sure if this was technically necessary though because:

Like a silly plank:

  1. I hadn’t realised that in the new updated FreePBX, you can simply upload your music in the GUI. Please note: You’re likely to have to amend your php.ini values (Apache) to allow for larger music files.

  2. I had changed my phone password to a much more secure one and forgot to reconfigure my desk phone with it.

Lessons learnt, never overlook the basics. You never know, this might help someone else!

Re php.ini - MOH file size question

So:

  1. Check files recursively are owned by Asterisk and not root.

  2. New music upload functionality in PBX GUI gets around the issue of SCPing files anyway (in conjunction with ensuring php.ini max upload and max post sizes are high enough (you need to restart apache after doing that)

  3. Always make sure your desk phone is working - particularly when you have two boysterous cats!

Kind Regards.
(this post was made in March 2024).

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.