[Asterisk-bugs] [Asterisk 0010123]: MusicOnHold() drops the channel if the specified class does not exist

noreply at bugs.digium.com noreply at bugs.digium.com
Fri Jul 6 14:01:59 CDT 2007


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=10123 
====================================================================== 
Reported By:                blitzrage
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   10123
Category:                   Resources/res_musiconhold
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     feedback
Asterisk Version:           1.4.5 
SVN Branch (only for SVN checkouts, not tarball releases): N/A  
SVN Revision (number only!):  
Disclaimer on File?:        Yes 
Request Review:              
====================================================================== 
Date Submitted:             07-05-2007 14:37 CDT
Last Modified:              07-06-2007 14:01 CDT
====================================================================== 
Summary:                    MusicOnHold() drops the channel if the specified
class does not exist
Description: 
Subject pretty much says it all. Easiest fix is probably just to fall back
to the 'default' MoH class. This would also assume 'default' existed,
although if it didn't, then we can just drop the channel... or
alternatively, continue on in the dialplan (with the former being preferred
I guess since it won't change any behaviour)
====================================================================== 

---------------------------------------------------------------------- 
 blitzrage - 07-06-07 14:01  
---------------------------------------------------------------------- 
This patch works as expected. When I give an illegal MoH class, but the
default class exists, I end up with this:

    -- Executing [s at sub-callparking:17]
MusicOnHold("Local/s at sub-callparking-e4b3,2", "illegal") in new stack
[Jul  6 15:11:18] WARNING[25635]: res_musiconhold.c:933 moh_classexist: No
Class: illegal
    -- Started music on hold, class 'default', on
Local/s at sub-callparking-e4b3,2


When neither exists, it falls through just as it used to prior to the
patch (i.e. no crashes or anything :))

    -- Executing [s at sub-callparking:17]
MusicOnHold("Local/s at sub-callparking-bfc8,2", "illegal") in new stack
[Jul  6 15:16:27] WARNING[25673]: res_musiconhold.c:933 moh_classexist: No
Class: illegal
[Jul  6 15:16:27] WARNING[25673]: res_musiconhold.c:933 moh_classexist: No
Class: default
[Jul  6 15:16:27] WARNING[25673]: res_musiconhold.c:968
local_ast_moh_start: Could not find acceptable Music On Hold Class, ending
Music On Hold[Jul  6 15:16:27] WARNING[25673]: res_musiconhold.c:576
moh0_exec: Unable to start music on hold (class 'illegal') on channel
Local/s at sub-callparking-bfc8,2


This patch is working based on my testing. Thanks! 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
07-06-07 14:01  blitzrage      Note Added: 0066625                          
======================================================================




More information about the Asterisk-bugs mailing list