Summary:ASTERISK-08209: [patch] Forwarding old voicmail to another user will just be sent to email not to target voicemail
Reporter:ar_daei (ar_daei)Labels:
Date Opened:2006-11-28 18:11:05.000-0600Date Closed:2007-01-16 18:29:42.000-0600
Versions:Frequency of
Environment:Attachments:( 0) 20061129__bug8440.diff.txt
Description:In Ver 1.2.13 if any user tries to forward old/saved voicemail to another user,
Asterisk will send that voicmail to target email, it will not send it to target voicemail. So WMI on target phone wont lid and even if target user dials in voicemail there wont be any new message.
Although target user will have new email with forwarded voicemail attached.
This issue will not show up with new voicmails, that why i thought this could be by design and i don't know about it.


Nov 28 16:43:32 NOTICE[707]: app_voicemail.c:2313 copy_message: Copying message from 109@inside to 126@inside
Nov 28 16:43:32 WARNING[707]: app_voicemail.c:1419 copy: Unable to open /var/spool/asterisk/voicemail/inside/109/INBOX/msg0000.txt in read-only mode
Nov 28 16:43:32 WARNING[707]: app_voicemail.c:1565 base_encode: Failed to open log file: /var/spool/asterisk/voicemail/inside/126/INBOX/msg0000.WAV: No such file or directory
Comments:By: ar_daei (ar_daei) 2006-11-29 10:51:38.000-0600

I forgot to add, asterisk is running on CentOS 4.4 with root user privilege.
Also in most cases emailed wav file wont play.

By: ar_daei (ar_daei) 2006-11-29 11:13:30.000-0600

I put some more attention to it and got this:
It seems its trying to retrieve wav from INBOX folder although Old messages are in Old sub folder.
So instead of looking at /var/spool/asterisk/voicemail/inside/126/INBOX/msg0000.WAV
it should be looking at this location :

By: Tilghman Lesher (tilghman) 2006-11-29 23:44:06.000-0600

Please test this patch and ensure that it fixes the issue for you.

By: ar_daei (ar_daei) 2006-11-30 10:17:36.000-0600

Forgive me for being dumb!
how do i apply this patch?
Or of you send me a link to read i would really appreciated.
thank you!

By: Tilghman Lesher (tilghman) 2006-11-30 10:50:32.000-0600

cd /usr/src/asterisk
patch -p0 < /path/to/patch/file

By: ar_daei (ar_daei) 2006-11-30 15:08:39.000-0600

Okay, here is what i got

[root@localhost asterisk-1.2.13]# patch -p0 < vmailfix.txt
patching file apps/app_voicemail.c
Hunk #1 succeeded at 2304 (offset -5 lines).
Hunk #3 succeeded at 3372 (offset -55 lines).
Hunk #4 FAILED at 3510.
Hunk ASTERISK-1 succeeded at 5308 (offset -2 lines).
Hunk ASTERISK-2 succeeded at 5336 (offset -55 lines).
1 out of 6 hunks FAILED -- saving rejects to file apps/app_voicemail.c.rej

By: ar_daei (ar_daei) 2006-11-30 15:10:38.000-0600

I also attached app_voicemail.c.rej
and after recompiling it ended with following error :
app_voicemail.c: In function `forward_message':
app_voicemail.c:3512: error: `dir' undeclared (first use in this function)
app_voicemail.c:3512: error: (Each undeclared identifier is reported only once
app_voicemail.c:3512: error: for each function it appears in.)
app_voicemail.c:3512: error: `curmsg' undeclared (first use in this function)
make[1]: *** [app_voicemail.o] Error 1
make[1]: Leaving directory `/usr/src/asterisk-1.2.13/apps'
make: *** [subdirs] Error 1

Please Advise my next action.
thank you!

By: Tilghman Lesher (tilghman) 2006-11-30 17:24:13.000-0600

You'll probably need to upgrade to the latest 1.2 SVN, then.

By: Tilghman Lesher (tilghman) 2007-01-16 18:29:42.000-0600

Fixed a different way in 50946.