Permissions or not permissions?

Hi all,

I installed the AsteriskNow 1.5 Beta 1 and have managed to get the basics working, phones register, calls can be made etc, VM works etc., resolved NAT issues etc. Asterisk is 1.4.22

I moved on to adding Music on Hold and thought this would be simple. It has been anything but.

At first FreePBX was broken when it came to uploading music files so I abandoned that approach. So, directly from the asterisk box, I downloaded some music files into the /var/lib/asterisk/mohmp3 directory which was not there so I created it.

I set the ownership and permissions as follows:

-rw-rw-r-- 1 asterisk asterisk 661632 Jun 27 2007 blues1.mp3
-rw-rw-r-- 1 asterisk asterisk 526785 Jun 27 2007 classical.mp3
-rw-rw-r-- 1 asterisk asterisk 770048 Feb 16 13:58 jazz2.mp3

musiconhold.conf looks like this:

; Music on hold class definitions
; This is using the new 1.2 config file format, and will not work with 1.0
; based Asterisk systems
#include musiconhold_custom.conf
#include musiconhold_additional.conf


When I make a call, the asterisk CLI shows the following

Called 9796
– SIP/9796-09e8e480 is ringing
– SIP/9796-09e8e480 answered SIP/9799-09e8cef0
– Started music on hold, class ‘default’, on SIP/9799-09e8cef0
– Stopped music on hold on SIP/9799-09e8cef0

The start and stop of the music on hold occurs immediately.

The asterisk log shows the following.

[Feb 16 15:44:25] VERBOSE[29127] logger.c: – Called 9796
[Feb 16 15:44:26] VERBOSE[29127] logger.c: – SIP/9796-09e8e480 is ringing
[Feb 16 15:44:29] VERBOSE[29127] logger.c: – SIP/9796-09e8e480 answered SIP/9799-09e8cef0
[Feb 16 15:44:32] VERBOSE[29127] logger.c: – Started music on hold, class ‘default’, on SIP/9799-09e8cef0
[Feb 16 15:44:32] WARNING[29127] file.c: File /var/lib/asterisk/mohmp3/classical does not exist in any format
[Feb 16 15:44:32] WARNING[29127] res_musiconhold.c: Unable to open file ‘/var/lib/asterisk/mohmp3/classical’: No such file or directory
[Feb 16 15:44:32] VERBOSE[29127] logger.c: – Stopped music on hold on SIP/9799-09e8cef0

I know the asterisk user can get to these files, I’ve tested that. I have tried with wav files and since it references it without the extension, tried removing the file extension , no joy.

I thought I would try doing a file convert on the files and convert them to say…gsm.

Here is what that produces

Asterisk 1.4.22, Copyright © 1999 - 2008 Digium, Inc. and others.
Created by Mark Spencer
Asterisk comes with ABSOLUTELY NO WARRANTY; type ‘core show warranty’ for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type ‘core show license’ for details.

Connected to Asterisk 1.4.22 currently running on localhost (pid = 16509)
Verbosity is at least 3
localhostCLI> file convert /var/lib/asterisk/mohmp3/classical.mp3 /var/lib/asterisk/mohmp3/classical.gsm
Unable to open input file: /var/lib/asterisk/mohmp3/classical.mp3

And just for the record moh show files produces the expected result, but minus the file extensions…not sure if that is by design or not.

localhostCLI>moh show files
Class: default
File: /var/lib/asterisk/mohmp3/jazz2
File: /var/lib/asterisk/mohmp3/classical
File: /var/lib/asterisk/mohmp3/blues1

I am more than happy to provide more info if it will help address the issue. I’m doing the old hair pulling routine and need a bit of help, ok a lot of help.

Anyone want to take a stab?