[Asterisk-Users] Sound Quality - Part 2 (mp3)

Edwin A. Silva edwin at wwworks-inc.com
Mon May 12 11:43:15 MST 2003


True enough, but why would you want to run mpg123 for any other purpose
other than moh on production equipment anyways?

-----Original Message-----
From: asterisk-users-admin at lists.digium.com
[mailto:asterisk-users-admin at lists.digium.com] On Behalf Of Tilghman
Lesher
Sent: Monday, May 12, 2003 2:45 PM
To: asterisk-users at lists.digium.com
Subject: Re: [Asterisk-Users] Sound Quality - Part 2 (mp3)


On Monday 12 May 2003 12:57, Edwin A. Silva wrote:
> I was getting this too, it's probably caused because there is no code 
> in asterisk to shutdown mpg123 when you restart or shutdown asterisk.

> I havn't gotten around to it, but a simple shell script that does a ps

> and greps for mpg123 and pipes it word count would do the job. If u 
> have moh configured propperly you should only ever have 2 running 
> proccesses of mpg123 if the wc is > 2 then you could kill the pids.  I
> wouldn't be too hard to do at all and I'm sure Mark could add
> very easily to the shutdown and restart scripts.

It's not the right way to do it, though.  Given that you could be
running mpg123 for more than one purpose on a machine, killing all
processes matching mpg123 is overkill (and could be disruptive to other
tasks).  The pid for each mpg123 process is already stored in a
linked-list structure in res/musiconhold, so you would simply need to
look to see if any pids are allocated within that structure and if so,
send a SIGKILL to each of them.

-Tilghman

_______________________________________________
Asterisk-Users mailing list
Asterisk-Users at lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users




More information about the asterisk-users mailing list