[asterisk-dev] Sound path
Tzafrir Cohen
tzafrir.cohen at xorcom.com
Wed Nov 4 08:51:31 CST 2009
On Wed, Nov 04, 2009 at 02:40:15PM +0100, Olle E. Johansson wrote:
>
> 4 nov 2009 kl. 09.30 skrev Benny Amorsen:
>
> > "Kevin P. Fleming" <kpfleming at digium.com> writes:
> >
> >> It sure does; you can have a directory called sounds/en/CUSTOMER1
> >> that
> >> contains only a couple of files, and set LANGUAGE for customer #1's
> >> channels to 'en_CUSTOMER1'. Asterisk will use the files that are in
> >> that
> >> directory in preference to the files in the sounds/en directory,
> >> but the
> >> sounds/en/CUSTOMER1 directory does not need to contain a complete
> >> set of
> >> sounds.
> >
> > It doesn't, however, solve the problem of conforming to the File
> > Hierarchy Standard. System-provided files should be in /usr/share and
> > should be read only, whereas customized sound files (e.g. files
> > written
> > by Asterisk) should be in /var. It would be very handy if Asterisk
> > could
> > handle lookup in multiple directory hierarchies.
>
> And like many other problems, this can be solved in the dialplan I
> believe.
> We could have a filesearch function - that checks a path so you can do
>
> exten => abba,1,playback(filesearch(olleabbamusic))
You don't always provide the direct file name:
exten => abba,1,SayAlpha(${EXTEN})
exten => abbadate,1,SayUnixTime(134258400)
>
> The big question here is if additional lookups will help performance?
> For heavily used systems, I don't want extra file-system IO.
This will typically use stat() and co. If the system is even slightly
heavily used, I expect the directories to be cached in memory.
--
Tzafrir Cohen
icq#16849755 jabber:tzafrir.cohen at xorcom.com
+972-50-7952406 mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com iax:guest at local.xorcom.com/tzafrir
More information about the asterisk-dev
mailing list