[asterisk-dev] bug #7911

Tzafrir Cohen tzafrir.cohen at xorcom.com
Mon Sep 11 05:05:01 MST 2006


On Mon, Sep 11, 2006 at 12:16:14PM +0100, Steve Davies wrote:
> On 9/11/06, Tzafrir Cohen <tzafrir.cohen at xorcom.com> wrote:
> >On Mon, Sep 11, 2006 at 11:41:04AM +0200, Raphael Jacquot wrote:
> >>
> >> the resolution of http://bugs.digium.com/view.php?id=7911 appears to me
> >> as a case of "lets not bother with this" wereas there's a real
> >> underlying problem
> >>
> >> I installed the sound bits with the make menuselect and then make
> >> install stuff, and the sound bits were set in the following pattern
> >>
> >> /var/lib/asterisk/sounds/
> >>                          fr/
> >>                             digits/
> >>
> >> which actually makes sense. you add a directory for all the french
> >> stuff, then replicate the subdirectories of the default language (in
> >> this case, english). this allows removing or installing new languages by
> >> just copying a single directory tree under the sounds directory
> >>
> >> now, the manager that closed the bug insists that having "fr"
> >> directories all over the tree is the proper way to do it.
> >>
> >> I respectfully disagree with him, and request this issue be discussed in
> >> the list.
> >
> >The problem with that approach is that it assumes that you have a base
> >directory.
> >
> >If you want to give a full path to the sound file, the only place to add
> >a language suffix is just before the sound file itself.
> >
> >You can also work around that problem with symlinks: fr/digits -> digits/fr
> >
> 
> And I respectfully have to agree with the first two posters that the
> current structure is un-natural (IMHO symlinks are more a temporary
> workaround than a fix).
> 
> You say "The problem with that approach is that it assumes that you
> have a base directory" - I would respond "You appear to have
> identified your problem then :-)"
> 

That is: 

the change you suggest would break:

  Playback(/var/lib/asterisk/sounds/digits/1)

This works with the current code. Not just:

  Playback(digits/1)

This is what I meant by "assuming a base directory".

> Of course the system should know where the sounds base directory is,
> and it should therefore be able to support the use of
> SOUNDS_DIR/LANG_DIR/path/file. In my experience, 99% of soundfiles are
> referred to using something like:
>  Playback(path/file)
> Which, in the current code, requires extra work to insert the language
> in the right place!

The code is already there. Check file.c . Please suggest a patch.

As a reply to the the other Steve: not everyone with a .com domain is
from the US.

-- 
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