[Home]

Summary:ASTERISK-03836: [patch] Add Asterisk variable that contains file name and path of new voicemail
Reporter:boatright (boatright)Labels:
Date Opened:2005-04-01 14:36:23.000-0600Date Closed:2008-01-15 15:30:04.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Applications/app_voicemail
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) vm_patch_2.txt
Description:This patch returns the name (without extension) of the filename just written for a new voicemail message for use by AGI scripts that postprocess the voicemail file(s).

Example:

${vmfilename}

might evaluate to:

/var/spool/asterisk/voicemail/default/7010/INBOX/msg0001

Several uses I have found for this:

- Improve the sound quality of the voicemail (e.g., amplify and remove noise) by applying an external signal processing program

- Run a script that copies the voicemail into an independent web-based voicemail management system

(Disclaimer on file as of early this week.)

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

Note that I've tested this with CVS stable, but the CVS head doesn't compile today.  The patch is against the CVS head, though.
Comments:By: Kevin P. Fleming (kpfleming) 2005-04-01 15:48:52.000-0600

Please don't store the variable directly into the channel, use pbx_builtin_setvar_helper like the other app modules do.

For consistency with other voicemail variables, the name of this one should be in uppercase. I would suggest VM_MESSAGEFILE.

By: boatright (boatright) 2005-04-01 16:43:32.000-0600

Thanks for the pointers.  I've made the changes you suggested and posted a new patch.

By: Kevin P. Fleming (kpfleming) 2005-04-01 16:52:43.000-0600

OK; you mention that CVS HEAD does not compile, is that still a problem for you? It compiles fine here :-)

By: boatright (boatright) 2005-04-01 17:11:12.000-0600

Well, no, I cannot get it to compile (even before applying my patch).  I've only been using asterisk for about 2 weeks and normally use the stable branch which does compile just fine for me (with my patch as well).  I am not too worried about this personally (with respect to the patch). If you are, let me know and I'll try to figure out why I cannot compile.  The error I get is this:

ake[1]: Entering directory `/data/build/asterisk/ast_cvs_head/asterisk/apps'
gcc -pipe  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g  -Iinclude -I../include -D_REENTRANT -D_GNU_SOURCE  -O6 -march=i686  -DZAPTEL_OPTIMIZATIONS  -DASTERISK_VERSION=\"CVS-HEAD-04/01/05-16:30:16\" -DASTERISK_VERSION_NUM=999999 -DINSTALL_PREFIX=\"\" -DASTETCDIR=\"/etc/asterisk\" -DASTLIBDIR=\"/usr/lib/asterisk\" -DASTVARLIBDIR=\"/var/lib/asterisk\" -DASTVARRUNDIR=\"/var/run\" -DASTSPOOLDIR=\"/var/spool/asterisk\" -DASTLOGDIR=\"/var/log/asterisk\" -DASTCONFPATH=\"/etc/asterisk/asterisk.conf\" -DASTMODDIR=\"/usr/lib/asterisk/modules\" -DASTAGIDIR=\"/var/lib/asterisk/agi-bin\"     -DBUSYDETECT_MARTIN     -fomit-frame-pointer  -fPIC   -c -o app_settransfercapability.o app_settransfercapability.c
app_settransfercapability.c:22:20: libpri.h: No such file or directory
make[1]: *** [app_settransfercapability.o] Error 1

When I build from the stable branch I don't checkout libpri since I don't need it.  I blindly followed the directions for how to generate a patch and checked out libpri from the head, but "make" inside of the asterisk directory doesn't seem to find libpri.h in the directory that I checked out.  I am guessing I need to install libpri to make the .h visible, but I don't really want to do that.

edited on: 04-01-05 17:12

By: Kevin P. Fleming (kpfleming) 2005-04-01 18:03:27.000-0600

Thanks for the report; that is now corrected.

By: Kevin P. Fleming (kpfleming) 2005-04-01 19:15:55.000-0600

Committed to CVS, with an update to README.variables. Thanks!

By: Digium Subversion (svnbot) 2008-01-15 15:30:04.000-0600

Repository: asterisk
Revision: 5357

U   trunk/apps/app_voicemail.c
U   trunk/doc/README.variables

------------------------------------------------------------------------
r5357 | kpfleming | 2008-01-15 15:30:04 -0600 (Tue, 15 Jan 2008) | 2 lines

add VM_MESSAGEFILE channel variable to hold path to message left by caller (bug ASTERISK-3836, plus doc update)

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

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