No sound recorded in "record" or voicemail

Dear All,

i have been trying to get our voicemail function to work for a while now.

Using Asterisk 1.8

Synopsis:

  • Voicemail: either recording the unavailable msg or the act of leaving a msg in an inbox, asterisk thinks its recording, saves a file but then cannot play back the file. the file however is not recorded since it doesnt have a size and if opened there is nothing inside. (see CLI lines below)
    -Record function: in my dialplan i decided to test the recording function as well, so i set up a simple task;

exten => 00,1,Playback(pls-rcrd-name-at-tone)
same => n,Record(/tmp/name.gsm,3,10)
same => n,Playback(pls-rcrd-name-at-tone)
same => n,Playback(/temp/name)

here the same thing happens. Asterisk thinks its recording (CLI also reflects that) then when trying to playback it doesn’t find the file and cannot open it because the format is unknown (see CLI lines below)

I believe it has something to do with the codecs. to make sure i installed all the codecs through selecting them in menuselect and "make install"ing them again. my modules.conf basically loads eveything (i have the noload for some things just to be sure i have all essentials loaded)
-sox is installed
-lame is installed

however i dont know if i need to do something to asterisk for it to “know” that sox and lame are there…

any help would be appreciated.

best regards,
Noob

CLI Lines:

VOICEMAIL:

=================================recording==========================================:
Executing [XXXXXXX@incoming:2] VoiceMail(“SIP/XXXXXXX”, “101@XXXXXXX,u”) in new stack
– <SIP/XXXXXXX> Playing ‘vm-theperson.alaw’ (language ‘en’)
– <SIP/XXXXXXX> Playing ‘digits/1.alaw’ (language ‘en’)
– <SIP/XXXXXXX> Playing ‘digits/0.alaw’ (language ‘en’)
– <SIP/XXXXXXX> Playing ‘digits/1.alaw’ (language ‘en’)
– <SIP/XXXXXXX> Playing ‘vm-isunavail.alaw’ (language ‘en’)
– <SIP/XXXXXXX> Playing ‘vm-intro.alaw’ (language ‘en’)
– <SIP/XXXXXXX> Playing ‘beep.alaw’ (language ‘en’)
– Recording the message
– x=0, open writing: /var/spool/asterisk/voicemail/XXXXXXX/101/tmp/FjD428 format: wav49, 0x7f43c4473b48
– x=1, open writing: /var/spool/asterisk/voicemail/XXXXXXX/101/tmp/FjD428 format: gsm, 0xf5afd8
– x=2, open writing: /var/spool/asterisk/voicemail/XXXXXXX/101/tmp/FjD428 format: wav, 0xef71c8
– User hung up
== Parsing ‘/var/spool/asterisk/voicemail/XXXXXXX/101/INBOX/msg0000.txt’: == Found
== Parsing ‘/var/spool/asterisk/voicemail/XXXXXXX/101/INBOX/msg0000.txt’: == Found
== Spawn extension (incoming,XXXXXXX, 2) exited non-zero on ‘SIP/XXXXXXX’

=================================playback==========================================:
– <SIP/101-00000002> Playing ‘vm-first.ulaw’ (language ‘en’)
== Parsing ‘/var/spool/asterisk/voicemail/XXXXXXX/101/INBOX/msg0000.txt’: == Found
– <SIP/101-00000002> Playing ‘vm-message.ulaw’ (language ‘en’)
[Jul 7 18:41:47] WARNING[27256]: format_wav.c:159 check_header: Does not begin with RIFF
[Jul 7 18:41:47] WARNING[27256]: file.c:386 fn_wrapper: Unable to open format wav
[Jul 7 18:41:47] WARNING[27256]: file.c:958 ast_streamfile: Unable to open /var/spool/asterisk/voicemail/XXXXXXX/101/INBOX/msg0000 (format 0x4 (ulaw)): No such file or directory
[Jul 7 18:41:47] WARNING[27256]: app_voicemail.c:7813 play_message: Playback of message /var/spool/asterisk/voicemail/XXXXXXX/101/INBOX/msg0000 failed
– <SIP/101-00000002> Playing ‘vm-advopts.ulaw’ (language ‘en’)

RECORDING FUNCTION:

== Using SIP RTP CoS mark 5
– Executing [00@XXXXXXX:1] Playback(“SIP/101-00000006”, “pls-rcrd-name-at-tone”) in new stack
== Extension Changed 321[XXXXXXX] new state InUse for Notify User 102
== Extension Changed 321[XXXXXXX] new state InUse for Notify User 100
– <SIP/101-00000006> Playing ‘pls-rcrd-name-at-tone.ulaw’ (language ‘en’)
– Executing [00@XXXXXXX:2] Record(“SIP/101-00000006”, “/tmp/name.gsm,3,10”) in new stack
– <SIP/101-00000006> Playing ‘beep.ulaw’ (language ‘en’)
– Executing [00@XXXXXXX:3] Playback(“SIP/101-00000006”, “pls-rcrd-name-at-tone”) in new stack
– <SIP/101-00000006> Playing ‘pls-rcrd-name-at-tone.ulaw’ (language ‘en’)
– Executing [00@XXXXXXX:4] Playback(“SIP/101-00000006”, “/temp/name”) in new stack
[Jul 7 18:58:43] WARNING[27282]: file.c:663 ast_openstream_full: File /temp/name does not exist in any format
[Jul 7 18:58:43] WARNING[27282]: file.c:958 ast_streamfile: Unable to open /temp/name (format 0x4 (ulaw)): No such file or directory
[Jul 7 18:58:43] WARNING[27282]: app_playback.c:475 playback_exec: ast_streamfile failed on SIP/101-00000006 for /temp/name
– Auto fallthrough, channel ‘SIP/101-00000006’ status is ‘UNKNOWN’

and there is my problem…

all help greatly appreciated and wanted!!! thanks :smile:
Amadeo

Hi,

Could this be a directory/file permissions issue?

If you are running asterisk as a user called ‘asterisk’ and your /var/spool/asterisk is owned by ‘root’, asterisk will be unable to write any files.

Check and chown as appropriate.

Regards,
Mark

Hi Mark,

thank you, however i dont think so since the files in /var/spool/asterisk are being created.

this is the content of the folder with the recordings, as you can see the size is too small for a real recording
-rw-r–r-- 1 root root 0 7. Jul 19:10 msg0000.gsm
-rw-r–r-- 1 root root 300 7. Jul 19:10 msg0000.txt
-rw-r–r-- 1 root root 44 7. Jul 19:10 msg0000.wav
-rw-r–r-- 1 root root 60 7. Jul 19:10 msg0000.WAV
-rw-r–r-- 1 root root 0 9. Jul 09:38 msg0001.gsm
-rw-r–r-- 1 root root 299 9. Jul 09:38 msg0001.txt
-rw-r–r-- 1 root root 44 9. Jul 09:38 msg0001.wav
-rw-r–r-- 1 root root 60 9. Jul 09:38 msg0001.WAV