Need help with setting up Voicemail in FreePBX

Hi @Ivashenkov and @mrmarkuz, sorry for the delay.
Odbc is already configured in /etc/asterisk/res_odbc_additional.conf and also /etc/odbc.ini, is the same configuration used by cdr and cel.
Two words on that: to create an odbc configuration, you only need to add this configuration in e-smith db and launch # signal-event nethserver-unixODBC-update:

# config show MySQL-asteriskcdrdb
    Description=ODBC on asteriskcdrdb

This is already done by nethserver-freepbx package
the e-smith db configuration: # find /etc/e-smith/db/configuration/defaults/MySQL-asteriskcdrdb/
and odbc configuration action: /etc/e-smith/events/nethserver-freepbx-update/S50nethserver-unixODBC-conf

Only thing that I think is missing for voicemail to work is asteriskcdrdb database table.
I’ve opened a bug feel free to add infos on that.
I’ll keep you posted and let you know when there is a testing package to try


Thanks for your help, don’t know if I should comment on github or here, so I start here:
You are right. ODBC config is working after install, but /etc/asterisk/res_odbc.conf does not include res_odbc_additional.conf(commented out) and uncommenting doesn’t solve the problem, what’s really strange, why does the include not work?

Installed fresh 7.4b1, updated, installed nethserver-dc and FreePBX.
Created extension 100 with voicemailbox.
Connected with MicroSIP Sipphone as extension 100 and called 100 to go to voicemailbox.

Trying to save to voicemail shows that the voicemail app is not loaded:

[2017-10-23 12:39:49] WARNING[68135][C-00000000]: pbx.c:2864 pbx_extension_helper: No application 'VoiceMail' for extension (macro-vm, s-BUSY, 3)

After uncommenting noload = in /etc/asterisk/modules.conf and restarting asterisk I get following error:

[2017-10-23 12:44:36] WARNING[68403]: app_voicemail_odbcstorage.c:5757 inboxcount2: Failed to obtain database object for 'asterisk'!
[2017-10-23 12:44:38] WARNING[68435][C-00000000]: app_voicemail_odbcstorage.c:4141 count_messages: Failed to obtain database object for 'asterisk'!

Then I had to copy the [asteriskcdrdb] entry from /etc/asterisk/res_odbc_additional.conf to /etc/asterisk/res_odbc.conf. Uncomment the include line in res_odbc.conf doesn’t work.

My /etc/asterisk/res_odbc.conf:

#include res_odbc_custom.conf
#include res_odbc_additional.conf

Then I had to config freepbx. In Settings/Voicemail Admin Menu under Settings/ODBC Storage I entered asteriskcdrdb in ODBC Storage Name and voicemessages in ODBC Table Name. This sets odbcstorage and odbctable in /etc/asterisk/voicemail.conf.

Then I had to create the voicemessages table to make it finally work:

1 Like

Thank you for quick response. Unfortunately can not neither confirm nor deny if it help. I’m on another project right now, but will return in couple days. It worked for you, hopefully it will work for me. Thanks again.

1 Like

Package that automatically configure voicemail is in testing repository and needs QA,
Let me know if it works for you


Tried it on new 7.4 and voicemail now works out of the box. Thanks, great work!


Well, I installed a Nethserver on minimum Centos 7. Now Nethserver shows 7.4. Freepbx installed. Created ext 4000 & 4001 for testing. For testing used Grandstream 1450 (4000) and iPhone soft phone “GS Wave” (4001). No other setting touched. Calls from one ext to another going through without problems in both directions. Now I can call *4000 and *4001 to leave a message, but message never left either I just hang up or I push # after I finish with message. On PBX web interface I have 0 messages on every extension. All folders in /var/spool/asterisk/voicemail/default created automatically and having right ownership (asterisk:asterisk) Anything else I can do?

By the way, there in default folder nothing but empty folder structure. On Database in the voicemessages table I see several rows created

The voicemessages are just stored in the db, not in local filesystem. You can listen to them when you call *97 for your own voicemailbox or *98 for any voicemailbox.

Where exactly on the freepbx interface do you see this? Maybe only filesystem saved messages are shown there.

When I call *97 from VOIP phone it guides me to setup a voicemail: “your name”, “busy message”… Next time I call *97 is starts over and guides me to setup my voicemail again. When i call *98 and putting my extension and password it tells me “login incorrect”.

“settings” -> “Voicemail Admin” I see 0 messages everywhere

That’s right. But as I said it’s because only file stored messages are counted… I am able to call voicemail and listen to messages so there has to be a difference in how we setup our PBX. I use 3 digits, as 100 is my extension, you use 4 digits, but that shouldn’t be the problem, I hope.

I will make some screenshots of my PBX setup steps and post it so you can compare…

There 83 warning lines in the PBX log. Most of them shouldn’t be relevant. Not sure about last one:
[2017-10-26 11:54:47] WARNING[22467] app_voicemail_odbcstorage.c: maxsilence should be less than minsecs or you may get empty messages
In the /etc/asterisk/voicemail.conf in a [general] section I see:


Hope config files are right

I created extension 100 and was able to retrieve a voice message. System does not work with 4 digit extensions, I guess
There several other weird things:
I can not get *98 work from VOIP phone (“Login incorrect”). When no messages, if I call *97 it starts voicemail setup.
On soft phone *98 allows me to connect with Ext/pass and brings me to voicemail setup. *97 never connects (404 error).
I don’t know what can I do with all that…
(soft phone and voip phone successfully work with other voip providers)

1 Like

That’s really interesting, I’ll investigate that later on a fresh VM and report…

I was able to get my message back only once. After then I always ending up in voicemail setup. (I left message from the same phone, from soft phone several times). No luck.

Installed fresh Nethserver 7.4, updated, installed samba DC and voip pbx from Software Center. Created AD user markus.

My nethserver-freepbx is version 14.0.2-1.ns7

Enter admin name, password and mail:

Just submit:

Then I do “Apply Config” on top right corner.

Then I go to Applications/Extensions and do “Quick create extension”

Enter display name, extension number and mail:

Map the user and set voicemail PIN(this is the voicemail password):

Edit the extension again and set a secret:

Then again do “Apply Config”.

Now I connect my microsip softphone with following settings:

When I call myself or *4000 I can leave a message. When I call *97 I can listen to extensions messages. Same when I call *98 and enter 4000 and my PIN.
Created a second extension 4001 and connected my android phone. Extensions can reach each other plus voicemessages working.


The only difference I see is: I haven’t install any samba part. I haven’t touched it at all. And I install it on a real Dell Poweredge R710 server with two interfaces active. One for my internal network ( and another for accessing directly to the internet. Also on addition Php-SCL and PhpMyAdmin has been installed. I don’t think it may interfere with PBX
I will try to reproduce exactly your steps

Ok, I made minimum install as you described to exclude any other interference. I’m testing only on soft phone this time. I can leave a message and I can listen it. The only problem I should go through mail set up every time I want to listen recorded message. For some reason voicemail setup starts every time I call *97 or *98.
How can I make system remember my voicemail set up?

Do you use the extension number as secret?

Found this:

1 Like

I should be less dumb then I am. Changing password helped.
Thank you to everyone helped me with all that staff, especially to mrmarkuz. I wasn’t sure where I misconfigured it on a first place. (may be I haven’t done it with AD). But now it works. At least I can make calls between extensions and voicemail works as designed. Let’s see where I’ll break it next time.:wink:

You’re welcome. Thank you for providing such a case. It helps us to find these really difficult to find errors and to put the solution to a documentation/howto so in future this won’t happen again to other users.
We all know, one shouldn’t have same passwords as extension or names because it’s very bad for security but for testing purposes I do it as well just to remember my testuser/testpasswords easier, so it has nothing to do with being dumb, it’s a kind of human weakness to like it comfortable. As we usually don’t post passwords in the forum, I am happy in the end that it was possible to find this error.
I remember a weakpassword module in freepbx, maybe we can use it so users may be warned in future.

1 Like