Re: [asterisk-users] Can one adjust the voicemail-menu when using VoiceMailMain() ?

2010-06-09 Thread Jonas Kellens

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 Kellensjonas.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

Re: [asterisk-users] Can one adjust the voicemail-menu when using VoiceMailMain() ?

2010-06-09 Thread C. Chad Wallace

At 4:04 PM on 09 Jun 2010, Jonas Kellens wrote:

 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

Looks like someone broke the first rule of Optimization Club[1].  I
think you need to copy these two lines from case 5 into case 1:

  cmd = vm_browse_messages(chan, vms, vmu);
  break;

It just so happens that cases 1 and 5 run the same command, so whoever
wrote it took advantage of that, optimizing the size of the binary
while reducing maintainability.


[1]
http://perlbuzz.com/mechanix/2008/02/the-rules-of-optimization-club.html



  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 */


-- 

C. Chad Wallace, B.Sc.
The Lodging Company
http://www.lodgingcompany.com/
OpenPGP Public Key ID: 0x262208A0



signature.asc
Description: PGP signature
-- 
_
-- 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

Re: [asterisk-users] Can one adjust the voicemail-menu when using VoiceMailMain() ?

2010-06-07 Thread Jonas Kellens
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 ?



Kind regards,

Jonas.


On 06/05/2010 10:39 PM, Glenn O Larsen wrote:

On Sat, Jun 5, 2010 at 6:26 PM, Jonas Kellensjonas.kell...@telenet.be  wrote:
   

Hello list.

The VoiceMailMain()-application has an advanced menu. Can I get a
Voicemail-application that has less functionality ?

I only want the user to listen to new voicemail-messages (and delete them),
not the functionality with the folders and redirecting messages to other
mailboxes...

I've looked at the code in /usr/src/asterisk-1.4.30/apps/app_voicemail.c but
it seems complicated to disable some functionality.

Can I extract just these options :

[SNIP]
 

This shouldn't be that hard... What you can try is to comment out the

if (!res  !skipadvanced)
res = ast_play_and_wait(chan, vm-advopts);

and add
cmd = 0;
break;

after the all the case's you would like to skip...

   
-- 
_
-- 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

Re: [asterisk-users] Can one adjust the voicemail-menu when using VoiceMailMain() ?

2010-06-07 Thread Glenn O Larsen
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?

-- 
Best regards,
Glenn Larsen

-- 
_
-- 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


[asterisk-users] Can one adjust the voicemail-menu when using VoiceMailMain() ?

2010-06-05 Thread Jonas Kellens

Hello list.

The VoiceMailMain()-application has an advanced menu. Can I get a 
Voicemail-application that has less functionality ?


I only want the user to listen to new voicemail-messages (and delete 
them), not the functionality with the folders and redirecting messages 
to other mailboxes...


I've looked at the code in /usr/src/asterisk-1.4.30/apps/app_voicemail.c 
but it seems complicated to disable some functionality.


Can I extract just these options :

   * *1* Read voicemail messages
 o *3* Advanced options
   + *1* Reply
   + *2* Call back(1)
   + *3* Envelope
   + *4* Outgoing call(1)
   + *5* Send Message
 o *4* Play previous message
 o *5* Repeat current message
 o *6* Play next message
 o *7* Delete current message
 o *8* Forward message to another mailbox
   + *1* Use Voicemailnumber
   + *2* Use Voicemail Directory
 o *9* Save message in a folder
   + *0* Save in new Messages
   + *1* Save in old Messages
   + *2* Save in Work Messages
   + *3* Save in Family Messages
   + *4* Save in Friends Messages
 o *** Help; during msg playback: Rewind
 o *#* Exit; during msg playback: Skip forward
   * *2* Change folders
 o *0* Switch to new Messages
 o *1* Switch to old Messages
 o *2* Switch to Work Messages
 o *3* Switch to Family Messages
 o *4* Switch to Friends Messages
   * *3* Advanced Options
 o *5* Send Message
   + *1* Use Voicemailnumber
   + *2* Use Voicemail Directory
   * *0* Mailbox options
 o *1* Record your unavailable message
 o *2* Record your busy message
 o *3* Record your name
 o *4* Record your temporary message
   + *1* Record your temporary message
   + *2* Erase your temporary message (going back to the
 standard message)
 o *5* Change your password
 o *** Return to the main menu
   * *** Help
   * *#* Exit



Jonas.

-- 
_
-- 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

Re: [asterisk-users] Can one adjust the voicemail-menu when using VoiceMailMain() ?

2010-06-05 Thread Glenn O Larsen
On Sat, Jun 5, 2010 at 6:26 PM, Jonas Kellens jonas.kell...@telenet.be wrote:
 Hello list.

 The VoiceMailMain()-application has an advanced menu. Can I get a
 Voicemail-application that has less functionality ?

 I only want the user to listen to new voicemail-messages (and delete them),
 not the functionality with the folders and redirecting messages to other
 mailboxes...

 I've looked at the code in /usr/src/asterisk-1.4.30/apps/app_voicemail.c but
 it seems complicated to disable some functionality.

 Can I extract just these options :

 [SNIP]

This shouldn't be that hard... What you can try is to comment out the

   if (!res  !skipadvanced)
   res = ast_play_and_wait(chan, vm-advopts);

and add
   cmd = 0;
   break;

after the all the case's you would like to skip...

-- 
Best regards,
Glenn Larsen

-- 
_
-- 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