Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Troubleshooting

Most incidents are handled from the portal, Diagnostics page (see Diagnostics), without SSH: health, live calls, live SIP capture, call trace, banned addresses, reloading and restarting FreeSWITCH. Each action there is recorded in the audit log, and also exists in the API and the MCP server.

Typical incidents

SymptomWhere to lookWhat to do
A customer has no more inbound or outbound callsHealth: its trunk is not REGED, with the provider’s last refusal401/403: fix the username or password on the trunk page; 404: account unknown to the provider; 408/503 or FAIL_WAIT: the provider does not answer (address, network). Then Re-register.
A whole site has no phones, the portal answersBanned IP addresses: the site’s address, the account targeted and the faulty deviceFix the device (password, domain), then Unban; an address that must never be banned goes in the allow list.
A bot is trying passwordsLive capture, Banned IP addressesBan an address by hand, for the duration chosen.
“My call didn’t go through”, “it cut off”The customer’s Call log, then the call’s TraceThe trace shows the steps followed, the cause and the SIP code. A call flow error: Replay publication on the customer’s page.
A phone does not register, a call fails without explanationLive captureThe customer’s SIP messages, as text, as a ladder diagram, or as a pcap for Wireshark.
A phone set to record has no recordingssudo centrex verifier (“FusionPBX” line) and the service logFusionPBX’s recording template must be readable (CENTREX_MODELES_FUSIONPBX, under /var/www/fusionpbx by default); the service adds it to the customers that lack it when it restarts. Full volume: see Recordings.
A call is stuckLive callsHang up.
Nothing works in FreeSWITCHHealthReload configuration, then as a last resort Restart FreeSWITCH.

On the VM

ForCommand
Check everything at oncecentrex verifier
Service statesystemctl status centrex freeswitch nginx postgresql
PBX logsjournalctl -u centrex (level set by CENTREX_LOG)
FreeSWITCH logs/var/log/freeswitch/freeswitch.log
Image first bootjournalctl -u centrex-premier-demarrage
Active/passivecentrex bascule etat, /var/log/centrex-bascule.log
Audit log integritycentrex audit verifier

The centrex commands run with the service’s settings: see Server settings.

Accounts

  • Forgotten password: the “Forgot your password?” link on the sign-in page, or Resend invitation on the customer’s page. Without email set up: centrex inviter --courriel … prints the link.
  • Two-step verification phone lost: an administrator resets it in the portal, or centrex reinitialiser-second-facteur --courriel … on the VM.
  • Account locked after 5 failures: it unlocks by itself after 15 minutes.

FusionPBX interface

The PBX writes into FusionPBX, but its interface is closed: nginx does not serve it. For troubleshooting, open it locally for the time of the intervention. Do not change anything from this interface: the PBX would not find its settings there. Its dialplans look incomplete there, which is expected.

  1. On the VM, install PHP-FPM and serve FusionPBX on the local address only:

    sudo apt install php8.4-fpm
    sudo tee /etc/nginx/sites-available/fusionpbx-local >/dev/null <<'NGINX'
    server {
    	listen 127.0.0.1:8081;
    	root /var/www/fusionpbx;
    	index index.php;
    	location / { try_files $uri $uri/ /index.php?$args; }
    	location ~ \.php$ {
    		include snippets/fastcgi-php.conf;
    		fastcgi_pass unix:/run/php/php8.4-fpm.sock;
    	}
    	location ~ /\. { deny all; }
    	location ~ \.(db|sql|conf)$ { deny all; }
    }
    NGINX
    sudo ln -s ../sites-available/fusionpbx-local /etc/nginx/sites-enabled/
    sudo nginx -t && sudo systemctl reload nginx
    
  2. Create a FusionPBX superadmin account, as its installer does, in the default domain (the one created on first boot and named after the machine:

    read -r -s -p "Password: " MDP; echo
    HASH=$(MDP="$MDP" php -r 'echo password_hash(getenv("MDP"), PASSWORD_DEFAULT);')
    sudo -u postgres psql -v ON_ERROR_STOP=1 -v hash="$HASH" -v domaine="$(hostname -f)" fusionpbx <<'SQL'
    with d as (select domain_uuid from v_domains where domain_name = :'domaine'),
    u as (insert into v_users (user_uuid, domain_uuid, username, password, salt, user_enabled)
          select gen_random_uuid(), domain_uuid, 'depannage', :'hash', '', 'true' from d
          returning user_uuid, domain_uuid)
    insert into v_user_groups (user_group_uuid, domain_uuid, group_name, group_uuid, user_uuid)
    select gen_random_uuid(), u.domain_uuid, 'superadmin', g.group_uuid, u.user_uuid
    from u, v_groups g where g.group_name = 'superadmin';
    SQL
    
  3. From your computer, open an SSH tunnel, then http://127.0.0.1:8081 in the browser:

    ssh -L 8081:127.0.0.1:8081 debian@VM
    

    Sign in as depannage@ followed by the machine name (hostname -f): the address 127.0.0.1 names no domain, the name after @ gives it.

  4. After the intervention, close it again:

    sudo rm /etc/nginx/sites-enabled/fusionpbx-local && sudo systemctl reload nginx
    sudo systemctl disable --now php8.4-fpm
    sudo -u postgres psql fusionpbx -c "update v_users set user_enabled = 'false' where username = 'depannage'"
    

Vendor support

For an intervention by the vendor, open time-limited access: portal, Diagnostics page, Support access section, or centrex acces-assistance ouvrir --heures 24. It is closed by default, can be closed at any time, and each of its actions is in the audit log.