[asterisk-bugs] [Asterisk 0011575]: Music on hold / MOH will not reload or unload

noreply at bugs.digium.com noreply at bugs.digium.com
Tue Dec 18 06:53:11 CST 2007


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=11575 
====================================================================== 
Reported By:                sunder
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   11575
Category:                   Resources/res_musiconhold
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
Asterisk Version:           1.4.15  
SVN Branch (only for SVN checkouts, not tarball releases): N/A  
SVN Revision (number only!): 89053 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             12-16-2007 21:04 CST
Last Modified:              12-18-2007 06:53 CST
====================================================================== 
Summary:                    Music on hold / MOH will not reload or unload
Description: 
Asterisk Version 1.4.15
Centos 4.5
res_musiconhold.c Revisions Number: 89053

I Changed the directory in the musiconhold.conf config file. Then in the
asterisk console and typed 'reload' and moh did not reload. Then i typed
'moh reload' and still nothing. Then i tried to unloading the
res_musiconhold.so module and it would not unload and give me an error. 

OLD DIRECTORY: /var/lig/asterisk/moh
NEW DIRECTORY: /var/lib/asterisk/moh-new

A reload and moh reload does nothing

asterisk*CLI> moh reload
  == Parsing '/etc/asterisk/musiconhold.conf': Found
asterisk*CLI> moh  show  files
Class: default
        File: /var/lib/asterisk/moh/fpm-world-mix
        File: /var/lib/asterisk/moh/fpm-sunshine
        File: /var/lib/asterisk/moh/fpm-calm-river
asterisk*CLI> moh classes show
Class: default
        Mode: files
        Directory: /var/lib/asterisk/moh
        Use Count: 0

CONFIG FILE: /etc/asterisk/musiconhold.conf
[default]
mode=files
directory=/var/lib/asterisk/moh-new
random=yes

FULL DEBUG
[Dec 16 20:33:14] VERBOSE[10474] logger.c:   == Parsing
'/etc/asterisk/musiconhold.conf': [Dec 16 20:33:14] DEBUG[10474] config.c:
Parsing /etc/asterisk/musiconhold.conf
[Dec 16 20:33:14] VERBOSE[10474] logger.c: Found
[Dec 16 20:33:14] DEBUG[10474] res_musiconhold.c: Music on Hold class
'default' left alone from initial load.

SIDE NOTE: NO END OF LINE CHARACTER ON THE FIRST DEBUG LINE. THIS NEEDS TO
BE FIXED AS WELL.


[root at asterisk root]# ls -al /var/lib/asterisk/moh-new/
total 31056
drwxr-xr-x   2 root     root         4096 Dec 16 20:32 .
drwxrwx---  12 asterisk asterisk     4096 Dec 16 20:32 ..
-rw-r--r--   1 root     root     31753960 Dec 16 20:32 moh.wav

asterisk*CLI> module unload res_musiconhold.so
Unable to unload resource res_musiconhold.so
[Dec 16 20:44:40] WARNING[10531]: loader.c:494 ast_unload_resource: Firm
unload failed for res_musiconhold.so

And the only was to get the change to take affect is a 'restart now'

After the restart
asterisk*CLI> moh show files
Class: default
        File: /var/lib/asterisk/moh-new/moh
asterisk*CLI> moh show classes
Class: default
        Mode: files
        Directory: /var/lib/asterisk/moh-new
        Use Count: 0


======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0010536 When reloading moh and the directory is...
====================================================================== 

---------------------------------------------------------------------- 
 junky - 12-18-07 06:53  
---------------------------------------------------------------------- 
james: why not use the usecount and if the module is currently in use, do
not unload it. Since with module unload, you can force the unloading anyway
that could be this exact behavior.

And instead of returning an explicit 0, why not returning res from all
unregister functions, like in app_queue (or mainly all apps) ? 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
12-18-07 06:53  junky          Note Added: 0075635                          
======================================================================




More information about the asterisk-bugs mailing list