Summary:ASTERISK-04804: Solaris mpg123 doesn't die properly for musiconhold
Reporter:Lee Essen (essele)Labels:
Date Opened:2005-08-10 06:18:33Date Closed:2008-01-15 15:45:27.000-0600
Versions:Frequency of
Description:mpg123 on Solaris (at least on x86) doesn't work properly with asterisk. It basically spawns an additional process which doesn't die when asterisk tries to kill it, thus asterisk will never properly shut down.

Also, by default it's in /opt/sfw/bin so the current asterisk defaults don't make sense in the Solaris world.

For info, I have built madplay and it works perfectly using the custom config option (using: -Q -o raw:- --mono -R 8000 -a -12) ... interestingly it also seems to have got rid of my "request to schedule in the past" messages.

Would it make sense to have a config section in musiconhold.conf which defines the various commands rather than having these in the code?
(Example in Additional info)


Just a thought...

solquietmp3 => /opt/sfw/bin/madplay -Q -o raw:- --mono -R 800 -a -12 %s
linquietmp3 => /usr/bin/mpg123 -q -r 8000 -f 4096 -b 2048 --mono -s %s

default => solquietmp3:/usr/lib/asterisk/mohmp3
Comments:By: twisted (twisted) 2005-08-10 15:36:57

You can already do this...

read the sample configs first.. they shed a lot of light:
;manual => custom:/var/lib/asterisk/mohmp3,/usr/bin/mpg123 -q -r 8000 -f 8192 -b 2048 --mono -s

The problem with the processes not dying when asterisk tries to kill them is not an asterisk issue, but an mpg123 issue.

By: twisted (twisted) 2005-08-10 15:37:21

Config/non-asterisk issue

By: Lee Essen (essele) 2005-08-11 08:39:15

Ok, I take the point about it being an mpg123 problem, however shouldn't you at least highlight the issue somewhere (in a README or even in the config file comments) otherwise new users will go through the same pain and it will adversely affect their impression of Asterisk!

Also, as you can see from my initial description, I am aware of the "custom" capability, I just thought it might be more appropriate (and clearer) to take the path and argument stuff out of the code into a separate definition area in the config ... it was only a suggestion! :-)

By: Mark Spencer (markster) 2005-08-11 13:52:38

If you'll provide a sample entry for madplay I'll be happy to put it as an example in the musiconhold.conf.sample.  Thanks!

By: Michael Jerris (mikej) 2005-08-18 13:22:02

suspended due to lack of response.  Reopen if you can provide the madplay example... otherwise, I will consider this a duplicate of ASTERISK-4823

By: Lee Essen (essele) 2005-08-19 05:02:03

Sorry, been away for a couple of days... a working madplay config is:

default => custom:/site/sw/lib/asterisk/mohmp3,/site/sw/bin/madplay -Q -o raw:-
--mono -R 8000 -a -12

... obviously the paths are specific to my configuration, perhaps something like this would be appropriate in the file:

; Solaris Users: mpg123 does not exit cleanly, madplay has been shown to work
; default => custom:/<your_moh_dir>/mohmp3,/<path_to_madplay>/madplay -Q -o raw:-
--mono -R 8000 -a -12



By: Kevin P. Fleming (kpfleming) 2005-08-22 15:08:22

What needs to be done here? It's marked 'confirmed' but there is no specific action required that I can tell.

By: Michael Jerris (mikej) 2005-08-23 23:52:19

the madplay just needs to be added to the sample config files

By: Kevin P. Fleming (kpfleming) 2005-08-24 22:38:32

Example has been added to CVS HEAD.

By: Digium Subversion (svnbot) 2008-01-15 15:45:27.000-0600

Repository: asterisk
Revision: 6403

U   trunk/configs/musiconhold.conf.sample

r6403 | kpfleming | 2008-01-15 15:45:26 -0600 (Tue, 15 Jan 2008) | 2 lines

add madplay example for Solaris users (issue ASTERISK-4804)