Tools – VitalPBX Wiki https://wiki.vitalpbx.org Learn how our latest VitalPBX version will enhance your business communication Thu, 21 Dec 2023 17:25:07 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.3 https://wiki.vitalpbx.org/wp-content/uploads/2023/11/cropped-vitalbpxwikiicon-8-32x32.png Tools – VitalPBX Wiki https://wiki.vitalpbx.org 32 32 Custom Contexts https://wiki.vitalpbx.org/wiki/pbx/custom-contexts/ https://wiki.vitalpbx.org/wiki/pbx/custom-contexts/#respond Sun, 17 Dec 2023 22:12:55 +0000 https://wiki.vitalpbx.org/?post_type=docs&p=2610 Now, let’s explore how you can make customizations to the Asterisk dial plan, and set them as destinations in VitalPBX with the Custom Contexts add-on module. This is a free add-on module you can use to declare a custom Asterisk Context you create as a destination within VitalPBX.

With a custom context, you have the freedom to integrate any external service with VitalPBX at a deep level. Custom Contexts will allow you to interface between the Asterisk dial plan, VitalPBX, and any external service or application. You are expected to have Asterisk knowledge to use this feature within VitalPBX. Throughout this lesson, we will be showing one example of using Custom Contexts, but your imagination and Asterisk knowledge are your only limits.

Before using the Custom Contexts add-on, we need to have a context created. In this example, will be creating a service to playback the public IP Address of our server to callers that dial a special code. For this, we will be using the services of ipinfo.io and the CURL application for Asterisk.

Now, log in via SSH to your VitalPBX server, ideally as the root user. Use the following command to go to where the .conf files are located in VitalPBX.

You will notice that all of the .conf files here have a number. This is used to maintain a sequence order of how the files are read. You can create a new .conf file using the following structure: extensions__{ANYNUMBER}-{DESCRIPTION}.conf, where {ANYNUMBER} is a consecutive number that represents the order that Asterisk will read the files, and the {DESCRIPTION} is any string used to identify what the file contains. So for our example, we will run the following command to create a new .conf file for our custom context using nano.

With this, we make sure that our custom context is considered after the extensions’s contexts.

Inside the extensions__90-custom.conf file, we add the following content as our context.

Then we Save and Exit nano. Then, we reload the Asterisk Dial Plan using the following command.

Note: When creating the new .conf file, notice that there are 2 underscores(_) after extensions. So it is extensions__90-custom.conf, not extensions_90-custom.conf.

You may notice the your-public-ip-is sound file that does not come with VitalPBX by default. This sound can be downloaded and added to your system using the following command.

With the context created, you must install the add-on from Admin > Add-Ons > Add-Ons. Once the add-on has been installed, refresh your browser, and go to PBX > Applications >Once the add-on has been installed, refresh your browser, and go to PBX > Applications > Custom Contexts.

Here, you must add a Description to identify this context. Then under Context, enter the name of the context without the square brackets. Optionally, you can specify the Extension and Priority of the context. Under Destination, you can set a destination where you will take the user after they reach the custom context. Click on Save and then Apply Changes.

To test the custom context, we will create a custom application so we can have a code to dial the custom context. Go to PBX > Applications > Custom Applications.

Add a Code to dial, set a Name to identify this custom application, and add the custom context as the destination. Then, Save and then Apply Changes. Now when you dial this code, you will go to your custom context.

]]>
https://wiki.vitalpbx.org/wiki/pbx/custom-contexts/feed/ 0
Blacklist https://wiki.vitalpbx.org/wiki/pbx/blacklist/ https://wiki.vitalpbx.org/wiki/pbx/blacklist/#respond Sun, 17 Dec 2023 23:14:51 +0000 https://wiki.vitalpbx.org/?post_type=docs&p=2642 Tools >Blacklist. This is a simple module to use. To blacklist a number, enter their Caller ID number and add a description to identify this blacklisted […]]]> Sometimes, you may want to block entire callers from dialing your VitalPBX. As an additional security layer, you can block numbers using our Blacklist module. Go to PBX > Tools >Blacklist.

This is a simple module to use. To blacklist a number, enter their Caller ID number and add a description to identify this blacklisted number. You can specify a destination to take these blacklisted numbers if you want. This is optional as the default action is to playback the Blacklist sound file set under Settings > PBX Settings > System General > System Prompts. If you don’t want the caller to know they’re blacklisted, you can simply set the Destination to terminate the call and hang up.

Once you set the blacklisted number, click on Save in the bottom right-hand corner. You can see a list of numbers that have been blacklisted in the upper right-hand corner. You can Enable and Disable a blacklisting at any time you like without having to delete the entry, only saving the change.

Another way to blacklist a number is by using the feature code *30 and following the prompts to add a number you wish to blacklist, or *32 which will blacklist the last caller on your extension’s call history. You can use the code *31 to remove a number from the blacklist.

Now, you can use this feature to make your VitalPBX more secure and block any unnecessary or disturbing callers from your VitalPBX installation.

]]>
https://wiki.vitalpbx.org/wiki/pbx/blacklist/feed/ 0
Log Files and Log File Viewer https://wiki.vitalpbx.org/wiki/pbx/log-files-and-log-file-viewer/ https://wiki.vitalpbx.org/wiki/pbx/log-files-and-log-file-viewer/#respond Sun, 17 Dec 2023 23:31:39 +0000 https://wiki.vitalpbx.org/?post_type=docs&p=2645 Another part of allowing you to monitor your VitalPBX is to be able to see the log files for different aspects of your system. For this, we have the Log Files and Log File Viewer modules in VitalPBX.

First, let’s take a look at the Log Files module. Go to Settings > PBX Settings > Log Files.
Here, you can define the log files that can be viewed from the Log File Viewer. You can change the Date Format using the standard strftime format string. On Log Rotation you can choose between the following.

• Sequential – Renames the log files in order. This means that the file that has the highest number is the most recent one.
• Timestamp – This uses a timestamp rather than a sequential number when the logger rotate task is executed.
• Rotate – This rotates all the log files. This means that the log file with the lowest number is the most recent one. This is the expected behavior for Unix users.

You can choose to append the hostname as well. This will append the hostname to the log files. Below, you will see the list of Log Files and the type of events you want to include. You can add additional log files by specifying the path and log file name. Once done, you can click on Save.

Here, you can select the Log File from the ones we have available, enter the number of lines you want to see, and you can filter for a specific keyword or phrase.

The File will be output in the black box below with color coding for easy viewing. You can click on the Refresh button in the lower right-hand corner to view the most recent information based on the filters you apply.

All of the log files we have by default are located under the /var/log directory. So you can view them from the Linux CLI as well. You can apply CAT filters to them from the CLI to make the search as custom as you need.

]]>
https://wiki.vitalpbx.org/wiki/pbx/log-files-and-log-file-viewer/feed/ 0
Phonebooks https://wiki.vitalpbx.org/wiki/pbx/phonebooks/ https://wiki.vitalpbx.org/wiki/pbx/phonebooks/#respond Tue, 07 Nov 2023 21:54:33 +0000 https://wiki.vitalpbx.org/?post_type=docs&p=404 With VitalPBX, you can install our free Phonebooks add-on module. This allows you to centralize your contacts in a single location. Once you have installed the Phonebooks add-on, you can find it under PBX > Tools > Phonebooks.

There are two types of phonebooks, Internal and External. Internal Phonebooks can have a list of Extensions, Speed Dials, Feature Codes, Ring Groups, Conferences, and Queues. Meanwhile, External Phonebooks can have a list of contacts with numbers external to the VitalPBX.

Let’s make an internal phonebook first.

To create the phonebook, you will first need to enter a description. Next, you will need to select the type. By default, an internal phonebook is created.
Afterward, you can add any of the different options available. In this case, we will include the extensions we have created so far. For this, I click on the list icon on the Extensions field.

You are presented with the list of extensions. Remember, in this type of selection, everything you can select will appear in the left column, and everything that has been selected will appear in the right column. We press the Add All option to include all the extensions and then click on Accept.


Once you have selected everything you wish to add to this phonebook, click on the Save button in the bottom right-hand corner. The phonebook is created, and you can find it in the list in the upper right-hand corner of the module.

With the phonebook created you will now have a Phonebook URL. You can add this URL to any device that supports centralized phonebook URLs for remote directories. Additionally, you
ill now find a Contact Info tab in your extensions. This is to add additional information to be
displayed with centralized phonebooks.

Now, let’s create an external phonebook.

External phonebooks work a little differently, as you need a CSV file to import the contacts.
A CSV format template is available with a button in the bottom left-hand corner of the module.

The CSV file is quite simple, storing the contact’s First and Last Name, Three Phone Numbers, Organization, Job Title, and Email. Once you have entered the contacts’ information, save the CSV file, and in the Phonebooks module, upload with the CSV File field.
Then, click the Save button in the lower right-hand corner.

Now, you will see the external phonebook contacts listed in a table, similar to how they were listed in the CSV file.

You will also notice that external phonebooks have a Prefix field. The Prefix field in an external phonebook, allows you to add any prefix number needed to route the calls correctly. We will see more about outbound routes later, but sometimes you need additional numbers before a phone number so the call goes through the correct route. The prefix field allows you to add numbers that will be added automatically to the beginning of the contacts’ phone numbers. This way when selecting a contact from a device using an external directory with an external phonebook, the call will be placed correctly.

You will now find the ability to Export Contacts as well, by clicking on the button in the lower left-hand corner. So if the contacts are modified, you can download the current listing of contacts. You can modify contacts by uploading a new CSV file.

Additionally, if you have a Starter License or any of our Licensing Plans, you get access to the Add Contact extended feature. This extended feature allows you to create a new contact directly from the Phonebooks module.

Note…
Extended Features are additional configurations you can make when you have
a Starter License or a Licensing Plan registered with your VitalPBX installation.
We will go through these extended features as we progress with this guide.

Now you have centralized phonebooks you can use with multiple devices. The devices will have the contacts updated automatically as you update the phonebook contacts

]]>
https://wiki.vitalpbx.org/wiki/pbx/phonebooks/feed/ 0
Cron Profiles https://wiki.vitalpbx.org/wiki/tools/cron-profiles/ https://wiki.vitalpbx.org/wiki/tools/cron-profiles/#respond Fri, 10 Nov 2023 13:58:27 +0000 https://wiki.vitalpbx.org/?post_type=docs&p=555 You might want to automate various scripts and operations within VitalPBX. For this, you can create Cron Profiles. Cron profiles are cron jobs that are executed in a specific schedule to automate different tasks within your VitalPBX server. To create a cron profile you must go to PBX > Tools > Cron Profiles.

First, enter a Description to identify this cron profile.

Cron jobs can be a little complicated to wrap your mind around if you have never worked with them before. This is why we have included a Template section to select some of the most common schedules.

Cron jobs are usually defined in a row of five columns. These have been displayed in the Settings section. The columns correspond to the Minutes, Hours, Day of the Month, Month, and Day of the Week. You can enter any number or a star () for each field. The number will correspond to its value for the field. For example, for 12:45 PM you enter 12 for the hours and 45 for the minutes. The same goes for the month, any number between 1-12, for the day of the month 1-31, and for the day of the week 0-6. The star () means every interval of the field. For example, a star next to the month field means every month, and the same goes for each field. Keep in mind that the time is strictly in a 24-hour format.

For simplicity, we have also added a template for every field. This will have the most common option for each field.

If we use the template called Daily, the settings will accommodate to run every day at 00:00 hours (midnight). It will look like in the following image. You can then click on Save and Apply Changes.

]]>
https://wiki.vitalpbx.org/wiki/tools/cron-profiles/feed/ 0
Task Manager https://wiki.vitalpbx.org/wiki/pbx/task-manager/ https://wiki.vitalpbx.org/wiki/pbx/task-manager/#respond Fri, 10 Nov 2023 14:43:50 +0000 https://wiki.vitalpbx.org/?post_type=docs&p=557 Now that you have a cron profile created, we can use it in any module to run a task automatically. We can also install the Task Manager add-on module. This is a free add-on module you can install from the add-ons module under Admin > Add-Ons > Add-Ons. Once the add-on is installed you can find it under PBX > Tools > Task Manager.

The Task Manager module will allow you to run any script you have created automatically using a Cron Profile. First, you need to upload your script to the following path.

Next, you go back to the Task Manager module, add a Description to identify this task, select the Cron Profile you have created, and select the Script you uploaded. You can decide if the task is Enabled or not. You can then Save and Apply Changes. Optionally, you can enable the task in Silent Mode. This means that the task will run with any output it has suppressed.

The script you create can be anything that you want to perform from your VitalPBX server. This would be a bash script that you would normally run from the Linux CLI, so this task is not limited to affecting anything in VitalPBX per se, but it can deal with anything you want to perform from this server.

For example, you can create a script that copies the call recordings from the recordings directory to another one, or you can copy the backup files from the backups directory to another one. Then, with the Task Manager, you can run this script under a schedule to automate this function.

]]>
https://wiki.vitalpbx.org/wiki/pbx/task-manager/feed/ 0