Restarting MOH

Home » Asterisk Users » Restarting MOH
Asterisk Users 6 Comments

Hi list,

I’m streaming live mp3 streams (web radios) via mplayer and mpg123 using MusicOnHold. Often, one or two of the streams die during the day and I
have to restart (not reload) Asterisk to bring it back. “moh reload” on the console doesn’t do anything.

This is suboptimal if there are active callers, of course.

Is there any way to restart the MOH system without restarting Asterisk?

Asterisk 10.7.1 and 10.8.0.

Thanks!
Markus

6 thoughts on - Restarting MOH

  • Am 13.11.2012 19:01, schrieb Eric Wieling:

    Great, that works, but only if no caller is listening to MOH at that time. Since *all* my callers are listening to MOH and nothing else, that means for me it’s the same like an Asterisk restart.

    When I try to unload the module I get:

    “loader.c:542 ast_unload_resource: Soft unload failed,
    ‘res_musiconhold.so’ has use count 2”

    Is there a way to force the unloading?

    Any other suggestions?

    Thank you!
    Markus

  • hi,

    try to catch in in a cron job per minute.

    asterisk -rx ‘module unload res_musiconhold.so’

    Markus

    Am 13.11.2012 19:15, schrieb Markus:

  • Hi Markus,

    Am 13.11.2012 20:09, schrieb Markus Weiler:

    there are always users connected to MOH, except at night, so I still would not have a possibility to restart MOH when needed.

    Looks like I’m out of luck …

    Thanks!
    Markus, too