[asterisk-dev] bug #7911

Steve Davies davies147 at gmail.com
Mon Sep 11 06:39:57 MST 2006


On 9/11/06, Tzafrir Cohen <tzafrir.cohen at xorcom.com> wrote:
>
> 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".

Fair comment, thanks for clarifying that, but (IMHO) if you specify a
fully qualified pathname as you do in the line above, that is exactly
what you should get... This would allow a fairly intuitive means of
choosing a soundfile from the dialplan without changing the current
base language...

For example, all of the following would be legal (assuming the
validity of a $LANG variable or equivalent:

  Playback(/var/lib/asterisk/sounds/digits/1) - US/default (ignores
current LANG)
  Playback(/var/lib/asterisk/sounds/uk/digits/1) - UK (ignores current LANG)
  Playback(/var/lib/asterisk/sounds/${LANG}/digits/1) - Current base language
  Playback(${LANG}/digits/1) - Current base language, no fallback to US files
  Playback(digits/1) - Current base language, with fallback to US file

ie... you would get what you asked for :)

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

Touche! I'll take a look :)

Steve


More information about the asterisk-dev mailing list