VM Email Stored in DB?

Hello,

In which table is the voicemail email address stored? All posts here seem to guide reading it from the voicemail.conf file.

Thanks

It is in voicemail.conf. The file is parsed and the data inside is formated for the GUI. Things like the voicemail context and VMx Locator settings are in the AstDB but anything for the user accounts is the conf file.

Interesting.

So the GraphQL API: Voicemail module GraphQL - PBX GUI - Documentation which responds with:

{
  "data": {
    "fetchVoiceMail": {
      "status": true,
      "message": "Voicemail data found successfully",
      "name": "test",
      ...
      "email": "[email protected]",
      ...
    }
  }

…Is also reading from the conf file?

GQL API source: voicemail/Voicemail.php at release/15.0 · FreePBX/voicemail · GitHub

Yes. It is. It calls on the voicemail module to get that info and return it.

1 Like

Got it. thanks.

I’m trying to find the easiest way to get all extensions, names and email addresses and return it in a JSON.

Names and extensions can easily be queried, I got stuck by getting the email address.

You could do GetConfigJSON AMI action which would return all the accounts in a context in full JSON format. Asterisk 20 ManagerAction_GetConfigJSON - Asterisk Project - Asterisk Project Wiki

This will get all the user accounts from the default context in voicemail.conf

Action: GetConfigJSON
Filename: voicemail.conf
Category: default

Thank you. The only problem is that I’ll have to query this and then another query for users who don’t have voicemail enabled.

Thanks for your help, Tom!

Crude start of a php script here: php script to use freepbx methods to get/set voicemail params · GitHub

First function provides an array of all vm boxes with details for each, second function gets an array with vm details for a provided extension.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.