MOH problem

Asterisk 1.8.15-cert1 built by xxx@xxx on a x86_64 running Darwin on 2013-03-08 22:27:13 UTC
Running on a Mac Mini running OSX Mountain Lion
I am using asterisk-gui for most tasks in the system, but I have also spent plenty of time in the raw config files themselves.
Using ulaw codec for everything.

So, the problem is that when a caller is placed on Hold, they do not hear the music, just silence. There are no errors at all on the console (with a -vvv verbosity level). The call is not dropped. The call can be “resumed” without a problem.

In order to narrow down the problem, I have done the following:

  1. The problem happens whether the call comes from outside (via a trunk) or internal extension-to-extension dialing.
  2. I created a test extension 2000 that just answers the call and plays music on hold and the music IS heard whether the source is internal or external.
exten => 2000,1,Answer()
exten => 2000,2,MusicOnHold()
  1. I use the “m” option on the DIal() function and the caller hears the music while the line is ringing.
  2. My physical phones are all Cisco IP phones (two 7970’s and one 7975), but I also used the Zoiper softphone app on my MacBook Pro and when I press Hold on the softphone the caller also does not hear the music, so I have ruled out it being a problem with the phones and how they treat the “hold” softkey.

Everything else on my new phone setup is working perfectly. I have 3 incoming/outgoing call trunks, voice mail, and IVRs.

musiconhold.conf

[default]
mode = files
directory = /var/lib/asterisk/sounds/moh

The directory exists and is readable. It contains one file, moh1.wav, which is an 8000khz, mono WAV file. Please remember that I can hear the WAV file play in any case except when an existing call is placed on hold.

Let me know if I have left anything out or if you have any other questions. Thank you so much for reading and helping me figure this out!

I had that problem with the ZOIPER softphone randomly, Music on hold works fine on X-LITE but not on ZOIPER.

Zoiper is the softphone I tested on, but I’m also having the problem with my Cisco phones. It’s not intermittent, either. :frowning:

What does the console log show at at least verbosity 3, preferably 5?

Nothing shows at verbosity 3. I didn’t know it could go higher. :smile: Stay tuned.

You should be seeing a line for each dialplan line executed, and the following for music on hold, at verbosity 3. If you don’t see the former, you should debug your log settings before continuing;

res/res_musiconhold.c: ast_verb(3, "Started music on hold, class '%s', on %s\n", class->name, ast_channel_name(chan)); res/res_musiconhold.c: ast_verb(3, "Started music on hold, class '%s', on channel '%s'\n", class->name, ast_channel_name(chan));

I do see those lines in my log. I posted my logs in the OP. With my Cisco phones, I see the “started” line, then the “stopped” line, then the “started” line again. With a softphone (Zoiper), I only see the “started” line, but the music does not play for either type of phone.