Voicemail is required to allow the caller to leave a message if the recipient does not answer. How to configure it with asterisk on Ubuntu? That’s what this article is about. We will explain step by step how to do it. Let’s go!
Norton Secure VPN 2023 for up to 5 Devices | |
19,99 $ |
You must first go to the …etc/asterisk directory. The configuration file is voicemail.conf.
Now we are going to make a copy to have a backup in case something goes wrong
We can now start creating our voicemail. To do this the command looks like this: mailbox_number => password, name, email. So we have:
That’s about all the configurations we need for now. Exit the file by saving it with the wq command.
Return to the console level then reload your voicemail.conf file.
Now let’s take a look inside! Enter the command: voicemail show users.
Well everything is perfect! the mailbox has been successfully created. Now for the next step, it’s about understanding how the messaging system works and where messages are created in your system.
In order to locate the mail files, let’s go into the..asterisk/voicemail/ directory and display the detailed content using the ls -la command.
We can notice that a default folder was automatically created because we used the default configuration. It is in this default folder that our mail files will be located.
Now it’s good to know all this, but we are far from having finished our configurations 😎 . Now let’s talk about the dial plan.
For this step, let’s start by highlighting the applications that we will need. Let’s go ! Let’s switch to command mode in asterisk then enter the command: core show applications like mail
We have 3 main applications:
MailboxExists: it checks whether or not a mailbox exists in the dynamic environment!
VoiceMail: You need it to leave a voice message to your correspondent, i.e. the one who is calling you.
VoiceMailMain: This is the main voice mail application. It allows you to properly administer and manage your mailboxes.
Start by taking a closer look at the Voicemail app. specifically the configuration syntax. Enter the following command then press Enter:
Which gives us:
Now let’s access the configuration file: extensions.conf. The settings are already there, so we will just comment on them. To do this, let’s go back to main mode and enter the following tree structure: ../asteirsk/extensions.conf .
We can do similar implementations for the second user james!
Notice
As argument VoiceMail() takes 100 and 200 for users Mathias and James. We could have saved time by using the exten variable which contains them. Like this :
Now let’s go to the asterisk console and test everything:
Let’s go into more detail and see what happens during the process after the 5s of no response:
Now we have a perfectly working voicemail, however we still cannot retrieve voicemail or even change voicemail options. To do this, let’s see the application in more detail.
VoiceMailMain(). Let’s try setting up James’s email. What will mainly interest us is the syntax and the available options. In the console, enter the command core show application VoiceMailMain.
Now let’s go back to main mode and go to the extensions.conf file. We are going to add a new extension and the hangup app.
Now let’s test: Let’s call James’s voicemail directly
Here is your voicemail is now configured 🙂! But you can continue to explore the different options and app arguments.
See as well :
The Windows 11 update error can occur for several reasons, such as corrupted files, connectivity issues, or conflicts with third-party…
The "You don’t currently have permission to access this folder" error often appears when you try to access a folder…
When developing Flutter applications, it's common to encounter errors related to SDK version compatibility. One of these common errors is…
During the installation of Windows, you may encounter an error indicating that the selected disk is not compatible with the…
The error "Windows could not start the Windows Update service on the local computer" occurs when the operating system fails…
The Windows Update Service is essential for keeping your system up to date with the latest security and performance improvements.…