Coding Error for Voicemail

Any help would be much appreciated. While trying to setup a global voicemail account I entered a value in the extension context field that created this issue (See Below). I’m an now unable to edit any extensions.

Coding Error - don’t understand ‘[[email protected] ]’ from /etc/asterisk/voicemail.conf

/var/www/html/admin/libraries/BMO/LoadConfig.class.php
} else {
if (!is_array($this->ProcessedConfig[$section][$out[1]])) {
// This is the first time we’ve found this, so make it an array.

                        $tmp = $this->ProcessedConfig[$section][$out[1]];
                        unset($this->ProcessedConfig[$section][$out[1]]);
                        $this->ProcessedConfig[$section][$out[1]][] = $tmp;
                    }
                    // It's an array, so we can just append to it.
                    $this->ProcessedConfig[$section][$out[1]][] = $out[3];
                }
            } else {
                $this->ProcessedConfig[$section][$out[1]] = $out[3];
            }
        } else if (preg_match("/^#(include|exec)/", $entry)) {
            $this->ProcessedConfig[$section][] = $entry;
        } else if ($entry === "") {
            continue;
        } else {
            throw new \Exception(sprintf(_("Coding Error - don't understand '%s' from %s"), $entry, $this->Filename));
        }
    }
    // We're done, remove all the templates
    if(is_array($this->ProcessedConfig)) {
        foreach (array_keys($this->ProcessedConfig) as $key) {
            if (strpos($key, "__TEMPLATE__") !== false) {
                unset($this->ProcessedConfig[$key]);
            }
        }

Locate the offending entry in /etc/asterisk/voicemail.conf and fix it. Most conf files in FreePBX can’t be edited directly, but voicemail.conf is one that can. Then file a feature request to validate the field that caused this.

Thank you for your reply. I’m a basic user of freepbx and still learning… could you provide me information to how to access this file and is there a command I could use to just delete the voicemail account that I created?

When trying to edit the file with the configuration file editor I get a message that the file isn’t writable

Hi Shannon!

I have never used the config editor (I always edit the files directly by remoting my system) but it looks like all the files under Asterisk System Configuration Files are not allowed to be edited by it, only the ones under Asterisk Custom Configuration Files are…

Can you log yourself on the system (either directly or using SSH) and edit the file with “vi”?

Good luck and have a nice day!

Nick

Yes I can ssh in just fine. I’m just not sure what commands to use to edit the voicemail.conf

Hi Shannon!

If you know vi/vim;

vim /etc/asterisk/voicemail.conf

If you don’t know vi/vim and nano is present

nano /etc/asterisk/voicemail.conf

vi/vim has a somewhat arcane set of commands, if you do not know it I suggest using nano, at least this once…

(vi/vim is a good program to know how to use but I would not suggest you try it with a file as important as this one…)

Good luck and have a nice day!

Nick

By using nano I was able to edit the file and resolve my issue. Thank You Very Much!

You are welcome!

Have a nice day!

Nick