Fixing MusicOnHold problems

Using mpg123

Using mpg123 for streaming you MOH i think its discouraged, you get the following problems while using it:

  • you get this warning inside CallWeaver console/logs:
    Warning, flexible rate not heavily tested!
  • you get this inside the logs:
    res_musiconhold.c:457 monitor_custom_command: Request to schedule in the past?
    again try not to use mpg123 for MoH.

just switch to madplay.

Using madplay

Install madplay and use this in musiconhold.conf:

[default]
mode=custom
directory=/var/spool/callweaver/moh
application=/usr/bin/madplay -Qzr -o raw:- --mono -R 8000 -a -12
format=slin
If you get this problem:
frame.c:1541 opbx_codec_get_len: Unable to calculate sample length for format unknown
probably its because you used “moh reload” during your migration from mpg123 to madplay. To fix this only chance is to issue a “restart” from the CLI.

This problem was not reproducible.