Avoid VitalPBX Pop-Up

Spoiler: You have installed VitalPBX but don’t want to register? You then find yourself with an annoying Pop-Up at each connection, reminding you of this. We show you how to make this pop-up disappear.

After you have installed VitalPBX, you want to configure it. If you’re like us, and you’re tired of having accounts all over the net, you may not want to create one more.

Romka_O @ pixabay

The problem is that if you don’t have an account at VitalPBX, you can’t enter it in the configuration interface. And if you don’t fill it in, you will end up with a pop-up each time you connect… Which can become annoying if you come back regularly to configure your PBX…

Activation pop-up

As at the arsouyes, we don’t like to be forced, especially when it comes to recovering our personal data, we took a look at the VitalPBX code to determine where this pop-up comes from, and above all, how to deactivate it.

The pop-up

The VitalPBX web interface source code can be found on your server, in /usr/share/ombutel/www/. The file that interests us is /usr/share/ombutel/www/ressources/js/01-app.js.

ombutel. Is the old name of VitalPBX before 2017. C’est en fait l’ancien nom de VitalPBX (2017). When renaming a product, developers rarely take the time to rename directories

The showStartUp function defines if the pop-up must be shown at startup. Among other things, we learn that the verification is done using a cookie; asked_for_app_register. If it exists, VitalPBX considers that it has already asked you the question and in this case, the pop-up will not be displayed 😃. Otherwise, the interface will show it to you 😢.

function showStartUp(){
    if(typeof startup !== "undefined" && startup !== ''){
        var askForAppRegister = Cookies.get('asked_for_app_register');
        if(askForAppRegister === undefined){
            setTimeout(function () {
                pbx_request('core', 'askForRegisterInstallation', 'view');
            }, 10000);

In order to verify that this cookie is indeed responsible for the pop-up, we use a cookie editor: after closing the pop-up, we observe the cookies and we see that asked_for_app_register is indeed present and is equal to 1. If we restart the browser and deleting the cookies, we will be able to verify by forging our own cookie, that it is possible to avoid the pop-up.

So we forge the following cookie:

Exemple du cookie avec CookieBro

And indeed, once connected to the PBX, no more pop-ups!

Permanently delete this pop-up

What would be nice is not having to reforge your cookie by hand every time.

To do this, we first think of modifying the code of VitalPBX to remove the verification, or modify the askForAppRegister variable. But this directly changes the VitalPBX code. In the case of an update, at best, it will have to be rewrite, at worst it will be incompatible.

We found it more efficient to ask the Apache server to automatically create the cookie.

To do this, we edit the VitalPBX virtualhost configuration file in Apache, /etc/httpd/conf.d/vitalpbx.conf. At the end of each virtualhost (http on port 80 and https on port 443), just add the following line, which will automatically add a cookie when connecting to the server :

Header always set Set-Cookie "asked_for_app_register=1;Path=/"

There you go, you will no longer have the pop-up next time you connect to your PBX.

For further

VitalPBX SIP Server Configuration

March 25, 2019 Now that our analog lines are managed by a gateway, it remains to interconnect it with our IP phones. For this, we will install a SIP server, VitalPBX, to register and communicate all our equipment.

Display of incoming caller

April 8, 2019 Receiving outside calls is good, but knowing who is calling us is better. This is what we will be setting up today.

Configure voicemail

April 15, 2019 During an incoming call, ringing phones is good. Having a voicemail is better. And send the messages by email? This is what we will be setting up today.

A Turing test via VitalPBX to avoid call bots

September 23, 2019 After being redlisted, BLOCTEL (NT:French government site referencing numbers refusing cold calling) and configure blacklists, we present to you the ultimate technique to detect and avoid call bots to put an end to canvassing.