Asterisk – “I’m sorry an error has occurred”

I recently experienced an issue with Asterisk 1.8 and the voice mail module. If a voice mail is recorded and is less than 6 seconds a non-descript error message will be played:

“I’m sorry an error has occurred”

The cause is a default 5 second voice mail restriction within Asterisk. The solution is to edit: /etc/asterisk/vm_general.inc and edit the following variables:

; Asterisk post 1.6.2 options the minmessage and maxmessage are deprecated in favor of these
; which are per user settable also:
maxsecs=600                     ; max length of vm message
minsecs=1                       ; Minimum length of a voicemail message in seconds

Save the file then restart the amportal (# amportal restart)

Note that this will set the maximum length of a voice mail to 10 minutes and the minimum length to 1 second.