[asterisk-bugs] [Asterisk 0013222]: Asterisk commands "moh reload" or "reload res_musiconhold.so" causes MOH not to work properly

Asterisk Bug Tracker noreply at bugs.digium.com
Fri Aug 8 10:54:43 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13222 
====================================================================== 
Reported By:                urzedo
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   13222
Category:                   Resources/res_musiconhold
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     feedback
Asterisk Version:           1.4.21.2 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2008-08-01 14:27 CDT
Last Modified:              2008-08-08 10:54 CDT
====================================================================== 
Summary:                    Asterisk commands "moh reload" or "reload
res_musiconhold.so" causes MOH not to work properly
Description: 
SIP peer A is calling SIP peer B. When A put B on hold, B starts to listen
to the MOH configured in the parameter "mohsuggest" of the peer A. If I
look at Asterisk's verbose, I can see "Started music on hold..." and
"Stopped music on hold..." stuff while peer A press the hold button.

During the above conversation, if someone runs "moh reload" or "reload
res_musiconhold.so", than peer B is not able anymore to listen to the MOH
when A press the hold button. In the Asterisk's verbose, I cannot see
"Started music on hold..." and "Stopped music on hold..." anymore.

If "moh reload" or "reload res_musiconhold.so" commands are executed
again, than everything starts to work again. And so on...
====================================================================== 

---------------------------------------------------------------------- 
 (0091240) urzedo (reporter) - 2008-08-08 10:54
 http://bugs.digium.com/view.php?id=13222#c91240 
---------------------------------------------------------------------- 
Hi blitzrage,

Let me clarify what actually happens:

- I start Asterisk process, all the config files are read and no errors
are detected;

- All the calls placed have music on hold availble for both legs,
according parameter "mohsuggest" set for each peer (I acctually use only
SIP peers, so this parameter is set in sip.conf file);

- Then, at anytime, someone (via CLI) or something (for exemple, an
external application via asterisk manager interface) issues a "moh reload"
or "reload res_musiconhold.so". All calls placed AFTER the command is
executed cannot hear to the music on hold anymore (the files are still
there);

- Then, someone or something runs "moh reload" or "reload
res_musiconhold.so" again. All calls placed AFTER this last event are able
to listen to the MOH again. And so on.

After a little investigation, we found that there is a little patch
included in version 1.4.11 to fix bug http://bugs.digium.com/view.php?id=10139,
which introduced the piece of
code below, in res_musiconhold.c:

    if (reload) {
      AST_LIST_LOCK(&mohclasses);
      AST_LIST_TRAVERSE(&mohclasses, class, list)
               class->delete = 1;
      AST_LIST_UNLOCK(&mohclasses);
    }

If we remove this entire IF block from this same file in version 1.4.21.2,
the issue I described above does not happen anymore.

Do you see any relation between the problem I found and the patch made to
fix bug http://bugs.digium.com/view.php?id=10139?

Thanks in advance! 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-08-08 10:54 urzedo         Note Added: 0091240                          
======================================================================




More information about the asterisk-bugs mailing list