3CX Notes
3CX Notes
3CX Notes
over your system; You’ll have the freedom to customise it to your specific needs,
implement your security protocols, and hold full responsibility for its
management and safety.
As you can understand, installing an on-premise or self-hosted 3CX solution
requires additional technical knowledge. To set up and maintain the system,
you'll need to know, amongst other things, server administration, networking,
and VoIP technology.
This chapter will take you through the steps of installing and configuring the 3CX:
1. On-premise: on your Windows or Linux machine.
2. Self-host: on Google, Amazon, Azure or DigitalOcean Marketplaces.
For installations with up to 120 users, we strongly recommend 3CX Hosted and
3CX SMB - Small Business, which are the most cost-effective and easy ways to
host 3CX. 3CX Support does not cover OS / machine-related issues for self-hosted
or on-premises installs.
After the 3CX Windows install finishes, you need to upload the configuration file
to complete the installation.
1. If you have not already done so, go to https://www.3cx.com/install/
2. Login with your customer account and configure an On-Premise PBX. At
the end of the process, you will be given a link to the configuration file.
You can copy the link or download the file. For more information
see Installing 3CX
3. Now open a web browser on http://<ip of machine>:5015
4. Alternatively, use the command line by choosing option 1.
5. Once your installation is ready, you will be prompted to set your password.
Login to the PBX using the email you used to register.
Step 5 - Configure Split DNS
You will need to configure the 3CX FQDN to work both internally on your local
network and externally outside of your network (unless you do not want to give
access to your phone system from outside the network). Read how to configure
split DNS here.
Step 6 - Configure your Firewall
In order to configure a SIP trunk or connect remote phones, you will need to
configure your firewall to allow voice traffic in and out of your network. See
our Firewall configuration guide.
Hardware Requirements
Introduction
General Requirements
x86-Based
3CX PBX
3CX SBC
Cloud Provider
Introduction
Refer to these suggested 3CX Phone System usage scenarios based on the
extensions used, to assist you to size the minimum required hardware to run
3CX.
A user (extension) is typically defined to use the 3CX Web Client/Desktop App
and a 3CX Mobile App for communication while being part of one extension
group and one queue. In addition to this, the user may use an IP phone
connected to their extension. These suggested hardware specifications are
provided as a baseline and may change based on your business needs and
usage.
General Requirements
CPU:
Using Call Queues and group calls taxes the CPU more than 1-on-1 calls,
depending on the number of the call end-points.
Refer to this CPU hierarchy to assist you in selecting a suitable processor,
based on the suggested processor family. AMD CPUs are supported based
on their equivalence to the suggested Intel CPUs.
Memory:
Allocating users in more extension groups or queues increases the need
for additional RAM.
Network:
3CX requires at least a 1Gb LAN network connectivity, depending on the
number of simultaneous calls and usage of other network applications.
10Gb is required for 1000+ extensions.
Link Aggregation (LAG, LACP) can be used on HyperVisor platforms to
further expand available throughput but is not available for Bare Metal
machines.
Storage:
Allocate at least 30GB for the 3CX base system installation.
Add extra drive/partition/space for backup, voicemail, recordings or
logging. Keep in mind:
Recording and voicemail: 1 minute of recorded audio consumes ~1MB or
256KB with compression enabled
Logging: Verbose logs on a busy system can consume up to ~1GB per day
or per 2500 calls.
Offload (archive) unneeded recordings / voicemails / backups to cold
storage regularly to keep optimal free space available to your PBX.
Extensions
10 50 250 1000 10
(up to)
*For usage cases of more than 1000 extensions please contact us to assist you in
planning.
x86-Based
x86-based CPU installs require compatibility to 64-bit architecture and can be
used as “Bare Metal” or “Virtual Machine” deployments. 3CX verified the
usage for the following HyperVisors*:
VMware vSphere Hypervisor (ESXi) 6.5u1 and above, with VMWare tools
package installed
Microsoft Hyper-V Server (6.2) and above capable of running Debian 10,
Win10, Server 2016 and above
Citrix XenServer 7.0 and above
KVM 2.8 and up
*Additional configuration may be needed for the virtual machine, depending on
the HyperVisor used.
3CX PBX
Small
vCPUs 2 2
Memory 2 2
Medium
vCPUs 4 6
Memory 4 6
Large
vCPUs 6 8
Memory 8 10
Enterprise
vCPUs 8 10
Memory 16 18
Enterprise+
vCPUs 8+ 10+
3CX SBC
If the 3CX PBX is located in the cloud and IP phone should be routed to the
instance, these SBC specifications are recommended:
CPU
Intel i3 (Gen.8) or equivalent Intel i7 (Gen.8) or equivale
Family
vCPUs 2 4 4 6
Memory 2 4 2 4
Cloud Provider
Suggested virtual machine / instance specifications for Google Cloud Platform
(GCP), MS Azure and Amazon Web Services (AWS) / Lightsail, based on the use
cases outlined in the bare metal configurations. You can opt for instances with
higher performance and memory according to your needs.
Microsoft Am
Cloud Provider Google (GCP) Amazon EC2
(Azure) Lig
Medium (up to 50
n1-standard-4 D4 v3 m5ad.xlarge t2
ext)
Adjust storage size and swap space accordingly, based on your needs and usage.
3. If you read “Local CMOS Clock” or a name of an NTP host you need to
install Integration Services on the VM.
Debian on Microsoft Hyper-V
Prerequisites
Standard Network Adapter: 3CX on Debian explicitly requires a standard
“Network Adapter, i.e. the “Legacy Network Adapter” type
is not supported.
Generation 1 VMs only are supported by 3CX. Refrain from using
Generation 2 VMs.
Time Synchronization on Debian VM
To install and configure the NTP (Network Time Protocol) client after creating a
Debian VM instance, run these commands as “root” or via “sudo”:
apt update
apt install ntp
📄 Note: Supported versions of Debian Linux have built-in support for Hyper-V
Integration Services.
Chapter 2: Firewall Configuration
A firewall is a network security system that monitors and controls incoming and
outgoing network traffic based on predetermined security rules.
On-premise and self-hosted installations require firewall configuration to allow
system access from outside the network, i.e. remote extensions or web-based
management. If the firewall is not configured correctly, it can prevent access to
the 3CX system or leave it vulnerable to unauthorized access.
For this chapter, you need to be familiar with your firewall device and the
routing. 3CX will not configure your firewall.
We’ll go through the main aspects of ports and routing as well as the Firewall
checker feature. This includes understanding the necessary ports and protocols
used by the system, configuring firewall rules to allow only necessary traffic, and
detecting any unauthorised access.
Firewall & Router Configuration
Introduction
Ports required for your SIP Trunk / VoIP Provider
Ports required for remote 3CX Apps & SBC
Ports required for 3CX Video Conference
Ports Required for Other Services
Configure Split DNS / Hairpin NAT
Disable SIP ALG
Run the Firewall Checker
ACL/Firewall
Step by Step Instructions for Popular Firewalls
See Also
Introduction
If you have 3CX installed on-premise you need to make changes to your firewall
configuration to allow 3CX to communicate successfully with your SIP trunks and
apps. This guide gives you a general overview of the ports that need to be
opened/statically forwarded on your firewall.
If you have remote IP phones, you need to put an SBC or router phone in front of
them. Alternatively we recommend the use of our apps which have an inbuilt
tunnel. More information on SBC can be found here.
Ports required for your SIP Trunk / VoIP Provider
Open these ports to allow 3CX to communicate with the VoIP Provider/SIP Trunk
and WebRTC:
Port 5060 (inbound, UDP) and 5060-5061 (inbound, TCP) for SIP
communications.
Port 9000-10999 (inbound, UDP) for RTP (Audio) communications, i.e.
the actual call. Each call requires 2 RTP ports, one to control the call and
one for the call data, so the number of ports you need to open is double
the number of simultaneous calls.
Ports required for remote 3CX Apps & SBC
To allow users to use their 3CX apps remotely, on Android, iOS or Windows, you
need to ensure that these ports are open:
Port 5090 (inbound, UDP and TCP) for the 3CX tunnel.
Port 443 or 5001 (inbound, TCP) HTTPS for Presence and Provisioning, or
the custom HTTPS port you specified.
Port 443 (outbound, TCP) for Google Android Push.
Port 443, 2197 and 5223 (outbound, TCP) for Apple iOS Push. More
information here.
PUSH messages are sent by the 3CX System to Extensions using smartphones to
wake up the devices for calls. This greatly enhances the usability of the
smartphone apps.
Ports required for 3CX Video Conference
To create and participate in web-based meetings, the 3CX-hosted cloud service
must be able to communicate with the 3CX PBX and vice versa. To do so, these
ports need to be configured:
Port 443 (inbound, TCP) must be allowed for participants to connect your
3CX System
3CX System: Port 443 (outbound, TCP) must be allowed to connect to
3CX’s cloud infrastructure
Users: Port 443 (outbound, TCP) and 48000-65535 (outbound, UDP) must
be allowed to exchange audio and video with other participants
Ports Required for Other Services
3CX connects to various services provided in the cloud.
SMTP Service: Cloud Service for SMTP Messages
smtp-proxy.3cx.net, 2528 (outbound, TCP)
Activation Service: Activation of 3CX Products
activate.3cx.com, 443 (outbound, TCP, uninspected traffic)
Discovery Service: Discover your Public IP
discoverv4.3cx.com, 443 (outbound, TCP, uninspected traffic)
RPS Service: Provisioning of Remote IP Phones
rps.3cx.com, 443 (outbound, TCP)
Update Server: For 3CX updates and IP Phone firmware
downloads-global.3cx.com, 443 (outbound, TCP)
Configure Split DNS / Hairpin NAT
You will need to configure the 3CX FQDN to work both internally on your local
network and externally outside of your network (unless you do not want to give
access to your phone system from outside the network). Read how to configure
split DNS here.
Disable SIP ALG
Use a router/firewall without a SIP Helper or SIP ALG (Application Layer Gateway),
or a device on which SIP ALG can be disabled.
Run the Firewall Checker
After configuring your firewall, run the 3CX Firewall Checker to verify its
configuration!
ACL/Firewall
Each on-premise installation environment is different, therefore, it is your
responsibility to define the appropriate ACL/firewall rules that will not allow the
3CX host to reach sensitive subnets/endpoints within your network. This must be
handled on the networking layer in gateways and firewalls and in the forefront of
3CX, to prevent pivoting our infrastructure in the case of a compromise.
Why the Firewall Checker Does Not Lie
Port Forwarding
Port Preservation
Examples
Test 1
Test 2
SIP ALG Test (since V15.5 SP1)
See Also
3CX has an inbuilt automated firewall checker which validates the setup of your
firewall in terms of “port forwarding” and also “port preservation”.
Port Forwarding
3CX will check if “Full Cone NAT” is correctly set up on the firewall/gateway
device. Full Cone NAT allows any external entity to connect to 3CX without the
need for the firewall to first confirm that the actual packet originated from 3CX
before allowing the connection. This is very important for VoIP Providers
especially, as the SIP server is not the same server (source IP Address) which will
deliver the end audio to your system. In some cases firewall implementation will
set “not allowed” incoming traffic onto a deny list, which will prevent a
connection to the destination even if 3CX starts sending data (audio) to its
destination.
Port Preservation
Port preservation is another key factor which is checked by the firewall checker. It
detects if the firewall alters the port during the LAN IP to WAN IP translation.
Technically speaking this should not matter, however it depends on the
provider's implementation whether they reply to the transport source port of 3CX
seen in the UDP header rather than what is defined by the RFC. The RFC defines
that a SIP server MUST reply to the defined “contact” IP and Port which is in the
content of the SIP message. In order to eliminate any “maybies” the firewall
checker also validates this mapping. It is required that if a SIP message is
generated locally by 3CX from the source port 5060 (default SIP Port) then
translated to the public IP Address (WAN IP) the port, in this case 5060 remains
unchanged.
To do this the firewall checker will run two independent tests with the first
configured STUN Server in your system. By default this is set to stun.3cx.com. It
is highly recommended that this is not altered. Overall, the firewall checker is a
programmatic way to detect your public IP address, similar to using a website
like “what is my IP”, but is extended to also check the port.
Examples
Below is a failed firewall check reported by the 3CX Management Console and a
corresponding wireshark capture of the flow. In this guide we will elaborate the
steps which are taken by the firewall checker and show you the results. The
wireshark capture is limited to show “port 3378 or port 3379” only, which this
test was based on. Its is important for the firewall checker that the Windows
firewall is disabled. The installation of 3CX creates exceptions for some 3CX
applications, however not for the firewall checker itself!
Test 1
3CX stops the services to free the local port in order to bind it to the firewall
checker. This document will only focus on the first port being tested (5060)
however the procedure is the same for all other ports.
The image above shows the following steps:
1. The local 3CX server with IP address 192.168.3.159, Sends a classic stun
request to stun.3cx.com with IP 198.50.247.220.
2. From local port 5060 UDP.
3. To 3478, which is the default stun server port.
4. Declaring that the STUN server should NOT change its IP or the Port in
order to reply to this request.
Each request has a unique “transaction ID” to reliably ensure that the received
data belongs to the initial request. In rare cases you might see that the server
sends multiple requests however never gets a reply as shown below. This implies
that:
a) The outbound traffic was blocked by the firewall or b) No return was passed
back to the server. In both cases, check your firewall settings!
The Stun server then answers with:
1. A Binding Response to the requests
2. Then defines that the public IP and Port from where the request was sent
from is equal to the port 5060 and the IP address is XX.XX.96.162.
Based on the definition earlier - port preservation is working as the stun server
can see the PBX on the defined port. If you see any other port in the “Mapped-
Address” field the firewall check will fail and port preservation is NOT working
correctly. in this case you will need to contact the firewall manufacturer to
resolve the problem.
Test 2
In test 2 the server will send a request to the same stun server as before.
However,
1. The 3CX Server marks the request to be different than before and
sets “Change IP and Change Port” to (1). This means that the stun
server should send its response back to 3CX however from an IP address
and Port which is now unknown to the firewall expecting a response to the
request.
2. It is clear that the server sent the same request 3 times without getting a
reply from the stun server. This indicates that full cone NAT is not working.
Compared to test 1, where the 3CX server actively sends data to the stun server
and receives a response, test 2 shows that the data returns from a source that
3CX has never talked to (i.e the audio server of a VoIP provider) and was not able
to receive any response. In this case contact the firewall manufacturer to resolve
the problem.
The correct response would be to receive data in the second test whereby
the “Mapped-Address” is exactly the same as in test 1 for IP and Port.
If you are keen to see where the traffic should have come from, check your
firewall logs for the IP addresses of the 3CX stun servers. The answer was
expected to come from the 3CX stun servers but never made it to the NIC of
3CX.
SIP ALG Test (since V15.5 SP1)
In addition to the existing NAT test, 3CX evaluates if the firewall has SIP ALG
enabled. SIP ALG in brief, are functions found in some firewall devices inspecting,
beside the from and to IP/Ports access list, the content of the packages. In this
case SIP. For the administrator of 3CX this can cause numerous issues and due to
the fact that the changes to the SIP messages are made by an intermediate hop,
traces made on 3CX will not show those changes. However they may cause
incompatibility issues with remote IP phones or VoIP providers.
Validation: 3CX will generate a generic INVITE message and send it against an
online service hosted by 3CX. Except the public IP address all other information
is generic rendered.
3CX local generates CRC32 hash value from the send message and expects in
return an answer from the cloud service that the hash will have the same value.
If “X-CSREQ” return value matches the local calculated value, it is expected
that SIP ALG has not tampered with the message or is not present. If the values
do not match, the test shows that a hop between 3CX and the online service has
altered the content = SIP ALG.
On a validation basis, the expected hash value can be calculated given that
wireshark has captured the outbound INVITE to the SIP ALG detection service.
Right click on the Invite sent from 3CX, Copy, Bytes, Hex Stream.
Open:http://www.sunshine2k.de/coding/javascript/crc/crc_js.html
And paste the copied hex stream into the CRC Input Data
The given Result must match the value returned.
Network Capture from Web Interface
Introduction
Prerequisites
Start a Capture
Retrieve the Capture
Limitations
Introduction
In the 3CX network, captures can be triggered directly from the Management
Console. This allows for live packet captures that are saved in PCAP format which
can then be attached to a generated SupportInfo file or can be directly
downloaded.
Prerequisites
For Windows-based installs, it remains the administrator's obligation to install
Wireshark on the OS running 3CX.
If Wireshark cannot be detected this message is shown.
For Linux-based setups, tcpdump is automatically installed while installing or
updating 3CX.
Start a Capture
1. Go to your 3CX Web Client > Admin Console and navigate to
"Dashboard" > Click on "Capture".
4. Open the FileZilla Server and connect with the default options to
configure.
Configure the FileZilla FTP Service
If your server is not running behind a NAT device, proceed to add a user.
Otherwise, proceed to configure the FileZilla passive mode options.
FileZilla Passive Mode Options
Use the FileZilla navigation menu to go to “Edit” > “Settings” > “Passive
Mode Settings” and configure passive FTP connection options to suit your
network environment:
1. “Use custom port range” - enable and set the port range to use, e.g.
the port range
10100
to
10199
is recommended.
2. “External Server IP Address” > “Use the following IP” - select and
replace the “X.X.X.X” to match your public IP address.
3. “Don’t use external IP for local connections” - enable to use the local
server IP for LAN connections.
4. Click on “OK” to save the configuration.
Add an FTP User account
1. Use the FileZilla navigation menu to go to “Edit” > “Users”.
2. In the “Users” window, click on the “Add” button and enter the
username in the “Add user account” dialog, e.g.
3cxftpuser
. Click “OK” to save the new user.
4. Click on the “Shared Folders” page from the left sidebar menu and:
1. Click on “Add” below the “Shared folders” panel, select a directory for
the new FTP user to store 3CX backups into and click “OK” to set.
2. In the “Files” and “Directories” panels, enable the permissions to
assign to the new user. Select all options for full compatibility with the
3CX Backup and Restore function, or set according to your security policy.
3. Click on “Set as home dir” to set the specified shared folder as the
default folder for the new FTP user when logging in.
4. Click “OK” to save the new FTP user configuration.
5. Proceed to use the configured FTP service and user for the Backup and
Restore function in the 3CX Management Console.
Using an FTP Server for 3CX Backups - Linux
FTP Server for Linux
Configure the vsftpd FTP Service
Add an FTP User to vsftpd
See More
This guide presents the supported FTP solutions available for 3CX Backup and
Restore on Linux.
Important Note
The FTP servers tested by 3CX on Linux are vsftpd and Pro-FTPd. An FTP server
runs independently of your 3CX PBX and is not required to be installed on the
same machine. The FTP server mentioned in this guide is vsftpd.
FTP Server for Linux
This guide describes the installation of the “vsftpd” (very secure file transfer
protocol daemon) FTP server on Debian 9/ Debian 10, free for anyone to
download and use. To install the “vsftpd” FTP server:
1. Use an account with administrative privileges to log on to your Linux
system via SSH or local terminal.
4. Enable the
vsftpd
service to start on boot with the command:
sudo systemctl enable vsftpd.service
Configure the vsftpd FTP Service
1. Using the Linux terminal, create a new FTP user with the command:
sudo useradd -m -s /bin/nologin 3cxftpuser
In this example we create the FTP user “3cxftpuser” with the “-s
/bin/nologin” option to disable shell access for this account, i.e. to be used only
for file transfers.
2. To set a password for the new FTP user, use this command:
sudo passwd 3cxftpuser
3. Proceed to use the configured FTP service and user for the Backup and
Restore function in the 3CX Management Console.
3CX Backup & Restore Commands
Introduction
BackupCmd
General
Backup Command on Windows
Backup Command on Linux
RestoreCmd
General
Restore Command on Windows
Restore Command on Linux
See Also
Introduction
These commands can be used to create scripts and schedule backup and restore
operations, externally to the built-in 3CX Management Console functionality. This
is useful when hosting on cloud for archiving in bulk PBX users, data and
configuration for safekeeping.
BackupCmd
The BackupCmd command line tool enables backups to be taken with these
options:
Notes:
Mandatory options are denoted above with *.
Specifying an existing backup file with the
-f
or
--file
switch, overwrites it without warning.
Specify an existing log file with the
-l
or
--log
switch to append to.
Values, filenames and paths with space(s) are not recommended,
otherwise they need to be enclosed in double quotes when used in option
arguments.
Ensure that specified backup and log file paths are writable on Linux by
the “phonesystem” user, and on Windows by the executing user.
General
Specifying a filename with the “--file” or “--f” switch as a:
filename, the backup file is stored in the backup location configured in the
Management Console, e.g.
BackupCmd -f=my-pbx_full_bak.zip
full filename path, overrides the configured location and stores the backup
file in the specified path, e.g.
BackupCmd -f=c:\backup\my-pbx_full_bak.zip
When the “--log” argument is specified, it has to be followed by either:
a filename to store the log in the current working directory, e.g.
BackupCmd -l=bak_cmd.log -f=my-pbx_full_bak
a full path to a local filename to override and store in the file specified,
e.g.
BackupCmd -l=c:\backup\bak_cmd.log -f=my-pbx_full_bak
Backup Command on Windows
To use the backup command on Windows, open a command prompt with
administrative privileges, change to this directory using
cd C:\Program Files\3CX Phone System\Bin
and run the command to:
Display available backup command options:
BackupCmd.exe --help
Make a full PBX backup and keep a log:
BackupCmd.exe --file=full_pbx_backup.zip --options=ALL --
log=backup_cmd.log
Make a backup including call history, license and FQDN, keeping a log:
BackupCmd.exe --file=partial_pbx_backup.zip --options=CH,LIC,FQDN --
log=backup_cmd.log
Backup Command on Linux
To use the backup command on Linux, run the command in a terminal as user
phonesystem
using
sudo
to:
Display available backup command options:
sudo -u phonesystem 3CXBackupCmd --help
command to see all available options.
Make a full PBX backup and keep a log:
sudo -u phonesystem 3CXBackupCmd --file=full_pbx_backup.zip --
options=ALL --log=/var/tmp/pbx-backup_cmd.log
Make a backup including call history, license and FQDN, keeping a log:
sudo -u phonesystem 3CXBackupCmd --file=partial_pbx_backup.zip --
options=CH,LIC,FQDN --log=/var/tmp/pbx_backup_cmd.log
RestoreCmd
The RestoreCMD tool enables to restore backups via command line with these
options:
--failover Failover mode - services are not started after restore on a PBX set up as passiv
Notes:
Mandatory options are denoted above with *.
Specify an existing log file with the
-l
or
--log
switch to append to.
Values, filenames and paths with space(s) are not recommended,
otherwise they need to be enclosed in double quotes when used in option
arguments.
Ensure that specified log file paths are writable on Linux by the
phonesystem
user, and on Windows by the executing user.
General
Specifying a filename with the “--file” or “--f” switch as a:
filename, retrieves the backup file from the backup location configured in
the Management Console, e.g.
RestoreCmd -f=my-pbx_full_bak.zip -l=c:\backup\restore_cmd.log
full filename path, overrides the configured location and retrieves the
backup file from the specified path, e.g.
RestoreCmd -f=c:\backup\my-pbx_full_bak.zip -l=c:\backup\
restore_cmd.log
When the “--log” argument is specified, it has to be followed by either:
a filename to store the log in the current working directory, e.g.
BackupCmd -l=bak_cmd.log -f=my-pbx_full_bak
a full path to a local filename to override and store in the file specified,
e.g.
BackupCmd -l=c:\backup\bak_cmd.log -f=my-pbx_full_bak
Note that the specified path needs to be writable:
on Linux for the “phonesystem” user
on Windows for the user set to execute the task.
Restore Command on Windows
To use the restore command on Windows, open a command prompt with
administrative privileges, change to this directory using
cd C:\Program Files\3CX Phone System\Bin
and run the command to:
Display available restore command options:
RestoreCmd.exe --help
Restore a backup and start 3CX services immediately after restore:
RestoreCmd.exe --file=pbx_backup.zip --log=restore_cmd.log
Restore a backup in failover mode and keep 3CX services stopped on a
PBX set up as passive failover node:
RestoreCmd.exe --file=pbx_backup.zip --log=restore_cmd.log --failover
Restore Command on Linux
To use the restore command on Linux, run the command in a terminal as user
phonesystem
using
sudo
to:
Display available restore command options:
sudo -u phonesystem 3CXRestoreCmd --help
Restore a backup and start 3CX services immediately after restore:
sudo -u phonesystem 3CXRestoreCmd --file=pbx_backup.zip --
log=restore_cmd.log
Restore a backup in failover mode and keep 3CX services stopped on a
PBX set up as passive failover node:
sudo -u phonesystem 3CXRestoreCmd --file=pbx_backup.zip --
log=restore_cmd.log --failover
Configuring Google Cloud Storage for 3CX
Prerequisites
Creating a Service Account
Creating a Storage Bucket
See Also
Take advantage of the reliable and cost-efficient online storage on Google Cloud
Platform. 3CX enables you to create storage buckets under your Google Cloud
account and use these to store backups and/or archive recordings.
Prerequisites
To configure Google storage buckets, go to “IAM & Admin” > “IAM” in your
Google Cloud dashboard and verify that your account has at minimum these
roles assigned:
4. Click on “Create Service Account” and fill in the info for the new service
account in your selected project. Click on “Create”.
5. On the “Grant this service account access to project” page, select
the “Storage Admin” role,click on “Continue” and then “Done”.
📄 Note: Refer to the Google Cloud roles documentation for more info on roles
and their respective permissions.
6. Go back to the service account page and "Keys" section and press the
"Add Key" > "Create new key". In the “Key type” select “JSON” and click
on “Create”.
Creating a Storage Bucket
If you have an active subscription with configured payment options, proceed to
create a new storage bucket under your Google cloud project :
1. From the main navigation menu, select “Storage” > “Browser” and
click on “Create Bucket” to create a new storage bucket.
2. On the "Create a bucket" page, configure:
1. Name - enter a globally unique permanent name.
2. Where to store data - select storage location type according to your
requirements.
3. Storage class - select the appropriate storage class for your use.
4. Access control - set how to control access to the objects in the storage
bucket.
5. Advanced settings - optionally set encryption and retention policy
preferences for the storage bucket.
3. Click on “Create” to set up the new storage bucket.
4. After creating your storage bucket, you can click on “Create folder” to
add new folders for keeping backups and archived recordings in,
e.g. “3cx_backups”.
Proceed to use your saved JSON key and set the configured Google Cloud storage
bucket as a location to store 3CX backups and archive recordings.
⚠ Important:
Stored backup files or archived recordings in the “Hold” state or
stored/archived due to effective retention policy, cannot be deleted or
overwritten by the PBX.
Chapter 4: Bridges
Do you want to connect two (2) 3CX systems? Worry not! Let’s say you have two offices
in two different cities or even countries. How would you connect them to move back and
forth? With a bridge, of course!
This chapter will explain how Bridges work and how to configure them. We’ll also have a
look at different scenarios for better understanding.
Learning material:
As a 3CXpert you need to be able to troubleshoot any issue arising within the
PBX in no time. 3CX has a variety of tools and resources to help you through
this process such as the event log, audit log, Wireshark and more.
Filter by Date: Select to filter the logging by date / time range. 3CX Phone
System timestamps the logs using the time of the local machine.
Filter by Tags: Most log lines have been assigned a tag. For example, all the
logs for a particular call are tagged with their Call ID (e.g. CallID 10). There are
many tags which you can use. We’ll look at some important tags at the end of
this guide.
When you want to filter by a particular tag, you double click on the tag and the
Tag formula window and the formula text will be updated with your selection.
Click the “Apply” button to filter using the selected tags.
You’ll come across situations where you want to use operators in your filter.
For example, if you select SiPMsg.method(INVITE), and need only the Invites
for extension 100, you can click the “AND” button and then
select “DN(100)” from the tag list.
You can also build nested Queries. For example, you might want to filter for
the INVITE requests for calls with ID 12 and 13. This is shown in the
screenshot below:
The Formula text gets updated as you add and remove tags. Copy and save
formulas that you use often. This will save you time trying to find the tag
needed.
Important Note – The tags shown are the ones which are found in the binary
log. So if, for example, you are trying to filter the log for extension 116, and
you are not finding DN 116, it means that the log does not contain any entries
from extension 116.
Highlight Matching Logs: When this checkbox is checked, all the log entries
are displayed, and the logging that matches the filtering criteria will be
highlighted in red. Press “Apply” to refresh the logging using your selected
filtering criteria.
Log Window
The log window is where the log entries are shown. You can right click on an
entry and “Select All” the log entries or “Copy” the selected logs to the
clipboard. You can select multiple entries by holding down the Shift or Control
key. The above screenshot shows log entries for Extension 100 being
highlighted.
Tags Window
The tags window will show all the tags that have been assigned to the selected
log entry. You can double-click on any of the tags in order to filter using that
tag. If using Operators, you first need to select the operator before double
clicking on the tag in the tags window. The tags window is very useful when
you want to learn about new tags. For example, in the selected log entry the
CallId tag is 1 and the DestAddr.Host is an IP address.
Detail Window
When you select a log line, the detail window will show it.
Some log entries consist of multiple lines which are not shown in the main log
window. These are shown in the detail window. An example is the SIP
messages that are shown in the screenshot below.
Other Features
Records / Page: The 3CX Log Viewer uses paging – it doesn’t show the binary
log in one go, otherwise it might use too many resources and too much time
for a large binary log file. It will log an X amount of records per page. By
default, it loads 10,000 lines per page. This number is configurable from the
Preferences section.
Use the arrow buttons at the top to move from one page to the next or to go to
the beginning or the end of the log file.
Searching the Logs: You can also search the log by inserting the search term
in the Find: entry field and pressing “Enter”. This will search from the current
position to the end. Alternatively, use the down button to search downwards
and hit the up button to search upwards. The search will always be performed
starting from the current position. Note that searches are done across all the
pages until the search reaches the beginning or the end of the log file.
Opening Logs: When you open the 3CX Log Viewer, it will automatically load
the logs from the last location. You can open another set of 3CX logs from
“File → Open”. You can also view a set of logs that you recently opened from
“File → Recent Logs”.
Preferences: From “View → Preferences”, you can configure how many
records are shown per page. You can also select the Severity mask and Log
Level that will be used when showing the logs. The screenshot below shows
the default values, which should be valid in most troubleshooting situations.
These settings are retained when you close the 3CX Log Viewer.
Associate Log Files: From “Settings → Associate log files”, you can associate
blrec and bldef files with the 3CX Log Viewer.
Export to Text: From “Tools → Export to text”, you can export the filtered log
entries to a text file. All log entries from all pages will be exported. Remove
any filters if you want all the log entries to be exported. You might need to
adjust your default filtering preferences from “View → Preferences”.
Command Line: The 3CX Log Viewer can also be executed from the command
line, in which case it will accept the following parameters:
3cxBinLogViewer.exe < Input Path to log files> <Export Path to text file>
If you run 3cxBinLogViewer.exe <Input Path to log files>, 3CX Log Viewer will
load the log files found in the path specified. For example
– 3cxBinLogViewer.exe c:\3cxlogs.
If you run 3cxBinLogViewer.exe <Input Path to log files> <Path to export text
file>, 3CX Log Viewer will export the binary logs in the Input Path to the text
file specified in the Export Path. For example – 3cxBinLogViewer.exe c:\
3cxlogs c:\3cxlogs\txtlog.txt.
Information on the 3CX Server Logs
The 3CX Server Logs are made up of one bldef file and one or more blrec files.
The bldef file is the file that contains information about the tags, and other
index data. The blrec files are the files that hold the logs. Both files are
required in order to read 3CX Logs. Note that one bldef file can be used to read
multiple blrec files.
The 3CX logs rotate when they reach 50MB. If the Keep Backup option (in “3CX
Management Console (Dashboard) → Activity Log → Settings”) is disabled,
two blrec log files are kept – the current one and the previous one. If the Keep
Backup setting is enabled, the older files will be moved to the backup folder.
There is an option to keep backup of log files for X number of days. This
affects how many 3CX Logs are kept in the backup.
Note that the 3CX Server Logs are the logs which are written by the 3CX Phone
System SIP Server service. Other processes, such as the 3CX Phone System
Media Server service, write logs in .log format, and can be viewed with a text
editor.
Useful Tags
This list will help you understand and start using log tags (not all tags are
listed):
CallId: Each call is assigned a Call ID by the PBX. The CallId tag allows
you to filter by the logging that matches the selected CallId.
Cause.Code: The Cause.Code shows all the SIP cause codes found in
the log. Therefore, if for example you are troubleshooting a situation
whereby a call is returning a busy tone, you can filter for Cause.Code =
486
Contact.Host: The Contact.Host allows you to filter for a specific IP
address as listed in the SIP header.
DestAddr.Host and SrcAddr.Host: Useful when filtering on the
destination/source address. Note that this is the network address, not
the one specified in the SIP header.
DN: This is the extension number of the phone or device (virtual
extension number). Use this tag to filter the logging from a particular
extension or port on a device.
InboundDID: This might come in useful when you want to filter the
logging for a specific DID number.
SipMsg.Method: This is useful to filter the logging and show a specific
SIP message. For example, you might want to show only the REGISTER
SIP methods in the log file. This is useful to get you started – maybe you
want to find when a registration took place so you can then filter the
logging by date. Remember to check the other SipMsg.X tags
Security is a very important issue for any business of any size. 3CX has in-
built security features including Anti-hacking, TLS certificates, SIP
Authentication, and IP Blacklist.
But do you know what the most common VoIP attacks, hacks or exploits are?
Join us on the 3CX live technical webinar to discuss the possible threats along
with how to implement security measures on your system to best protect your
network.
Posted on April 24th, 2015 by Ruth Elizabeth Abbott, Operations Director, 3CX
All it takes a glance at the week’s headlines to see that cyberattacks are growing
in both frequency and complexity. Internet hackers can strike anyone, even your
business’s IP-PBX phone system. If you’ve recently implemented an IP-based
phone system, ensure you can continue to reap the benefits while avoiding
potential vulnerabilities.
Ensure that your Internet-telephony system is as secure as possible by taking
these three crucial steps:
Implement security software
Ensure you have strong antivirus, antimalware and a firewall in place, and check
that it is regularly updated. An intrusion detection system monitors your IP-PBX
for suspicious activity that could signal an impending attack, while a firewall
reduces access to non-trusted networks by IP-PBX phones. In addition, make sure
your system software is frequently backed up to a secure location to combat
security breaches and hacking.
Set strong passwords
Most IP-PBX servers are configured through a web interface that uses a password
to gain access. As such, a weak password can leave a potential security gap
which hackers can easily exploit. To that end, ensure that strong passwords are
set and frequently changed on IP phones that access the same system. Also be
sure to discard the default password your IP-PBX system came with. Instead, set
a strong password that contains a combination of lower and upper case letters,
numbers, symbols, and avoids spelling out recognizable words and dates.
Monitor system usage
Network attacks will often emerge in the form of unusual or increased network
activity. Monitor network usage through aggregating pertinent information about
network users, applications, and peak usage times. Use visual tools such as
graphs to help pinpoint unusual activity. In doing so, you’ll be able to more easily
detect whether the traffic is a true security threat.
Sometimes your telecom provider will deliver the call with “unknown” or some
other text instead of “anonymous”. Simply examine the incoming INVITE
particularly the “From” field and you can then add or adjust your blacklist rule
accordingly.
3. Click on the “Reset Password” option below the user profile image
(shown above).
4. An email will be sent to the email specified in the user configuration. Click
on “Set your password”.
5. Type your new Root Password both in New Password and Confirm
Password fields and click “OK”. Passwords should be at least 10
characters long with no spaces. Must contain minimum 1 lowercase and 1
uppercase letter, a digit and a special character. Supported special
characters are: !#$%&()*+,-./:;<=>?@{}
6. This will log you out from the 3CX Admin Console. Login again with your
new credentials.
Forgot your root credentials?
If you forgot your root credentials, you can have them sent to the PBX admin
email:
1. Navigate to the login screen of your 3CX.
2. Click on the “Forgot password?”
3. Enter your Email address
4. Your current credentials will be sent to the configured email address given
the email exists.
Action 2: Set up a System Owner
The role of System Owner which can be assigned to any user/extension. New
installations already configure the first ever user of the system as a system
owner. If you are an existing user and you have upgraded, you will receive a
warning in the Admin Console to assign an extension/user as a System Owner.
1. To assign the ‘System Owner’ role, log in to the 3CX Admin Console and
navigate to “Users”.
2. Edit the user you want to elevate to a System Owner, click on
the “General” tab.
3. Select the “System Owner” role in the “Role” dropdown.
4. Once a user is assigned the “System Owner” role, the user can log in to
both the Web Client and the Admin Console using their existing
credentials. If the user does not have their credentials, press the “Reset
password” button in “Users” > “General”
Action 3: Limit Access to the 3CX Admin Console and Web Client by IP
A really good way to secure your PBX is to lock down the administration of your
PBX to a specific list of IPS, for example, the IP of your office and maybe the IP of
the home of the network administrator. To do this:
1. Log into the 3CX Admin Console.
2. From the left panel, navigate to “Advanced” > “Console Restrictions”
3. Select the option to “Allow Access from specific IP Addresses only”.
4. Click the “+Add” button to add an IP.
5. Important: Before you click OK, make sure that you see the blue info
message (left) indicating that your current IP is allowed
6. If you see this red warning (right), it means you haven’t added your
current remote office IP Address in the allow list. Clicking OK while seeing
this message will lock you out of the Admin Console / Web Client.
7. Make sure you have a static IP! If you have a dynamic IP and it
changes you will be locked out of your Admin Console / Web Client.
Action 4: Reset User Credentials via Web Client
Reset Credentials for all Users
You can mass reset the credentials of any / all users of your PBX using the
following steps:
1. Login to the 3CX Admin Console using Root or System Owner Credentials
and navigate to ‘Users’.
2. Select all the users that you wish to reset their credentials and click
on “Reset”.
3. Reset procedure will start for the selected users.
Keep in mind
Note that if you select to reset the following options you will need to reprovision
any IP phones or apps registered on those extensions.
SIP ID and Authentication Passwords
Voicemail PIN
IP Phone Web Password
Regenerate provisioning file & QR Code for 3CX Apps
Allow Users to Change their own Credentials
There is also the option of allowing users reset their own credentials from their
Web Clients. To do so:
1. Login to the Admin Console using Root Credentials or as a System Owner.
2. Navigate to “Settings > Options” and make sure to enable the
option “Allow change password for 3CX Apps”.
3. By enabling this, you expose the option in the Web Client for each user to
reset their own credentials.
4. Now inform your users to log into their Web Client and navigate
to “Settings > General” and click on “Change Password”.
5. Type your current password in the Old Password field and type your new
password both in the New Password and Confirm New Password fields.
Click on “Save”. Passwords should be at least 10 characters long with no
spaces. Must contain minimum 1 lowercase and 1 uppercase letter, a digit
and a special character. Supported special characters are: !#$
%&()*+,-./:;<=>?@{}
6. The password is updated and users will need to login to their web client
using their new password.
Action 5: Use SSO - Google or Microsoft 365
A great way to secure your PBX is to enable SSO so that users can use their
Google or Microsoft 365 account to authenticate with the PBX. This allows users
to not only re-use the same password but it also means you can switch on 2
factor authentication if you have it configured.
Please follow these guides to read more on how to set up SSO with 3CX.
Configuring SSO for Google
Configuring SSO for Microsoft 365