File vm-intro does not exist [Resolved]

I’d like to use VoiceMail.

In file “extensions.conf”, I’ve:

[local]
exten => 200, 1, Dial(SIP/User2, 10)
exten => 200, 2, VoiceMail(200)

exten => 201, 1, Dial(SIP/User1, 10)
exten => 201, 2, VoiceMail(201)

When User2 phone to User1, if User1 don’t answer, Voice Mail don’t work. In “asterisk -r”, I see:

[Dec 13 17:15:28] WARNING[7895][C-00000000]: file.c:698 ast_openstream_full: File vm-intro does not exist in any format
[Dec 13 17:15:28] WARNING[7895][C-00000000]: file.c:1014 ast_streamfile: Unable to open vm-intro (format (ulaw)): File exists

I’ve tried to resolve with others posts, but nothing is good.

My others configuration files:

sip.conf

[general]
context=local
bindport=5060
bindaddr=0.0.0.0
language=fr

(“language=en” isn’t better).

[User2]
secret=pswd
type=friend
host=dynamic
callerid=“User2” <200>
mailbox=200@default

[User1]
secret=pswd
type=friend
host=dynamic
callerid=“User1” <201>
mailbox=201@default

asterisk.conf: I’ve modified one line:

languageprefix = yes

voicemail.conf

[general]
format=gsm
attach=yes
emailsubject=Nouveau message vocal provenant de ${VM_CIDNAME}
emailbody=\n\tBonjour ${VM_NAME},\n\n\t Tu as un message de la part de ${VM_CIDNAME} d’une durée de ${VM_DUR} datant du ${VM_DATE}

[default]
200 => pswd,user2,user2@mail.local
201 => pswd,user1,user1@mail.local

modules.conf

[modules]
autoload=no
load=pbx_config.so
load=chan_sip.so
load=chan_iax2.so
load=res_rtp_asterisk.so
load=app_hangup.so
load=app_dial.so
load=codec_ulaw.so
load=codec_gsm.so
load=app_voicemail.so

iax.conf

[demo]
type=peer
username=pswd
secret=pswd
host=192.168.0.1 ; IP address of asterix server

In folder “/var/lib/asterisk/sounds”, there are two folders: “en” and “fr”. ACLs are:

root@debian:/var/lib/asterisk# ls -l
drwxr-xr-x 2 root root 4096 11 déc. 20:37 agi-bin
-rw-r–r-- 1 root root 3072 13 déc. 17:35 astdb.sqlite3
drwxr-xr-x 3 root root 4096 13 déc. 17:10 documentation
drwxr-xr-x 3 root root 4096 11 déc. 20:37 firmware
drwxr-xr-x 2 root root 4096 13 déc. 17:10 images
drwxr-xr-x 2 root root 4096 11 déc. 20:37 keys
drwxr-xr-x 2 root root 4096 11 déc. 20:37 moh
drwxr-xr-x 2 root root 4096 11 déc. 20:38 phoneprov
drwxr-xr-x 4 root root 4096 13 déc. 16:56 sounds
drwxr-xr-x 2 root root 4096 13 déc. 17:10 static-http

And:
root@debian:/var/lib/asterisk/sounds# ls -l
drwxr-xr-x 8 root root 16384 13 déc. 16:55 en
drwxr-xr-x 8 root root 16384 13 déc. 16:55 fr

My asterisk version:

root@debian:~# asterisk -r
Asterisk 11.1.0, Copyright © 1999 - 2012 Digium, Inc. and others.

OS is a Debian squeeze.

Thanks for all.

please post the line beginning with astvarlibdir=> from your /etc/asterisk/asterisk.conf

In /etc/asterisk/asterisk.conf, I’ve: “astvarlibdir => /var/lib/asterisk”.

==========================================
In a post, I’ve found and done:

make ASTDATADIR=/var/lib/asterisk
make install

In /etc/asterisk/asterisk.conf, I see:
ASTDATADIR=/var/lib/asterisk

Is it a problem ? If I found time, I’ll try install a new asterisk on Debian.

Thanks for all.

Best regards.

astvarlibdir is a different entry than astdatadir

You need to have a line under the [directories] section that specifies astvarlibdir. Mine looks like this:

/etc/asterisk/asterisk.conf

[directories]
astetcdir => /etc/asterisk
astmoddir => /usr/lib/asterisk/modules
astvarlibdir => /var/lib/asterisk
astdatadir => /var/lib/asterisk
astagidir => /var/lib/asterisk/agi-bin
astspooldir => /var/spool/asterisk
astrundir => /var/run
astlogdir => /var/log/asterisk

There is also an entry for astdatadir and it points to the same directory as astvarlibdir, but it needs both variables set by this conf file. Did you install from apt-get or compile from source?

Here is the beginning of my asterisk.conf:


directories
astetcdir => /etc/asterisk
astmoddir => /usr/lib/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
astsbindir => /usr/sbin

The differences are:
"!" on line [directories]

3 new lines on my file:
astdbdir => /var/lib/asterisk
astkeydir => /var/lib/asterisk
and
astsbindir => /usr/sbin

For installing, I’ve made:

cd /asterisk-11.1.0
./contrib/scripts/install_prereq install
./configure
make
make install
make config
make samples

Thanks for all.

Best regards.

I would remove the (!) from the [directories] line and restart and see what happens.

Sorry. The same problem stays.

Thanks for all.

You should start to looking if the file exist, if the file has the same owner and group of running asterisk & if asterisk can read the file.

I think everyone can access to the directory (and the files: I’ve made a chmod -r):
root@debian-0n:/var/lib/asterisk/sounds# ls -l
drwxr-xrwx 8 root root 16384 14 déc. 14:59 en
drwxr-xrwx 8 root root 16384 14 déc. 14:59 fr

In /var/log/asterisk/messages, I’ve found:

[Dec 18 20:45:52] ERROR[2417] app_voicemail.c: Error processing format string, defaulting to format ‘wav’

It seems to be a bug, but I don’t what to do.

Is it possible to install asterisk with apt-get, without compiling ? Is the problem coming from compilation ?

Thanks for all.

I will try with “make menuselect”. Prehaps will it be better.

Thanks for all, really.

Best regards.

Please paste the output of: ls -lha /var/lib/asterisk/sounds/fr/vm*

How did you generated the French audio files?
And you last error seems like the directive to store the format as GSM is not working I think is WAV or wav49 the valid options.

All is finally working fine with:


./configure

make menuselect.makeopts

menuselect/menuselect --enable app_meetme --enable CORE-SOUNDS-FR-ULAW --enable MOH-OPSOUND-ULAW --enable EXTRA-SOUNDS-FR-ULAW menuselect.makeopts

make
make install
make samples
make config

Thanks for all.

Best regards.