[Home]

Summary:ASTERISK-03913: Mailbox cannot start with letters "sbu"
Reporter:ssljivic (ssljivic)Labels:
Date Opened:2005-04-11 10:09:05Date Closed:2008-01-15 15:31:33.000-0600
Priority:TrivialRegression?No
Status:Closed/CompleteComponents:Applications/app_voicemail
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) asterisk-1.0.5-voicemail-options.patch
( 1) voicemailopts.rev0.txt
( 2) voicemailopts.rev1.txt
Description:A mailbox name cannot start with any combination of letters sbu. These letters are used for prompt selection.
Can we change the code:
while(*ext) {
if (*ext == 's') {
silent = 2;
ext++;
} else if (*ext == 'b') {
busy=1;
ext++;
} else if (*ext == 'u') {
unavail=1;
ext++;
} else
break;

to:

if (*ext && *ext == '-')
{
ext++;
if (*ext == 's')
{
silent = 2;
ext++;
}
else if (*ext == 'b')
{
busy=1;
ext++;
}
else if (*ext == 'u')
{
unavail=1;
ext++;
}
}
This code is located in vm_exec function.

Also in vm_box_exists function we have:
while(*box) {
if ((*box == 's') || (*box == 'b') || (*box == 'u')) {
box++;
} else
break;
}

that should be changed to:

if (*box && *box == '-')
{
box++;
if ((*box == 's') || (*box == 'b') || (*box == 'u'))
{
box++;
}
}

Regards,
Stojan Sljivic
Comments:By: Tilghman Lesher (tilghman) 2005-04-11 11:12:15

Normally, since letters are not dialable, this precludes the use of letters in mailbox names.

By: Tilghman Lesher (tilghman) 2005-04-11 11:14:06

If you're proposing a code change, please upload a patch according to the bug guidelines.

By: Clod Patry (junky) 2005-04-11 11:14:12

Could you attach a patch with -u format please?

By: Russell Bryant (russell) 2005-04-11 22:00:41

So you are proposing that everyone using Asterisk Voicemail would have to change their config to Voicemail(-b${EXTEN}) from Voicemail(b${EXTEN}) ?

That is obviously not a backwards compatible change, and only creates another of the same kind of "problem".  Mailboxes wouldn't be able to start with '-'.

By: Mark Spencer (markster) 2005-04-12 00:59:22

One option would be to add a "|options" where if the "options" was present it would not look for "sub" there, but would look in options.

By: ssljivic (ssljivic) 2005-04-12 05:26:31

Hi,

I have uploaded a patch file.

The changes include adding the 'options' optional parameter for VoiceMail and VoiceMailMain, as markster suggested.

I have also removed the prefix trimming in the function VoicemailExists().

Regards,
Stojan Sljivic

By: ssljivic (ssljivic) 2005-04-12 05:31:35

Hi,

I would like to explain why we need a feature to have mailbox ids to be non-numeric.
It is true that only numbers are dial-able, but when you use SIP, for instance, than the extension can be any string:
stojan@my-asterisk-pbx
If no one answers at the extension 'stojan', the call would be forwarded to the mailbox with the same id ('stojan').

I hope that you'll accept the patch and include it in the Asterisk.

Regards,
Stojan Sljivic

By: Clod Patry (junky) 2005-04-12 06:24:10

Do you have any disclaimer on file with digium?
If not, please read the bugs guidelines.

By: Russell Bryant (russell) 2005-04-12 12:53:33

I have implemeted this as per Mark's suggestion.  It will now expect Voicemail(1234|b), and if the '|' wasn't found, it will look for the options in the old fashion.  The documentation has been updated to reflect the new method, but it should be totally backwards compatible (unless of course, you have a mailbox beginning with one of those letters, and you don't supply an option for the greeting).

Disclaimer is on file

By: Russell Bryant (russell) 2005-04-12 12:55:02

Wow ... I totally did not read the updates to this bug before uploading my patch.  :)

By: Russell Bryant (russell) 2005-04-12 13:11:13

I have uploaded a rev1 of my patch against CVS head.

I have reviewed sslijic's patch, and updated my patch for CVS HEAD.  (sslijic - this kind of patch will not be accepted into the 1.0 branch, since it is a new feature.)

I changed VoiceMailMain to use the new option style as well.  I have also removed that part from MailboxExists, since as noted in sslijivic's patch, it doesn't really make sense for it to be there.

By: Kevin P. Fleming (kpfleming) 2005-04-13 00:32:00

Fix committed to CVS, with minor modifications (VoicemailMain actually didn't support 's' and 'p' at the same time, even though the docs said it did). Thanks to both of you!

By: Kevin P. Fleming (kpfleming) 2005-04-13 00:35:14

Not for stable (new feature)

By: Digium Subversion (svnbot) 2008-01-15 15:31:33.000-0600

Repository: asterisk
Revision: 5461

U   trunk/apps/app_voicemail.c

------------------------------------------------------------------------
r5461 | kpfleming | 2008-01-15 15:31:33 -0600 (Tue, 15 Jan 2008) | 2 lines

support postfix options in voicemail apps (prefix options still supported using old syntax) (bug ASTERISK-3913)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=5461