Discussion:
[asterisk-users] Which folder for sounds?
sean darcy
2010-03-23 01:38:26 UTC
Permalink
1.6.2:

-- Executing [***@incoming-pstn-line:4] VoiceMail("DAHDI/4-1",
"***@default,u") in new stack
-- <DAHDI/4-1> Playing
'/var/spool/asterisk/voicemail/default/100/unavail.gsm' (language 'en')
[Mar 22 17:15:46] WARNING[31145]: file.c:650 ast_openstream_full: File
vm-intro does not exist in any format
[Mar 22 17:15:46] WARNING[31145]: file.c:953 ast_streamfile: Unable to
open vm-intro (format 0x4 (ulaw)): No such file or directory

But:

locate vm-intro

/var/lib/asterisk/sounds/en/vm-intro.gsm
/var/lib/asterisk/sounds/en/vm-intro.ulaw
/var/lib/asterisk/sounds/en/vm-intro.wav

head -12 /etc/asterisk/asterisk.conf
[directories](!) ; remove the (!) to enable this
astetcdir => /etc/asterisk
astmoddir => /usr/lib64/asterisk/modules
astvarlibdir => /var/lib/asterisk
astdbdir => /var/lib/asterisk
astkeydir => /var/lib/asterisk
astdatadir => /var/lib/asterisk
astagidir => /var/lib/asterisk/agi-bin
astspooldir => /var/spool/asterisk
astrundir => /var/run/asterisk
astlogdir => /var/log/asterisk


So in which folder are these sounds supposed to be?

But more importantly, who do we figure out where * is looking for
sounds? Some cli command would be really nice.

sean
Zeeshan Zakaria
2010-03-23 02:28:52 UTC
Permalink
/var/lib/asterisk/sounds/

On 2010-03-22 9:44 PM, "sean darcy" <***@gmail.com> wrote:

1.6.2:

-- Executing [***@incoming-pstn-line:4] VoiceMail("DAHDI/4-1",
"***@default,u") in new stack
-- <DAHDI/4-1> Playing
'/var/spool/asterisk/voicemail/default/100/unavail.gsm' (language 'en')
[Mar 22 17:15:46] WARNING[31145]: file.c:650 ast_openstream_full: File
vm-intro does not exist in any format
[Mar 22 17:15:46] WARNING[31145]: file.c:953 ast_streamfile: Unable to
open vm-intro (format 0x4 (ulaw)): No such file or directory

But:

locate vm-intro

/var/lib/asterisk/sounds/en/vm-intro.gsm
/var/lib/asterisk/sounds/en/vm-intro.ulaw
/var/lib/asterisk/sounds/en/vm-intro.wav

head -12 /etc/asterisk/asterisk.conf
[directories](!) ; remove the (!) to enable this
astetcdir => /etc/asterisk
astmoddir => /usr/lib64/asterisk/modules
astvarlibdir => /var/lib/asterisk
astdbdir => /var/lib/asterisk
astkeydir => /var/lib/asterisk
astdatadir => /var/lib/asterisk
astagidir => /var/lib/asterisk/agi-bin
astspooldir => /var/spool/asterisk
astrundir => /var/run/asterisk
astlogdir => /var/log/asterisk


So in which folder are these sounds supposed to be?

But more importantly, who do we figure out where * is looking for
sounds? Some cli command would be really nice.

sean


--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Philipp von Klitzing
2010-03-23 04:27:10 UTC
Permalink
Hi!
Post by sean darcy
[directories](!) ; remove the (!) to enable this
You did see the above, did you.
Post by sean darcy
'/var/spool/asterisk/voicemail/default/100/unavail.gsm' (language 'en')
[Mar 22 17:15:46] WARNING[31145]: file.c:650 ast_openstream_full: File
vm-intro does not exist in any format
Did you maybe upgrade from 1.2 to 1.6? Taken from UPGRADE.txt on a 1.4
system:

"WARNING: Asterisk 1.4 supports a new layout for sound files in multiple
languages; instead of the alternate-language files being stored in
subdirectories underneath the existing files (for French, that would be
digits/fr, letters/fr, phonetic/fr, etc.) the new layout creates one
directory under /var/lib/asterisk/sounds for the language itself, then
places all the sound files for that language under that directory and its
subdirectories. This is the layout that will be created if you select non-
English languages to be installed via menuselect, HOWEVER Asterisk does
not default to this layout and will not find the files in the places it
expects them to be. If you wish to use this layout, make sure you put
'languageprefix=yes' in your /etc/asterisk/asterisk.conf file, so that
Asterisk will know how the files were installed."

Philipp
Tzafrir Cohen
2010-03-23 08:55:12 UTC
Permalink
Post by sean darcy
-- <DAHDI/4-1> Playing
'/var/spool/asterisk/voicemail/default/100/unavail.gsm' (language 'en')
[Mar 22 17:15:46] WARNING[31145]: file.c:650 ast_openstream_full: File
vm-intro does not exist in any format
[Mar 22 17:15:46] WARNING[31145]: file.c:953 ast_streamfile: Unable to
open vm-intro (format 0x4 (ulaw)): No such file or directory
locate vm-intro
/var/lib/asterisk/sounds/en/vm-intro.gsm
/var/lib/asterisk/sounds/en/vm-intro.ulaw
/var/lib/asterisk/sounds/en/vm-intro.wav
head -12 /etc/asterisk/asterisk.conf
[directories](!) ; remove the (!) to enable this
As long as it is not enabled, the compile-time defaults are used.
Post by sean darcy
astetcdir => /etc/asterisk
astmoddir => /usr/lib64/asterisk/modules
astvarlibdir => /var/lib/asterisk
astdbdir => /var/lib/asterisk
astkeydir => /var/lib/asterisk
astdatadir => /var/lib/asterisk
astagidir => /var/lib/asterisk/agi-bin
astspooldir => /var/spool/asterisk
astrundir => /var/run/asterisk
astlogdir => /var/log/asterisk
So in which folder are these sounds supposed to be?
Unless you specifid the full path explicitly, the sound files are looked
for in the following pathes (in the following order). Suppose you wanted
the sound file called: 'somewhere/soundname'

DATADIR/sounds/LANG_FULL/somewhere/soundname
DATADIR/sounds/LANG/somewhere/soundname
DATADIR/sounds/somewhere/soundname
DATADIR/sounds/DEFAULTLANG/soundname

DATADIR defaults to /var/lib/asterisk (unless you use the Debian/Ubuntu
packages...) and can be set in asterisk.conf otherwise.

LANG_FULL is the complete value of LANGUAGE, if it is set. LANG is the
value of LANGUAGE sliced after the first '_'. For instance, if LANG_FULL
was 'en_US_Whatever', LANG will be 'en'.

DEFAULTLANG defaults to 'en' and can be set to a default value in
asterisk.conf. Normally people don't change it.


Hmm... 'core show settings' does not show datadir. Should it?
--
Tzafrir Cohen
icq#16849755 jabber:***@xorcom.com
+972-50-7952406 mailto:***@xorcom.com
http://www.xorcom.com iax:***@local.xorcom.com/tzafrir
sean darcy
2010-03-24 21:49:30 UTC
Permalink
Post by Tzafrir Cohen
Post by sean darcy
-- <DAHDI/4-1> Playing
'/var/spool/asterisk/voicemail/default/100/unavail.gsm' (language 'en')
[Mar 22 17:15:46] WARNING[31145]: file.c:650 ast_openstream_full: File
vm-intro does not exist in any format
[Mar 22 17:15:46] WARNING[31145]: file.c:953 ast_streamfile: Unable to
open vm-intro (format 0x4 (ulaw)): No such file or directory
locate vm-intro
/var/lib/asterisk/sounds/en/vm-intro.gsm
/var/lib/asterisk/sounds/en/vm-intro.ulaw
/var/lib/asterisk/sounds/en/vm-intro.wav
head -12 /etc/asterisk/asterisk.conf
[directories](!) ; remove the (!) to enable this
As long as it is not enabled, the compile-time defaults are used.
Post by sean darcy
astetcdir => /etc/asterisk
astmoddir => /usr/lib64/asterisk/modules
astvarlibdir => /var/lib/asterisk
astdbdir => /var/lib/asterisk
astkeydir => /var/lib/asterisk
astdatadir => /var/lib/asterisk
astagidir => /var/lib/asterisk/agi-bin
astspooldir => /var/spool/asterisk
astrundir => /var/run/asterisk
astlogdir => /var/log/asterisk
So in which folder are these sounds supposed to be?
Unless you specifid the full path explicitly, the sound files are looked
for in the following pathes (in the following order). Suppose you wanted
the sound file called: 'somewhere/soundname'
DATADIR/sounds/LANG_FULL/somewhere/soundname
DATADIR/sounds/LANG/somewhere/soundname
DATADIR/sounds/somewhere/soundname
DATADIR/sounds/DEFAULTLANG/soundname
DATADIR defaults to /var/lib/asterisk (unless you use the Debian/Ubuntu
packages...) and can be set in asterisk.conf otherwise.
LANG_FULL is the complete value of LANGUAGE, if it is set. LANG is the
value of LANGUAGE sliced after the first '_'. For instance, if LANG_FULL
was 'en_US_Whatever', LANG will be 'en'.
DEFAULTLANG defaults to 'en' and can be set to a default value in
asterisk.conf. Normally people don't change it.
Hmm... 'core show settings' does not show datadir. Should it?
So the sounds are in /var/lib/asterisk/sounds/en which should be
DATADIR/sounds/DEFAULTLANG/ since:

DATADIR defaults to /var/lib/asterisk, unless set in asterisk.conf which
it isn't (as pointed out by one helpful poster!)

DEFAULTLANG defaults to en unless changed in asterisk.conf.

# grep DEFAULTLANG /etc/asterisk/asterisk.conf
#

But 1.6.2 can't find them. I've found that if I make the folders
explicit, by removing the (!) in asterisk.conf it does find them. Which
means that somehow the default datadir is NOT /var/lib/asterisk. Odd.

A long winded way of saying yes, it would be helpful if 'core show
settings' showed datadir.

sean
Tzafrir Cohen
2010-03-25 11:28:41 UTC
Permalink
Post by sean darcy
Post by Tzafrir Cohen
Post by sean darcy
-- <DAHDI/4-1> Playing
'/var/spool/asterisk/voicemail/default/100/unavail.gsm' (language 'en')
[Mar 22 17:15:46] WARNING[31145]: file.c:650 ast_openstream_full: File
vm-intro does not exist in any format
[Mar 22 17:15:46] WARNING[31145]: file.c:953 ast_streamfile: Unable to
open vm-intro (format 0x4 (ulaw)): No such file or directory
locate vm-intro
/var/lib/asterisk/sounds/en/vm-intro.gsm
/var/lib/asterisk/sounds/en/vm-intro.ulaw
/var/lib/asterisk/sounds/en/vm-intro.wav
The sound files directory was irrelevant, as Asterisk tried to use a
full path.

"/var/spool/asterisk/voicemail/default/100/unavail.gsm" does not exist
in any format. That is:

/var/spool/asterisk/voicemail/default/100/unavail.gsm.{exten}

does not exist, for any valid value of 'exten' (wav, WAV, gsm, etc. See
the 'Extensions' column in 'core show file formats').
Post by sean darcy
Post by Tzafrir Cohen
Post by sean darcy
head -12 /etc/asterisk/asterisk.conf
[directories](!) ; remove the (!) to enable this
As long as it is not enabled, the compile-time defaults are used.
Post by sean darcy
astetcdir => /etc/asterisk
astmoddir => /usr/lib64/asterisk/modules
astvarlibdir => /var/lib/asterisk
astdbdir => /var/lib/asterisk
astkeydir => /var/lib/asterisk
astdatadir => /var/lib/asterisk
astagidir => /var/lib/asterisk/agi-bin
astspooldir => /var/spool/asterisk
astrundir => /var/run/asterisk
astlogdir => /var/log/asterisk
So in which folder are these sounds supposed to be?
Unless you specifid the full path explicitly,
Full path was specified. Hence the rest of the explanation is pointless
:-(
Post by sean darcy
Post by Tzafrir Cohen
DEFAULTLANG defaults to 'en' and can be set to a default value in
asterisk.conf. Normally people don't change it.
It isn't. My mistake. It can only be overriden in the code. Sorry.

(Generally asterisk.conf is parsed in main/asterisk.c . DEFAULT_LANGUAGE
is defined in include/asterisk.h .
Post by sean darcy
But 1.6.2 can't find them. I've found that if I make the folders
explicit, by removing the (!) in asterisk.conf it does find them. Which
means that somehow the default datadir is NOT /var/lib/asterisk. Odd.
Also note that Debian / Ubuntu set datadir at build time:

Basically by running:

make ASTDATADIR=/usr/share/asterisk

See http://svn.debian.org/viewsvn/pkg-voip/asterisk/trunk/debian/rules

But I sadly also pointed to the completely wrong direction. See above.
--
Tzafrir Cohen
icq#16849755 jabber:***@xorcom.com
+972-50-7952406 mailto:***@xorcom.com
http://www.xorcom.com iax:***@local.xorcom.com/tzafrir
Loading...