When I configured this server, I did not do the make mpg123 option. Months later, I read about it and did it, as the client was asking about MOH. About a week later the server crashed, which it never has before. I believe mpg123 have a memory leak. What's the best way to remove it, and is there an alternative that is stable? -- Chris Mason NetConcepts (264) 497-5670 Fax: (264) 497-8463 Int: (305) 704-7249 Fax: (815)301-9759 Cell: 264-235-5670 Yahoo IM: netconcepts_anguilla@yahoo.com
Chris Mason (Lists) wrote:> When I configured this server, I did not do the make mpg123 option. > Months later, I read about it and did it, as the client was asking about > MOH. About a week later the server crashed, which it never has before. I > believe mpg123 have a memory leak. > What's the best way to remove it, and is there an alternative that is > stable?rm /usr/bin/mpg123 or something like that There are a few solutions to MOH: http://www.voip-info.org/wiki/index.php?page=Asterisk+config+musiconhold.conf http://www.voip-info.org/wiki-Asterisk+mpg123+faking+it If you are using 1.2, I would use native (codec, not MP3). There should be an example in the sample config file in /usr/src/asterisk/configs/musiconhold.conf.sample - I don't see it on the Wiki. It should be there, somewhere. Must be buried. For this option, you will need to have the sound files in .ul, .gsm, or whatever codec you use mostly. I only allow ulaw, so all of my MOH files are .ul. This way it doesn't have to transcode at all. Kevin
> > Almost certainly a memory leak in mpg123 is not the cause of a system > crash. First off, there is no such leak. Second even if there were > one the mpg123 process is not long lived. A new one is started for > each MOH session. > > If mpg123 is causing the crash then it may be due simply because of > all the extra CPU time required to transcode the music. If there are > 10 lines on hold then there woud be 10 copies of mpg123 running > on the server. >Are you sure about the above? The last time I watched my asterisk server, an mpg123 process was started when asterisk started, and no more are created no matter how many calls are listening to it. The process appears to be suspended when nothing is using its output (eg with an extension programmed to go direct to MOH, if I dial the extension, listen for 5 seconds, hang up, wait 10 seconds, and then dial the MOH extension again, the sound is exactly at the point I left it). The only extra overhead I can imagine relating to multiple calls is if asterisk had to transcode per call. This was true as of 1.0.9 and 1.2.1 if my observations are correct. Assuming of course that everyone is listening to the same MOH class(?). Could it be that it depends on the MOH configuration as to if mpg123 processes are started per server or per call? Please enlighten me if you know something I don't :) On an unrelated note, I would like to use the same MOH process to output audio via the sound card to run MOH for a legacy PBX, but as is I need to start a separate process... anyone done this before using the Asterisk MOH process? Thanks James