Robert La Ferla
2006-Mar-09 08:20 UTC
[Asterisk-Users] Getting to the last "old" voicemail message
If you have many old voicemail messages, to get to the most recent one, you have to keep hitting "6" until you reach the last one. It would be better if you could hit "4" from the first message to get to the last message and/or have a digit that takes you the first and last messages respectively. Anyone have any patches for this?
Robert La Ferla
2006-Mar-09 10:14 UTC
[Asterisk-Users] Re: Getting to the last "old" voicemail message
I made a small change to apps/app_voicemail.c to permit circular navigation when listening to messages. If you are at the first message, and press "4", it takes you to the last message. If you are already at the last message and press "6", it takes you to the first message. I did a quick test and it seems to work. If you apply it and find any problems, please let me know and I'll fix it. I don't have a diff but here's the code in function vm_execmain(): case '4': if (vms.curmsg) { vms.curmsg--; cmd = play_message(chan, vmu, &vms); } else { /* cmd = ast_play_and_wait(chan, "vm-nomore"); */ vms.curmsg = vms.lastmsg; cmd = play_message(chan, vmu, &vms); } break; case '6': if (vms.curmsg < vms.lastmsg) { vms.curmsg++; cmd = play_message(chan, vmu, &vms); } else { /* cmd = ast_play_and_wait(chan, "vm-nomore"); */ vms.curmsg = 0; cmd = play_message(chan, vmu, &vms); } break;