[Home]

Summary:ASTERISK-10899: voicemail directory is not created until user is left a message
Reporter:Simon P. Ditner (spditner)Labels:
Date Opened:2007-11-27 12:38:17.000-0600Date Closed:2007-12-17 14:17:23.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Applications/app_voicemail
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:eg 1. If for instance, you create a voicemail user, and have them dial in to set up their account, their spool directory will not yet exist, and they will be unable to set their greetings. Example solution for this attached.

eg 2. If you do have a message waiting (i.e. stored in IMAP), and your voicemail directory is missing (for whatever reason), pressing '5' from the main menu will crash asterisk. backtrace shown in add. info field.

****** ADDITIONAL INFORMATION ******

(gdb) bt
#0  0xb7e344ed in fclose () from /lib/libc.so.6
#1  0xb5c7b512 in save_body (body=<value optimized out>, vms=<value optimized out>, section=<value optimized out>, format=0xb5ff2888 "WAV") at app_voicemail.c:8367
#2  0xb5c88e1c in play_message (chan=0x8231d50, vmu=0xb5ffd180, vms=0xb5ff3c54) at app_voicemail.c:4450
#3  0xb5c918c1 in vm_execmain (chan=0x8231d50, data=0xb6002078) at app_voicemail.c:6580
#4  0x080cce6c in pbx_extension_helper (c=0x8231d50, con=0x0, context=0x8231ed0 "macro-voicemailmanager", exten=0x8231f20 "s", priority=2, label=0x0, callerid=0x820f2a0 "None",
   action=E_SPAWN) at pbx.c:532
ASTERISK-1  0xb72c128b in _macro_exec (chan=0x8231d50, data=<value optimized out>, exclusive=0) at app_macro.c:308
ASTERISK-2  0x080cce6c in pbx_extension_helper (c=0x8231d50, con=0x0, context=0x8231ed0 "macro-voicemailmanager", exten=0x8231f20 "s", priority=1, label=0x0, callerid=0x820f2a0 "None",
   action=E_SPAWN) at pbx.c:532
ASTERISK-3  0x080cebd6 in __ast_pbx_run (c=0x8231d50) at pbx.c:2295
ASTERISK-4  0x080cfb9e in pbx_thread (data=0x8231d50) at pbx.c:2610
ASTERISK-5  0x080fe15b in dummy_start (data=0x8216268) at utils.c:843
ASTERISK-6 0xb7f8ae5a in start_thread () from /lib/libpthread.so.0
Comments:By: Simon P. Ditner (spditner) 2007-11-27 12:40:34.000-0600

Index: apps/app_voicemail.c
===================================================================
--- apps/app_voicemail.c        (revision 89527)
+++ apps/app_voicemail.c        (working copy)
@@ -5930,6 +5930,10 @@
       unsigned char buf[256];
       int bytes=0;

+   char dir[PATH_MAX], tmpdir[PATH_MAX];
+   create_dirpath(dir, sizeof(dir), vmu->context, vms->username, "INBOX");
+   create_dirpath(tmpdir, sizeof(tmpdir), vmu->context, vms->username, "tmp");
+
       if (ast_adsi_available(chan))
       {
               bytes += adsi_logo(buf + bytes);

By: Eliel Sardanons (eliel) 2007-11-27 16:02:39.000-0600

Please upload patch as a file don't post it on a message, also patch should apply against 1.4 branch and if needed to trunk too.

By: Mark Michelson (mmichelson) 2007-11-29 18:50:49.000-0600

I have tested this, and found that both of these are only affected by using IMAP storage for voicemail. It seems like this could be fixed more simply than the patch provided by removing the #ifndef IMAP_STORAGE from arond the current call to create_dirpath, but I will have to test to be certain that this is enough.

By: Mark Michelson (mmichelson) 2007-12-17 13:44:56.000-0600

So I tested this a little over a week ago and apparently forgot to update the issue with my results. My mistake. Removing the #ifndef IMAP_STORAGE did the trick just fine. I will commit that change and close this issue out.

By: Digium Subversion (svnbot) 2007-12-17 13:50:39.000-0600

Repository: asterisk
Revision: 93291

U   branches/1.4/apps/app_voicemail.c

------------------------------------------------------------------------
r93291 | mmichelson | 2007-12-17 13:50:39 -0600 (Mon, 17 Dec 2007) | 6 lines

We need to create the directory for a voicemail user even if they are using IMAP storage
since greetings are stored in the filesystem.

(closes issue ASTERISK-10899, reported by spditner, patch by me inspired by a patch by spditner)


------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=93291

By: Digium Subversion (svnbot) 2007-12-17 14:17:23.000-0600

Repository: asterisk
Revision: 93293

_U  trunk/
U   trunk/apps/app_voicemail.c

------------------------------------------------------------------------
r93293 | mmichelson | 2007-12-17 14:17:23 -0600 (Mon, 17 Dec 2007) | 14 lines

Merged revisions 93291 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r93291 | mmichelson | 2007-12-17 13:53:48 -0600 (Mon, 17 Dec 2007) | 6 lines

We need to create the directory for a voicemail user even if they are using IMAP storage
since greetings are stored in the filesystem.

(closes issue ASTERISK-10899, reported by spditner, patch by me inspired by a patch by spditner)


........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=93293