Summary:ASTERISK-02969: [PATCH] remove need for voicemail-related symlinks in sounds directory
Reporter:Kevin P. Fleming (kpfleming)Labels:
Date Opened:2004-12-11 23:31:15.000-0600Date Closed:2008-01-15 15:20:59.000-0600
Versions:Frequency of
Environment:Attachments:( 0) voicemail_no_symlink_rev7.diff.txt
Description:The functions used by app_voicemail to play and record sound files can support fully-specified paths, so there is no particular need for the voicemail spool area to be symlinked into the sounds directory.

In addition, there are old "vm" symlinks that have no use in the current codebase, and there are rules in the Makefile to move old voicemail spools over the new, proper, location.

This patch removes all that cruft, and eliminates the need for the symlinks at all.

Warning: anyone upgrading to a version with this patch from an old version that still used ..sounds/vm as the voicemail spool area will need to manually move their voicemail spool. Upgraders from 1.x will not have any trouble.


Disclaimer is on file.
Comments:By: Mark Spencer (markster) 2004-12-11 23:59:43.000-0600

Why change it?

By: Kevin P. Fleming (kpfleming) 2004-12-12 09:34:50.000-0600

Because I keep my sound files for all my servers managed via an SCM repository (shared between all of them), and it is difficult to keep a symlink there.

It's also for consistency; there are already places in app_voicemail that reference the spool area via absolute path, and there are others that don't. If anyone wants to move the spool area from its default location, it's difficult to do properly. With this patch, all they have to do is change the value of VM_SPOOL_DIR (in the source) and it's done.

By: Mark Spencer (markster) 2004-12-12 11:46:19.000-0600

fair enough, but still some work to do on the patch...

VM_SPOOL_DIR is configurable through asterisk.conf too, so you have to use the symantics that are there for it.  Also, can you test it with the voicemail ODBC storage to be sure this breaks nothing there?

I noticed you removed all references to the symlinks from the Makefile.  I would prefer to leave the symlinks there even if they're not required for this version of the voicemail application because they can be useful for other reasons (e.g.

exten => _6XXX,1,Playback(voicemail/default/${EXTEN}/greet)

for example.  Thanks!

By: Kevin P. Fleming (kpfleming) 2004-12-12 11:56:50.000-0600

VM_SPOOL_DIR was defined but completely unused prior to my patch; that's why I re-purposed it. Also, AST_SPOOL_DIR is redefinable via asterisk.conf, but VM_SPOOL_DIR is not; you are correct, though, that runtime specification of AST_SPOOL_DIR will not work properly with this patch. I will correct that.

I don't have ODBC storage available to me, so I cannot actually test it, but I will review the code and try to ensure that I did not cause any breakage. Given that the ODBC storage feature is not very modularized, it's likely I did :-)

You are right, the "voicemail" symlink would be valuable to keep for some installations; the "vm" symlinks are not though, they are remnants from older releases. Would you be satisfied if I just restored the "voicemail" link only?

By: Kevin P. Fleming (kpfleming) 2004-12-18 21:45:24.000-0600

rediffed against current CVS

added back creation of "voicemail" symlink, for use in dialplan (app_voicemail no longer relies on it)

VM_SPOOL_DIR is now computed at module load time, so it will respect "astspooldir" setting in asterisk.conf

VM_SPOOL_DIR is defined to an empty string if ODBC storage is selected at compile time, so ODBC storage is unaffected by these changes (during this work, I noticed two functions that do not properly implement ODBC storage: play_message_callerid and vm_tempgreeting don't use the ODBC calls at all... someone else who uses ODBC storage will need to fix them up)

By: Mark Spencer (markster) 2004-12-19 18:41:07.000-0600

I really don't feel comfortable merging this without testing against ODBC storage.  We need to find someone to test it.

By: Kevin P. Fleming (kpfleming) 2005-01-01 22:02:52.000-0600

There were definitely problems with ODBC storage, new rev uploaded and being tested right now.

By: Mark Spencer (markster) 2005-01-07 00:28:00.000-0600

Waiting for the testing results.

By: silik0n (silik0n) 2005-01-09 17:26:56.000-0600

There is still a problem with VM retrieval when using ODBC stoarge. however this appears to be unrelated to this patch. see bug 3304 for details on the retrieval problems.

By: Mark Spencer (markster) 2005-01-09 17:47:47.000-0600

Not withstanding 3304, is there any problem here?

By: silik0n (silik0n) 2005-01-09 18:10:08.000-0600

Not withstanding 3304 it appears to work as advertised.

By: Mark Spencer (markster) 2005-01-09 22:15:12.000-0600

Added to CVS head, thanks!

By: Russell Bryant (russell) 2005-01-12 22:24:53.000-0600

not in 1.0

By: Digium Subversion (svnbot) 2008-01-15 15:20:59.000-0600

Repository: asterisk
Revision: 4743

U   trunk/Makefile
U   trunk/apps/app_voicemail.c
U   trunk/file.c

r4743 | markster | 2008-01-15 15:20:59 -0600 (Tue, 15 Jan 2008) | 2 lines

Fix voicemail symlinks (bug ASTERISK-2969)