[Home]

Summary:ASTERISK-10418: Voicemail to Email not working with ODBC_STORAGE
Reporter:Afshin Mashayekhi (afshin)Labels:
Date Opened:2007-10-01 00:07:33Date Closed:2011-06-07 14:03:23
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Applications/app_voicemail
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:If you use realtime/ODBC storage for voicemails, asterisk can't send voicemail to email. We checked our mailserver and I'm sure that it can't even find the message text file to send out the email.

I think you delete those files before sending email.
Comments:By: Afshin Mashayekhi (afshin) 2007-10-02 21:29:07

I found something new..
When I run as user "root" it works and there is no problem..
but when I run it as user "asterisk" it give me the permission error..
I double checked all asterisk folders or temp folders to make sure they have full permission for the user "asterisk" and I couldn't find anything wrong.
Is there any folder that might exist in new versions of voicemail application rather thatn the /var/spool/asterosk/xxx?

By: Afshin Mashayekhi (afshin) 2007-10-03 00:06:07

Some log:

  -- Executing [s@macro-get-voicemail:110] VoiceMail("SIP/ONT-1100-b7b2bc40", "3030@one-phones|") in new stack
   -- <SIP/ONT-1100-b7b2bc40> Playing 'vm-intro' (language 'en')
voice1*CLI>
voice1*CLI>
voice1*CLI>
voice1*CLI>
voice1*CLI>
   -- <SIP/ONT-1100-b7b2bc40> Playing 'beep' (language 'en')
   -- Recording the message
   -- x=0, open writing:  /var/spool/asterisk/voicemail/one-phones/3030/tmp/SZdPRR format: wav, 0x8ac6760
   -- User hung up
 == Parsing '/var/spool/asterisk/voicemail/one-phones/3030/INBOX/msg0002.txt': Not found (Permission denied)
[Oct  4 01:15:30] WARNING[3160]: app_voicemail.c:1026 retrieve_file: Failed to open/create '/var/spool/asterisk/voicemail/one-phones/3030/INBOX/msg0002.txt'
 == Spawn extension (macro-get-voicemail, s, 110) exited non-zero on 'SIP/ONT-1100-b7b2bc40'
Really destroying SIP dialog '00152b67-ddbd0009-01d55fcf-3344c133@172.21.101.161' Method: BYE
voice1*CLI>
voice1*CLI>

By: Tilghman Lesher (tilghman) 2007-10-04 15:48:52

It is very clear from the error that this is a permissions problem.  Please run the following command as root:

chown -R asterisk /var/spool/asterisk/voicemail

and try this again.  I believe the problem will go away entirely.

By: Afshin Mashayekhi (afshin) 2007-10-04 18:25:50

I was running asterisk 1.4.6 with the same configuration and running as "asterisk" and I've already changed the owner of /var/spool/asterisk to "asterisk:asterisk" and did the same thing this time but it doesn't fix the problem.... There should be another folder or something else that doesn't have the correct permission...

By: Tilghman Lesher (tilghman) 2007-10-04 23:18:04

That is the only directory that needs to be changed.  However, note the "-R", which is recursive.  You must run with that flag, or it will not change the ownership of all of the directories underneath.

By: Afshin Mashayekhi (afshin) 2007-10-05 00:56:36

I know about -r and I've already done that...
could u try to run asterisk as "asterisk:asterisk" to see exactly what is the problem...

Thank you

By: Tilghman Lesher (tilghman) 2007-10-05 12:18:06

== Parsing '/var/spool/asterisk/voicemail/one-phones/3030/INBOX/msg0002.txt': Not found (Permission denied)

This is the only thing that I need to know.  The error is permission denied, which means that one or more components of the path do not have 'x' or 'w' permission for the user asterisk.

By: Tilghman Lesher (tilghman) 2007-10-05 12:19:22

If you prefer, please come on #asterisk-bugs on irc.freenode.net and ask to speak to one of the bug marshals.  Be prepared to give remote root access to this machine.

By: Joshua C. Colp (jcolp) 2007-10-29 15:47:30

It's been 24 days and no reply. Corydon is willing to help you so if this is still an issue please feel free to reopen.