[asterisk-bugs] [JIRA] (ASTERISK-25231) Set Music AGI command does not use class argument

Michael Cargile (JIRA) noreply at issues.asterisk.org
Wed Jul 8 16:22:32 CDT 2015


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

Michael Cargile edited comment on ASTERISK-25231 at 7/8/15 4:20 PM:
--------------------------------------------------------------------

The debug file pointed me to the actual issue. Asterisk is only reloading the musiconhold.conf file once on a 'moh reload'. If the moh class exists in the file but is not created yet it throws an error and then ignores the class. Subsequent 'moh reload's do not reparse the musiconhold.conf file. Instead it just reloads the classes it knows about. After I started Asterisk 11 back up with the debug options enabled like you asked it worked fine.

Our software has two processes one that auto generates config files and one that builds the moh directory and loads the files. Both call 'moh rebuild'. If the config file process finishes before the moh gets built by the second process the moh class will not work till I either restart Asterisk or touch the config files. This does not seem like the proper way 'moh reload' should work but I fixed the issue in our software by putting a 'touch /etc/asterisk/musiconhold.conf' command at the end of the process that creates the directory and loads the files.


was (Author: mcargile):
The debug file pointed me to the actual issue. Asterisk is only reloading the musiconhold.conf file once on a 'moh reload'. If the moh class exists in the file but is not created yet it throws and error and then ignores it. Subsequent 'moh reload's do not reparse the musiconhold.conf file. Instead it just reloads the classes it knows about. After I started Asterisk 11 back up with the debug options enabled like you asked it worked fine.

Our software has two processes one that auto generates config files and one that builds the moh directory and loads the files. Both call 'moh rebuild'. If the config file process finishes before the moh gets built by the second process the moh class will not work till I either restart Asterisk or touch the config files. This does not seem like the proper way 'moh reload' should work but I fixed the issue in our software by putting a 'touch /etc/asterisk/musiconhold.conf' command at the end of the process that creates the directory and loads the files.

> Set Music AGI command does not use class argument
> -------------------------------------------------
>
>                 Key: ASTERISK-25231
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-25231
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_agi, Resources/res_musiconhold
>    Affects Versions: 11.18.0
>         Environment: OpenSuSE 13.1 running on a quad core intel with 4 gigs of ram.
>            Reporter: Michael Cargile
>            Assignee: Unassigned
>            Severity: Minor
>
> Our script is sending 'SET MUSIC ON ast11test' to standard out and yet the music on hold that is played is default:
> 2015-07-07 12:19:17|12:19:28|agi-VDAD_ALL_inbound.agi|MOH Context = ast11test
> 2015-07-07 12:19:17|12:19:28|agi-VDAD_ALL_inbound.agi|MOH Command = SET MUSIC ON ast11test
>     -- [Jul  7 12:19:28]     -- Started music on hold, class 'default', on SIP/sgw1-00000040
> 2015-07-07 12:19:17|12:19:28|agi-VDAD_ALL_inbound.agi|MOH Result = 200 result=0
> no error is given.



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



More information about the asterisk-bugs mailing list