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;

_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to