Broke Voicemail Admin after adding multiple emails

Hey guys,
I wanted to have one vm box send to multiple email address, so i added them and seperated with commas
Well it didnt work but als looks like i messed up the DB or something cuz the email addresses appear next to “name”

Do i have to restore a backup :confused:

Next time you do this you need to use semi colons not commas to separate emails.

Perhaps the system should check that a valid email has been entered. The system should throw an error if something other than a semi colons is used. The popup help should also explain that a semi colons is required and provide an example.

Thanks Andrew @tm1000
I will have to do a retore and then I will use semi colons next time

@alan

That would be nice, but if making pretty error message and help msg is too much work, at least make it so it filters out things that break the database. Wouldn’t that mean it is SQL injection vulnerable being that it inserted the other email addresses by the name field when I refreshed

@rchase it should not be necessary to restore from backup, locate the file /etc/asterisk/voicemail.conf and near the bottom will be the settings for each voicemail box. If you are careful you can manually delete the extra email addresses (or change to semicolons), save changes and browse back to voicemail admin. Prob best to make a backup of the file first.

If you can do multiple emails separate by semi-colons, that fact should be added to the tooltip in both the voicemail admin module and the extensions module…

Some one should clarify or correct

http://wiki.freepbx.org/display/F2/Sending+Voicemail+to+more+then+1+email+address

which uses commas (which I would offer is patently inappropriate in /etc/asterick/voicemail.conf ), If asterisk is currently patched, by what ever means (there have been more than one patch offered) then the syntax needs clarification and the authority of the patch identified, either for only the Distro version or more generally for those who don’t use the Distro.

Hmm. Apparently it is commas. I need to go look and see if Voicemail Admin supports multiple commas. However I’m shooting in the dark here as I dont even know if the OP was on 2.11 of FreePBX or not.

As we stated in a previous ticket you posted we can’t do that because we patch asterisk 11 to support this feature. There is no way to query Asterisk if it supports this or not.

Andrew,

I don’t think I’ve ever posted a ticket on this subject, so I’m not sure that we’re on the same page here.

I’m saying that if FreePBX allows the entry of multiple email addresses in this field (whether separate by a comma or a semi-colon), the tooltip should so indicate and should explain how to do that.

I think that I understand you as saying that the Distro patches Asterisk to support that feature, so it may not always work. If that’s the case, the perhaps the tooltip should say:

“Enter the email address here. The FreePBX Distro allows the use of multiple email addresses separated by a [comma/semi-colon], but not all distributions support this feature.”

I was totally unaware of this option myself. Perhaps the OP was not using the Distro, and since he doesn’t have the patch, it caused a database issue??

This from Michael Newton a pragmatist after my own heart :smile:

Seems to patch/work fine against a generic Asterisk 11.* source if that is how you roll, he uses a “|” which is logical, and compliant with voicemail.conf where either a comma or a semicolon are surely a little problematic ( I have always used “&” as a separator in that file but that is only a preference) and FreePBX GUI seems to translate either a coma or a pipe to a pipe in that file.

The approved patch by digium uses “|” in freepbx we turn commas into pipes. Users need to enter commas.

As I said. FreePBX apparently accepts either a comma or a pipe and translates it to a pipe in voicemail.conf Mike’s patch would work similarly in < 12

That is the patch we use in Asterisk 11.

Then all is good and non Distro users can just grab the diff for apps/app_voicemail.c et al from

https://code.asterisk.org/code/changelog/asterisk?cs=420591

and recompile.

Thanks

@lgaetz Thanks for the tip on editing voicemail.conf. I did that but obviously I deleted a little too much or something and made things worse - all the input fields for that mailbox in FreePBX had “>” and other special characters. I deleted the mailbox, recreated it, used semicolons, and its good now

Well semi colons are wrong. You won’t get any mail that way. What distro and freepbx versions are you using

Actually you probably would, but only to the first email address, the semicolon will be inserted into /etc/asterisk/voicemail.conf’s “context” and interpreted as the precursor to a comment so any further choices for that particular extension will be ignored. Probably not what you want :slight_smile: , a real result of your method:-

8353 => 0002,Your name,[email protected];[email protected],|attach=yes|saycid=no|envelope=yes|delete=no

Get it?

1 Like

@tm1000 @dicko

I actually didn’t test to see if it worked with the semicolons yet, I just saw that using semicolons didn’t appear to break it like using commas did…

I will test tonight.

Andrew,
Distro I am using is the RasPBX one for FreePBX on Raspberry Pi

from their website

"
The latest official image available for download is based on Raspbian (Debian7 / Wheezy) and includes:

Asterisk 11.11.0
FreePBX 2.11.0.38

"

You can’t use multiple emails on that setup so it’s an end game for you. Nothing you can do. Unless you want to recompile asterisk on the pi

Oh okay thanks, got it, sounds like great fun but I think I will just make a email distribution address instead