[asterisk-dev] Re: Note about mpg123

Tzafrir Cohen tzafrir.cohen at xorcom.com
Sat Sep 16 04:14:51 MST 2006


On Fri, Sep 15, 2006 at 01:14:17PM -0400, Matthew Rubenstein wrote:
> On Fri, 2006-09-15 at 09:57 -0700, asterisk-dev-request at lists.digium.com
> wrote:
> > Date: Fri, 15 Sep 2006 11:50:45 -0500 (CDT)
> > From: "Kevin P. Fleming" <kpfleming at digium.com>
> > Subject: Re: [asterisk-dev] Re: Note about mpg123
> > To: Asterisk Developers Mailing List <asterisk-dev at lists.digium.com>
> > Message-ID:
> >         <27365390.3391158339045831.JavaMail.root at jupiler.digium.com>
> > Content-Type: text/plain; charset=utf-8
> > 
> > ----- Tony Mountifield <tony at softins.clara.co.uk> wrote:
> > > As I understand it, file-based native MoH is no less efficient than
> > > any
> > > other kind of file playback, particularly if the MoH files are
> > > available
> > > in all required native formats. And if there are many callers
> > > listening
> > > to the same MoH files, there is a good chance the wanted part may
> > > already
> > > be in the Linux filesystem cache.
> > 
> > Tony is right; native file MOH is exactly the same as just using
> > Playback() in terms of performance and system load.
> 
> 	True. But lots of users already have music for hold encoded in MP3.
> Converting it to native formats eats either storage space or CPU (on the
> fly conversion). 

Give a chance to offline convertion. Chances are you'll get comparable
file sizes, as mp3 files tend to be of much higher sample rates.

> And prohibits using streamed radio, like from a central
> LAN server, without extra conversion CPU.

Use streamplayer

> 
> 	Does the current discussion indicate that Asterisk is moving away from
> supporting MP3 for MoH in future releases? Or just sticking with an
> obsolescent mpg123?

Now let's get to the original point, as it seems people missed my point
regaring performance. One major difference between the original MoH and 
the native MoH is that with the original you have one stream of music,
and whenever a new listener joins, it listens to that stream. Thus two
held callers will hear exactly the same music [*] in the same timing.

However with Native MoH, each held caller gets a new stream of music.

So let's assume that we have a system that a large part of its load is
with held callers. If we use Native MoH we actualy waste CPU on just
playing the same music (in different offsets) to different callers and
thus we're less efficient that with the original MoH. 

OTOH, callers always get the beginning of the message.

[*] For the sake of simplicity I assume that there is only one MoH class

-- 
Tzafrir Cohen         sip:tzafrir at local.xorcom.com
icq#16849755          iax:tzafrir at local.xorcom.com
+972-50-7952406          jabber:tzafrir at jabber.org
tzafrir.cohen at xorcom.com     http://www.xorcom.com


More information about the asterisk-dev mailing list