[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:01:16 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:01 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...
======================================================================
----------------------------------------------------------------------
sunder - 12-17-07 21:01
----------------------------------------------------------------------
NOTE: I did not apply the patch from M11575.diff i used the patch from
10536.
It looks like someone just needs to write the couple of lines of code for
the function 'static int unload_module(void)' becuase when that function is
called it just returns -1. So the module could never be unloaded.
Question?
Is res_musiconhold.so never suppose to be unloaded becuase it would cause
a crash since maybe other modules, channels, apps, resouce are using it.
And to unload the module you would have to hangup that call/channels that
is being using any MOH resource?
Or did no one ever write the code for the unload_moudle() function?
Issue History
Date Modified Username Field Change
======================================================================
12-17-07 21:01 sunder Note Added: 0075614
======================================================================
More information about the asterisk-bugs
mailing list