[asterisk-bugs] [JIRA] (ASTERISK-25444) Music On Hold Warning misleading

Conrad de Wet (JIRA) noreply at issues.asterisk.org
Wed Oct 7 02:07:33 CDT 2015


    [ https://issues.asterisk.org/jira/browse/ASTERISK-25444?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=227795#comment-227795 ] 

Conrad de Wet commented on ASTERISK-25444:
------------------------------------------

I have in the mean wile changed my src code back to a debug, and re-complied.

My reason for saying that the warning isn't correct is because it has not check if the moh class in in the real-time data. What would be a better solution:
1) Check if the moh class that is load in memory, if not, debug message "not found in memory" (as per 11.18).
2a) If using real-time - Check if moh class loaded from real-time, if not found in real-time data, warning message: "not found at all", going to try use default class" (or whatever message). 
2b) If not using real-time - throw warning message (as per 11.19).

The main problem is in a high capacity environment - every single time someone enters a queue or puts someone on hold, or at any time refers to using music on hold, the warning message writes to the log... for us it was writing up to half a million times a day... in a real-life production environment, this is simply not feasible. (We re-write our logs to a db, so that we can perform a multitude of pattern match on them so we can identify potential problems, so changing the log level isn't an options either)

> Music On Hold Warning misleading
> --------------------------------
>
>                 Key: ASTERISK-25444
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-25444
>             Project: Asterisk
>          Issue Type: Improvement
>      Security Level: None
>          Components: Resources/res_musiconhold
>    Affects Versions: 11.19.0
>            Reporter: Conrad de Wet
>
> In a documented change from 11.18.0 to 11.19.0 - res_musiconhold.c line 894, change to warn about missing music on hold classes. 
> Both the version before and this one are not correct in any case - if you are using the RealTime engine for Music classes. Clearly this is not a popular way to handle MOH, because it has pretty much been like this since i can remember, but now with the change from debug to warning - its very confusing and annoying.
> They are both incorrect, because the _get_mohbyname only checks if the class has been loaded to memory, and warns first before checking in the RealTime database. As a result, monitoring the CLI, we have no way of knowing if the correct music class has load or not. And our logs are getting clogged with incorrect warning messages.
> Here you can see the output warns first, but then goes to the database and the correct classes loads...
> {noformat}
> [Oct  4 09:00:04] DEBUG[7779][C-00000002]: pbx.c:4938 pbx_extension_helper: Launching 'MusicOnHold'
>     -- Executing [s at macro-et-music-on-hold:3] MusicOnHold("SIP/102-ConradInc-00000002", "") in new stack
> [Oct  4 09:00:04] WARNING[7779][C-00000002]: res_musiconhold.c:896 _get_mohbyname: Music on Hold class 'default-ConradInc' not found in memory. Verify your configuration.
> [Oct  4 09:00:04] DEBUG[7779][C-00000002]: res_config_odbc.c:114 custom_prepare: Skip: 0; SQL: SELECT * FROM MusicOnHold WHERE name = ?
> [Oct  4 09:00:04] DEBUG[7779][C-00000002]: res_config_odbc.c:130 custom_prepare: Parameter 1 ('name') = 'default-ConradInc'
> [Oct  4 09:00:04] DEBUG[7779][C-00000002]: res_odbc.c:1053 odbc_release_obj2: odbc_release_obj2(0x26f9be8) called (obj->txf = (nil))
> [Oct  4 09:00:04] DEBUG[7779][C-00000002]: res_musiconhold.c:1098 moh_scan_files: Scanning '/var/lib/asterisk/moh/ConradInc/default' for files for class 'default-ConradInc'
>     -- Started music on hold, class 'default-ConradInc', on SIP/102-ConradInc-00000002
> [Oct  4 09:00:04] DEBUG[7779][C-00000002]: channel.c:3594 ast_settimeout_full: Scheduling timer at (50 requested / 50 actual) timer ticks per second
> [Oct  4 09:00:04] DEBUG[7779][C-00000002]: channel.c:5413 set_format: Set channel SIP/102-ConradInc-00000002 to write format slin
> [Oct  4 09:00:04] DEBUG[7779][C-00000002]: res_musiconhold.c:351 ast_moh_files_next: SIP/102-ConradInc-00000002 Opened file 3 '/var/lib/asterisk/moh/ConradInc/default/macroform-the_simplicity'
> {noformat}
> Furthermore, and just my 2c worth here, the real-time handling of music on hold is poor. Both "moh show classes", and "moh show files" is totally useless (when using musiconhold => odbc,MySqlRt,MusicOnHold)



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list