Skip to main content

PBX Admin Tool

Managing PBX Administrators and Global Settings across a Vodia cluster

This utility enables centralized management of multiple Vodia PBXs or clusters, allowing administrators to add, delete and modify individual admin accounts, configure settings, and monitor version and system usage.

You will need to install Node.js and npm

Install the Vodia PBX Admin Tool via NPM.

curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo npm install -g pbx-admin

Verify the instalation

pbx-admin --version
1.0

Configuration

This tool requires a configuration file located at ~/.pbx-admin.conf

This file must include the following settings:

  • username
    The administrator username.

  • password
    The administrator password.

  • server
    The server address.

Ensure that this file is properly configured before using the tool.

Example Configuration File:

Create the file - nano ~/.pbx-admin.conf

username:admin 
password:securepassword123
server:https://pbx1.example.com https://pbx2.example.com https://pbx3.example.com

Options

pbx-admin add

Add a new PBX administrator. This option requires the following parameters:

Required:

  • --username <admin_username>
    Specify the username of the new administrator.

  • --password <admin_password>
    Set the password for the new administrator.

Optional:

  • --display <admin_display_name>
    Provide a display name for the administrator. Defaults to the username if not specified.

  • --email <admin_email>
    Provide an email address for the administrator. Defaults to none.

  • --ip <ip_restrictions>
    Define IP restrictions for the administrator. Accepts individual IP addresses or CIDR ranges.

  • --api <true|false>
    Enable or disable API access for the administrator. Defaults to false.

  • --phone <admin_phone>
    Provide a phone number for the administrator. Defaults to none.

Usage Examples:

pbx-admin add  --username jerry --password "password!" --display "Jerry Thomas"  --email jerry@vodia.com --phone 0433337285 --ip 1.1.1.1/32

pbx-admin delete

Delete an existing PBX administrator. Provide the username of the administrator to be removed.

Required:

  • <admin_username>
    Specify the username of the administrator to delete.

Usage Example:

pbx-admin delete jerry

pbx-admin modify

Modify the details of an existing PBX administrator. This option requires the following parameters:

Required:

  • --username <admin_username>
    Specify the username of the administrator to modify.

At Least One of:

  • --password <new_password>
    Update the administrator's password.

  • --display <new_display_name>
    Update the administrator's display name.

  • --email <new_email>
    Update the administrator's email address.

  • --ip <new_ip_restrictions>
    Update IP restrictions for the administrator.

  • --api <true|false>
    Enable or disable API access for the administrator.

  • --phone <new_phone>
    Update the administrator's phone number.

Usage Examples:

pbx-admin modify  --username "jerry" --password "password2!" --display "Jerry2 Thomas2"  --email "jerry2@vodia.com" --phone 123456789 

pbx-admin list_versions

System Information Retrieval: PBX Version, Build Date, and Uptime (Days) for Multiple PBXs

Usage Example:

pbx-admin list_versions

Example Output:

PBX https://ztfznb.vodia-pbx.com: Version 69.5.7.beta (Debian64), Build Mar 30 2025 10:32:40, Uptime 0.5 days

pbx-admin system_usage

System Information Retrieval: Tenant-Specific Counts: Extensions, Call Queues, Conferences (per PBX).

Usage Example:

pbx-admin system_usage

Example Output:

PBX,Tenant,Extensions,Call Queues,Conferences
"https://ztfznb.vodia-pbx.com","lhgrxp.vodia-pbx.com",4,1,0
"https://ztfznb.vodia-pbx.com","jjmspy.vodia-pbx.com",6,0,0

pbx-admin config_global_setting

Configure a global PBX setting across multiple PBX instances. Retrieve the complete settings list using the provided curl command

curl --location -g -s -u 'admin:password' -k 'https://pbx.vodia-pbx.com/rest/system/config' | jq -r

Required:

  • --config_variable <config_variable_name>
    Specify the config variable

  • --config_value <config_value>
    Specify the config value that we need to set

Usage Example:

pbx-admin config_global_setting --config_variable max_call_duration --config_value 1800 

pbx-admin blocked_ips

For each PBX, display the current set of IP addresses that are actively being blocked from accessing the system

Usage Example:

pbx-admin blocked_ips

Example Output:

Blocked IPs on https://ztfznb.vodia-pbx.com:
================================================================================
IP Address Type Port Duration (hrs) Comment
--------------------------------------------------------------------------------
159.65.129.118 http 0 0.49 Connection

To get help with usage, simply use the --help flag.

root@v69-vodia-staging:~/pbx-admin-tool# pbx-admin --help
pbx-admin <command>

Commands:
pbx-admin add Add a new PBX administrator
pbx-admin delete <username> Delete the specified PBX administrator
pbx-admin modify Modify an existing PBX administrator
pbx-admin list_versions List version, build date and uptime of all
servers
pbx-admin system_usage Get system usage statistics for all PBXs
pbx-admin config_global_setting Set global setting for the PBXs
pbx-admin blocked_ips List all blocked IP addresses with duration
in hours

Options:
--version Show version number [boolean]
--help Show help [boolean]
root@vodia-staging:~# pbx-admin add --help
pbx-admin add

Add a new PBX administrator

Options:
--version Show version number [boolean]
--help Show help [boolean]
--username Admin username [string] [required]
--password Admin password [string] [required]
--display Admin display name [string] [default: null]
--email Admin email [string] [default: null]
--ip IP restrictions [string] [default: null]
--api API access flag [boolean] [default: false]
--phone Admin phone number [string] [default: null]