[Home]

Summary:ASTERISK-27246: app_directory.c doesn't create /var/spool/asterisk/voicemail subdirectories after server move
Reporter:David Moore (dmoore)Labels:
Date Opened:2017-09-02 15:41:45Date Closed:2020-01-14 11:14:14.000-0600
Priority:MinorRegression?
Status:Closed/CompleteComponents:Applications/app_directory Applications/app_voicemail/ODBC
Versions:13.5.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Debian JessieAttachments:
Description:Not sure if this is actually a bug

After migrating an (odbc-voicemail-backed) asterisk installation to a new server (installing asterisk on new server and moving config files, etc) I was testing things. I went into Directory() and I was unable to get anyone's name to play back, asterisk insisted on spelling everything out. I eventually discovered this is because nothing is attempting to create any directories in /var/spool/asterisk/voicemail/ - which is empty because it's a new server. I have to write a shell script to create a bunch of empty directories so that app_directory can playback names.

This isn't an issue on the old server because when someone authenticates to a mailbox the directory structure is created

afaict this affects everything in 13.x.x

The workaround is good enough for my use case, I am reporting this only in case anyone better than I am with c code thinks it's a problem worth fixing
Comments:By: Asterisk Team (asteriskteam) 2017-09-02 15:41:46.648-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].

By: David Moore (dmoore) 2017-09-02 15:43:40.168-0500

[2017-09-02 14:59:57] WARNING[21781][C-00000001]: app_voicemail.c:3831 retrieve_file: Failed to open/create '/var/spool/asterisk/voicemail/context/234/greet.txt'




By: Rusty Newton (rnewton) 2017-09-05 18:49:25.755-0500

Silly question - have you compared the permissions on the folder between the two servers and to what Asterisk is running as?

Can you switch to the same user that Asterisk is running as and try to create a file in that folder?

Can you collect an additional debug log with everything turned up high to see if Asterisk gives us any other clues?

https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information

By: David Moore (dmoore) 2017-09-07 08:14:47.121-0500

Permissions were not an issue, everything was wide open and asterisk was running as root in both cases. The problem is that asterisk does not attempt to create the folder, I've reviewed the code segment in question and I have a very high level of confidence in that assertion based on what I observed

That log message as posted in the original bug report was with everything turned up high (except sip debug) there were no other failure indications



By: Rusty Newton (rnewton) 2017-09-07 18:47:12.219-0500

Do you have an analysis of the code segment you mentioned that you can share on this issue?

Or, can you describe how to reproduce the issue with minimal configuration on a new asterisk installation?


By: Asterisk Team (asteriskteam) 2017-09-22 12:00:02.004-0500

Suspended due to lack of activity. This issue will be automatically re-opened if the reporter posts a comment. If you are not the reporter and would like this re-opened please create a new issue instead. If the new issue is related to this one a link will be created during the triage process. Further information on issue tracker usage can be found in the Asterisk Issue Guidlines [1].

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines