I have commented out case 5, case 2 and case 3, leaving case 1, 4,6,7,8,9.

But when I press "1" on the menu, I hear: " I'm sorry, I did not understand your response"


        if (play_auto) {
                cmd = '1';
        } else {
                cmd = vm_intro(chan, vmu, &vms);
        }

        vms.repeats = 0;
        vms.starting = 1;
        while ((cmd > -1) && (cmd != 't') && (cmd != '#')) {
                /* Run main menu */
                switch (cmd) {
                case '1':
                        vms.curmsg = 0;
                        /* Fall through */
/* commented out from here
                case '5':
                        cmd = vm_browse_messages(chan, &vms, vmu);
                        break;

<snip code>

                                        if (vms.repeats > 3)
                                                cmd = 't';
                                }
                        }
                        if (cmd == 't') {
                                cmd = 0;
                                vms.repeats = 0;
                        }
                        break;
commented out till here */


Jonas.



On 06/07/2010 04:22 PM, Glenn O Larsen wrote:
On Mon, Jun 7, 2010 at 2:15 PM, Jonas Kellens<jonas.kell...@telenet.be>  wrote:
I made some changes to app_voicemail.c and recompiled asterisk. Now my
caller is only presented with the menu-choice I want.

However, the caller can still give another dtmf-input and be taken to that
specific menu.

How can I disable dtmf-input 2,3,4 if I only want the menu behind option 1
available ?
In the C code, find:

                 case '2': /* Change folders */
                         if (useadsi)
                                 adsi_folders(chan, 0, "Change to folder...");
                         cmd = get_folder2(chan, "vm-changeto", 0);

then add the lines:

+                       cmd = 0; /* Go back to root menu */
+                       break; /* don't continue */

so it look like this:

                 case '2': /* Change folders */
                         cmd = 0; /* Go back to root menu */
                         break; /* don't continue */
                         if (useadsi)
                                 adsi_folders(chan, 0, "Change to folder...");
                         cmd = get_folder2(chan, "vm-changeto", 0);


add the same lines to case 3 and 4..

Did that help?

-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

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

Reply via email to