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

noreply at bugs.digium.com noreply at bugs.digium.com
Mon Dec 17 21:03:57 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-17-2007 21:03 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...
====================================================================== 

---------------------------------------------------------------------- 
 jamesgolovich - 12-17-07 21:03  
---------------------------------------------------------------------- 
musiconhold used to be one of those modules that was unable to be unloaded,
but I think we should be able to unload it now since we can call
ast_uninstall_music_function to unlink the functions.  It might have to
wait until all users are done using it, but we might be able to forcibly
stop it.

I'll play around with it and see what I can come up with to handle the
unload 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
12-17-07 21:03  jamesgolovich  Note Added: 0075615                          
======================================================================




More information about the asterisk-bugs mailing list