[asterisk-users] Which folder for sounds?

sean darcy seandarcy2 at gmail.com
Wed Mar 24 16:49:30 CDT 2010


Tzafrir Cohen wrote:
> On Mon, Mar 22, 2010 at 09:38:26PM -0400, sean darcy wrote:
>> 1.6.2:
>>
>>      -- Executing [s at incoming-pstn-line:4] VoiceMail("DAHDI/4-1", 
>> "100 at 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
> 
> As long as it is not enabled, the compile-time defaults are used.
> 
>> 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




More information about the asterisk-users mailing list