[asterisk-dev] Recording new Greeting in Asterisk 16 to ODBC in MySql doesn't play greeting.

Steve Sether ssether at usinternet.com
Fri Jan 25 14:37:27 CST 2019


I'm having an issue in Asterisk 16 where when I record a new greeting, 
the greeting doesn't play when I call the users voicemail.

I've tracked this down  NULL being inserted into the context column of 
the voicemail table.  When Asterisk retrieves the greeting, and the 
Context column is is null, it won't play the greeting, and gives this error:


[2019-01-25 14:26:04] WARNING[32671][C-00000008]: app_voicemail.c:3995 
retrieve_file: SQL Get Data error! coltitle=context
[SELECT * FROM voicemessages WHERE dir=? AND msgnum=?]

[2019-01-25 14:26:04] WARNING[32671][C-00000008]: format_wav.c:145 
check_header: Read failed (type)
[2019-01-25 14:26:04] WARNING[32671][C-00000008]: file.c:473 fn_wrapper: 
Unable to open format wav
[2019-01-25 14:26:04] WARNING[32671][C-00000008]: file.c:1252 
ast_streamfile: Unable to open 
/var/spool/asterisk/voicemail/usitest-VOICEMAIL/253/unavail (format 
(g722)): No such file or directory


This NULL in Context gets inserted into the greeting row when I record 
the greeting via Asterisk.  As soon as I change the NULL to anything 
else, the greeting plays normally when I call the users VM.

Asterisk 11 behaves in a similar manner if I manually insert a NULL into 
the context column of a greeting.  However, in Asterisk 11 when I record 
a greeting the context column gets set to the empty string, not NULL, so 
this should never happen.

 From what I can tell, either the playback function needs to be modified 
to ignore NULL values in the Context column, or the function that writes 
the greeting needs to be modified to not insert NULLS into this column.





More information about the asterisk-dev mailing list