[Home]

Summary:ASTERISK-28425: Realtime Voicemail locks Asterisk when no filesystem folder exists
Reporter:Mark Kozusnik (mkozusnik)Labels:
Date Opened:2019-05-23 08:15:24Date Closed:2019-05-23 09:01:19
Priority:MinorRegression?
Status:Closed/CompleteComponents:Applications/app_voicemail/ODBC
Versions:13.12.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Ubuntu 14.04 + Asterisk 13.12. Might affect newer versions. I compared app_voicemail.c on 13.26 and found very minor differences.Attachments:( 0) core_lock_bt.txt
Description:We have a multi-cluster environment with realtime ODBC voicemail served on each server. When a new mailbox is created in the central management tool, it passes that mailbox to every server, and creates a database record in voicemail_users. In the case where a voicemail exists for that server, a corresponding folder is created in /var/spool/asterisk/voicemail/{context}/ when it's first used.

When a user is attempting to forward a voicemail from their server to a voicemail box which does not have a filesystem folder (exists on a different server), asterisk locks up. The current sip calls continue, but no new calls can be made to or from that server. The CLI also becomes unresponsive, but AMI messages are still showing. Cannot "core restart now" asterisk from the CLI. The process has to be killed and restarted manually.

I created a workaround with a program which creates a folder for each voicemail_users entry if it doesn't already exist. I still need to create one to move the forwarded voicemails to the servers where the boxes live, but that's not something for this discussion.

This can be repeated by creating 2 voicemail boxes on a server, 1111 and 2222 in the voicemail_users table, but make sure that only 1111 exists in /var/spool/asterisk/voicemail/{context}/. Delete 2222 if it exists. Call and leave a voicemail for 1111. Dial in to retrieve 1111's voicemail. Press option 1 to listen to new, then option 8 to forward. (No prepending needed) Dial 2222. The following message will be logged in the CLI and you will no longer be able to call that server.

Example from my server:
app_voicemail.c: Failed to open/create '/var/spool/asterisk/voicemail/from-internal-sip/2222/greet.txt'

No core files are created, but I extracted a backtrace as best I could.
Comments:By: Asterisk Team (asteriskteam) 2019-05-23 08:15:25.778-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

By: Mark Kozusnik (mkozusnik) 2019-05-23 08:16:12.770-0500

Contains 'core show locks' and the bt.

By: Joshua C. Colp (jcolp) 2019-05-23 08:25:47.114-0500

It appears the bug you have submitted is against a rather old version of a supported branch of Asterisk. There have been many issues fixed between the version you are using and the current version of your branch. Please test with the latest version in your Asterisk branch and report whether the issue persists.

Please see the Asterisk Versions [1] wiki page for info on which versions of Asterisk are supported.
[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Versions



By: Mark Kozusnik (mkozusnik) 2019-05-23 08:57:34.188-0500

Thanks for the update. The 13.26 version does not have the problem.

[May 23 09:53:07] WARNING[11485][C-00000003]: app_voicemail.c:3945 retrieve_file: Failed to open/create '/var/spool/asterisk/voicemail/from-internal-sip/14595/greet.txt'
   -- <SIP/14594-00000005> Playing 'digits/1.g722' (language 'en')
   -- <SIP/14594-00000005> Playing 'digits/4.g722' (language 'en')
   -- <SIP/14594-00000005> Playing 'digits/5.g722' (language 'en')
   -- <SIP/14594-00000005> Playing 'digits/9.g722' (language 'en')
   -- <SIP/14594-00000005> Playing 'digits/5.g722' (language 'en')
   -- Remote UNIX connection
   -- Remote UNIX connection disconnected
   -- <SIP/14594-00000005> Playing 'vm-forwardoptions.g722' (language 'en')
[May 23 09:53:15] NOTICE[11485][C-00000003]: app_voicemail.c:6009 copy_message: Copying message from 14594@from-internal-sip to 14595@from-internal-sip
   -- <SIP/14594-00000005> Playing 'vm-msgforwarded.g722' (language 'en')


We're 3 years in and still have 700+ phones to convert, so it may be a while before I can upgrade all of the servers. Please close this bug report. Thanks again.