Posted: Thu May 21, 2009 1:02 pm Post subject: [asterisk-users] Voicemail playback NEWEST first vs. OLDEST
FWIW, asterisk processes its’ voicemail in FIFO (First in First out) fashion using msgxxxx.* to store the messages, so it sends msg0000, then msg0001, etc. You could write a shell or perl or C script to do a “bubble sort” on all voicemails for a user.
Here is a listing of two voicemails
ll /var/spool/asterisk/voicemail/default/108/INBOX
total 612
-rwxr-xr-x 1 root root 25995 May 6 21:58 msg0000.WAV
-rwxr-xr-x 1 root root 26334 May 6 21:58 msg0000.gsm
-rw-r--r-- 1 root root 233 May 6 21:58 msg0000.txt
-rwxr-xr-x 1 root root 255404 May 6 21:58 msg0000.wav
-rwxr-xr-x 1 root root 24240 May 6 22:15 msg0001.WAV
-rwxr-xr-x 1 root root 24585 May 6 22:15 msg0001.gsm
-rw-r--r-- 1 root root 233 May 6 22:15 msg0001.txt
-rwxr-xr-x 1 root root 238444 May 6 22:15 msg0001.wav
If you did this:
Cd /var/spool/asterisk/voicemail/default/108/INBOX
Mv msg0000.* msg000x.*
Mv msg0001.* msg0000.*
Mv msg000x.* msg0001.*
You would then get the messages in LIFO (last in first out) order. You could create an AGI to do this sort each time the user checked voicemail.
Change dialplan from exten => 7000,1,Voicemailmain(${CALLERID(num)}@default)
To
<![if !supportLists]>n <![endif]>exten => 7000,1,AGI(sortmail.agi)
<![if !supportLists]>n <![endif]>exten => 7000,2,Voicemailmain(${CALLERID(num)}@default)
This would of course be more difficult if your voicemail is realtime or database based.
From:asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Karl Fife
Sent: Wednesday, May 20, 2009 7:28 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [asterisk-users] Voicemail playback NEWEST first vs. OLDEST first
Is there a way to make the asterisk voicemail app play back messages in NEWEST FIRST order, instead of OLDEST FIRST? I see the situation repeatedly where someone needs to dip into their voicemail archive to get something from a recently saved voicemail message, and they have to slog through lots of irrelevant stuff to get there.
I have seen this question come up previously on this list without an answer. I'm hoping that someone can shed light on how to do it, or confirm that it is NOT currently supported.
I've looked at the new 1.6 voicemail.conf and it doesn't seem have any parameters that speak to that feature, nor an voicemailmain parameter in 1.4 or 1.6.
Can anyone confirm that this is not supported, or enlighten us on how-to?
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum