Asterisk will crash (hang, but AMI still seems to work) if a voicemail is forwarded to another mailbox and that mailbox doesn’t have a corresponding filesystem folder (/var/spool/asterisk/voicemail/{context}/{mailbox}). We have multiple clusters, each has local ODBC voicemail. The voicemail_users table contains a list of every mailbox, even if that box is on a different system.
Example:
Server1 has mailbox 1111 and 2222 in voicemail_users, but only 1111 exists in /var/spool/asterisk/voicemail/from-internal-sip/
2222 is on a different server.
Log Example
[May 21 07:44:06] WARNING[15227][C-00000017] app_voicemail.c: Failed to open/create '/var/spool/asterisk/voicemail/from-internal-sip/13661/greet.txt'
[May 21 07:44:06] VERBOSE[15227][C-00000017] file.c: <SIP/14974-00000026> Playing 'digits/1.g722' (language 'en')
[May 21 07:44:06] VERBOSE[15227][C-00000017] file.c: <SIP/14974-00000026> Playing 'digits/3.g722' (language 'en')
[May 21 07:44:07] VERBOSE[15227][C-00000017] file.c: <SIP/14974-00000026> Playing 'digits/6.g722' (language 'en')
[May 21 07:44:08] VERBOSE[15227][C-00000017] file.c: <SIP/14974-00000026> Playing 'digits/6.g722' (language 'en')
[May 21 07:44:09] VERBOSE[15227][C-00000017] file.c: <SIP/14974-00000026> Playing 'digits/1.g722' (language 'en')
A message is forwarded from mailbox 1111 to 2222 on Server1. Asterisk finds the mailbox in ODBC, but when it attempts to forward, Asterisk crashes and stops accepting input in the CLI. Current calls stay active, but new calls receive a busy signal. I’ve had to kill the asterisk process and restart it.
My current live version = 13.12, but I compared app_voicemail.c to 13.26 also. I didn’t see any changes that would affect this.
I created a workaround by writing a program to create the “missing” voicemail boxes locally based on what’s in the database. I’ll need to write another program to move the forwarded messages to the proper cluster.
I assume most people centralize their voicemail, so it might not affect many people. That’s not an option for us. Wasn’t sure if it needed to be a bug report or if this will suffice.