Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Go to the MikoPBX installation console, remember the IP address that your PBX received.
Enter the received MikoPBX IP address in the web browser. The authorization page will be displayed.
By default, login is admin, password is admin
After successful authorization, MikoPBX will automatically open the settings for changing the password
For more information about the General Settings, see the System Settings section.
Description of MikoPBX and the sections you can find in the documentation. Introduction to the documentation.
Welcome to the MikoPBX documentation resource! Here you can find step-by-step instructions related to interacting with the MikoPBX PBX system. For your convenience, the documentation is organized into sections—just like in the web interface—making it very easy to navigate.
Thank you for choosing MikoPBX!
MikoPBX is a free telephony server with its own operating system and a simple, user-friendly web interface. It works with virtually any telephony technology in the world.
MikoPBX is a fully modular interface for Asterisk, written in PHP and JavaScript. This means that you can implement absolutely any additional Asterisk telephony functionality within MikoPBX. Moreover, if you develop a useful module, you can place it in the public repository and make it available to all MikoPBX users. Additionally, MikoPBX has very low hardware requirements:
To get started, you should install MikoPBX using any method convenient for you. Below are installation options. By clicking on their names, you can access detailed articles:
Installation on a standalone computer.
Installation in a virtual machine.
Installation using cloud services.
Installation in a Docker container.
After installation, you can begin exploring your PBX system. The "User Guide" documentation will help you with this, providing detailed information about specific sections:
For additional help with getting started quickly, you can refer to this article.
If you have familiarized yourself with the basic setup and operation of MikoPBX, you can expand its functionality using modules.
Modules allow you to add extra features to your system. You can learn more about them step by step:
Registration in the MikoPBX Marketplace – here you'll find a detailed description of the registration process and its specifics.
Module Management – this section provides a detailed explanation of how to install and manage modules.
Documentation on Specific Modules – in this section, you'll find detailed descriptions of each module, as well as steps for configuring and using them.
In this section, you can find answers to your questions and solutions that will help you expand the functionality of basic features. This section, like the main documentation, is divided into categories for easy navigation.
If you have a question that isn't covered here, you can seek assistance in the Telegram Community, where MikoPBX users help each other resolve issues and needs related to the PBX system.
This guide provides detailed steps to get started with MikoPBX and helps you quickly configure the system.
Follow the step-by-step instructions in the order presented for a quick and successful system setup.
MikoPBX is a full-fledged operating system for your hardware; it is not a standalone application. It is provided as an image file (*.iso, *.img, *.raw).
It supports various installation methods:
Installation on a standalone computer.
Installation in a virtual machine.
Installation using cloud services.
Installation in a Docker container.
Follow the link for your preferred installation method and proceed according to the provided instructions.
After installation, you need to access the MikoPBX web interface for further system configuration. To do this, find the PBX's IP address in the MikoPBX console:
In this example, the IP address is 192.168.0.203. To access the web interface, enter this IP address into your browser's address bar:
If the logs do not provide a username and password, use the default credentials:
Username: admin
Password: admin
After the first login, the system will prompt you to change your password.
For stable PBX operation, you need to configure the network through the Network and Firewall → Network Interface section. Detailed instructions for these settings can be found here.
In MikoPBX, all local subnets can be defined in the Network and Firewall → Firewall section. The firewall is intended to restrict access to the PBX based on traffic type and subnets. Follow the setup instructions here.
Fail2Ban blocks IP addresses exhibiting unusual activity; it can reduce the rate of failed authentication attempts and helps protect your PBX from hacking. Instructions to help with the setup can be found here.
After completing the initial PBX setup, you can proceed to create accounts for your employees. This instruction will assist you.
After adding employees, you need to connect providers to your PBX. Instructions for this section can be found here. Instructions with examples of configuring real providers can be found here.
At this stage, you need to set routing rules for incoming and outgoing calls: how calls passing through a specific provider will be handled:
To create routing rules, you may also need the following features:
The Marketplace allows you to extend the system's standard functionality using modules:
You can read more about Modules in MikoPBX in this article.
Information on registering in the MikoPBX Marketplace can be found here.
This completes the basic setup of MikoPBX! For a deeper exploration of MikoPBX's capabilities, we recommend referring to the comprehensive documentation.
Start by creating a new virtual machine.
Enter the Name, Type, and Version of the virtual machine, as shown in the image below.
Select a datastore for the virtual machine.
Allocate 1024 MB of memory to the virtual machine and create a new virtual hard disk for the system with a size of 1024 MB.
Choose the SCSI controller type and adapter type, as shown in the image below.
Select BIOS as the Firmware option.
Review and save the changes.
Open the settings of the created virtual machine. Create a new hard disk for storing call recordings.
We recommend allocating at least 50 GB for this disk.
Go to the CD/DVD Drive tab. Upload the ISO image for installation, and check the box next to "Connect at power on."
Start the virtual machine.
The MikoPBX command-line interface will open as the PBX starts loading from the optical disk containing the ISO image. You will see the message: "The system is loaded in recovery mode (Live CD)".
Use the arrow keys to navigate the menu, and press Enter to select an option. You can also press the corresponding number on the numpad.
Install MikoPBX:
All data on the disk where MikoPBX is being installed will be lost.
Go to [8] Install:
Information about all available disks will appear (in this example: sdb, sdc).
Enter the name of the disk you intended as the "system" disk, in this case, sdb, and press Enter (or simply press Enter if it’s already selected).
The system will prompt for confirmation. Type y and press Enter:
Once installation is complete, you will be prompted to select a disk for storing call recordings.
Approximately 14 MB of storage is required for every 1 hour of recorded conversation.
Enter the disk name (in this example, the only available disk is sdc) and press Enter.
After installation, the system will reboot.
MikoPBX will now boot from sdb, the system disk, and the line "The system is loaded in Recovery mode" will no longer appear—indicating a successful installation.
This completes the MikoPBX installation.
To access the control panel, enter the virtual machine's IP address in your browser's address bar.
The default login credentials are admin for both username and password.
This completes the MikoPBX installation.
Installing MikoPBX as a guest machine in VirtualBOX
Use versions of MikoPBX below 2024.1.114 for installation on VirtualBOX
Version 2024.1.114 temporarily does not support installation on VirtualBOX
Download Virtual Box from the link and install it.
Create a new virtual machine.
Specify the Machine Name and Folder.
Type - Linux.
Version - Other Linux (64Bit).
Click Next.
Specify the size of the base memory - 1024 MB, as well as the number of processors - 2
Press Next.
Select Create a new virtual hard disk. Enter a disk size of 700 MB, and also check the box "Pre-allocate Full Size"
Click Create.
Confirm the creation of the virtual machine: click Finish.
Go to the settings of the created virtual machine.
To do this, click Settings.
Click the Storage tab. Add a new hard drive to store call records.
In the window that appears, click Create.
Select the hard disk format - VDI (VirtualBox Disk Image).
Click Next.
The hard disk must be of a fixed size.
Check the box next to "Pre-allocate Full Size"
Click Next.
Specify the Name of the created disk.
Set the Disk Size to about 50 GB.
Click Finish.
Choose the newly created drive and click Select.
The created drive will appear in the media list.
Please mount the MikoPBX image onto an optical disc. To do this, select the optical disc in the 'Media' section and click on the image file selection button in the 'Attributes' section.
In the appeared menu, click on 'Choose a disk file...'
Select the downloaded ISO disk image.
"Go to the 'Network' tab.
Set the Connection Type to 'Bridged Adapter'. Click 'OK' to save all the settings you have made.
Start the created virtual machine.
The command interface of the PBX will open. The PBX will start booting.
At this stage, MikoPBX is booting from the optical disc containing the ISO image. This is indicated by the message: 'The system is loaded in Recovery mode'.
You can navigate through the menu items using the arrow keys.
To select a menu item, press the Enter key.
Alternatively, you can select a menu item by pressing the corresponding number on the alphanumeric keypad."
Install MikoPBX.
All data on the disk where MikoPBX is being installed will be lost
Click Install.
Information about all available disks will be displayed (in this example: sdb, sdc).
The disk where MikoPBX will be installed is referred to as the system disk (SYSTEM). You can choose a disk with a size larger than 500MB as the system disk.
Enter the name of the disk you referred to as the 'system disk' from the keyboard, in this case sdb, and press Enter. (If it is selected by default, you can simply press Enter).
The system will prompt for confirmation. Enter 'y' and press Enter.
After completing the installation, you will be prompted to select a disk for storing call records.
Approximately, 1 hour of conversation takes up 14MB of disk space.
Enter the disk name (in this example, the only available disk is 'cdc') and press Enter.
After the installation is complete, the system will reboot.
MikoPBX will now run from the sdb drive where you installed it.
We will see that the line "The system is loaded in Recovery mode" is missing.
To access the control panel, you need to enter the IP address of your virtual machine in the browser's address bar.
The default login and password are "admin" for MikoPBX.
The installation of MikoPBX is now complete.
Select Action / New / Virtual Machine
On the Specify Name and Location tab, enter the name of the virtual machine, for example mikopbx-vm
Proceed to the Specify Generation tab, and select Generation 1
On the Assign Memory tab, allocate the required amount of RAM based on the expected load on the PBX. For a test machine, you can specify 2 GB
Proceed to the Configure Networking tab, and select a pre-configured network connection
On the Connect Virtual Hard Disk tab, adjust the system disk size to 1 GB
On the Installation Options tab, check the Install an operating system from a bootable CD/DVD-ROM option
Select Image file (.iso) and provide the link to the MikoPBX distribution file with the .iso extension
After entering all values, click the Finish button
For deploying the PBX, use two disks:
a 1 GB disk for the main system
a 50+ GB disk for storing call recordings
Go to the settings of the created virtual machine
Select the IDE controller to which the system disk is connected
On the opened tab, select Hard Drive and click the Add button
Click the New button
On the Choose disk format tab, select VHD
On the Choose disk type tab, select Fixed size
On the Specify name and location tab, specify the name (e.g., storage.vhd) and the location of the disk
On the Configure Disk tab, set the disk size for data storage to at least 50 GB
Use the default values for other fields
Complete the setup by clicking the Finish button
To start the virtual machine, click Start
Go to the Connect tab of the created virtual machine mikopbx-vm
If the boot is successful, a console menu will appear. Enter 8 from the keyboard to start the installation
Select the system disk and enter the disk name from the keyboard, for example sda. Confirm the selection by entering y from the keyboard
Connect the disk for storing call recordings, and enter the disk name for connection from the keyboard, for example sdb
When the message "Press any key within 30 seconds to boot from LiveCD..." appears, do not press any buttons. In this case, the system will boot from the hard drive.
On the open Connect tab, copy the external address of the created virtual machine and enter it in the browser address bar
To log in, use the username - admin and password - admin
This guide covers creating and configuring a virtual machine in VMware Workstation Pro and installing MikoPBX on it.
You can download the VMware Workstation Pro installer from the official website.
Use versions of MikoPBX other than 2024.1.114 for installation on VMware Workstation Pro. Version 2024.1.114 currently does not support installation via VMware Workstation Pro!
Open VMware Workstation Pro and click "Create a New Virtual Machine" to start creating a new virtual machine.
In the setup interface, select the virtual machine type: "Typical (recommended)". Then, click "Next >".
Choose the installation source, "Installer disc image file (iso):". Select the .iso file you want to use. You can download the distribution from this link. Click "Next >" to continue.
Select "Linux" for the "Guest operating system" and "Debian 11.x 64-bit" as the version. Click "Next >".
Enter a desired name for the virtual machine in "Virtual machine name:" and, if necessary, specify a location on your computer under "Location". Click "Next >".
Set the size for the primary (system) hard drive, with a recommended size of 1GB. Choose "Split virtual disk into multiple files" and click "Next >".
A summary of the virtual machine configuration will appear. Click "Finish" to create the virtual machine.
Now, let's create and attach a second hard drive, which will be used to store call recordings.
Open the settings of the previously created virtual machine.
Click "Add..." to add a new system component.
In Hardware types, select "Hard Disk" and click "Next >".
Choose "Virtual disk type" - "SCSI". Click "Next >".
Choose "Create a new virtual disk" and click "Next >".
Specify the disk size, with a recommended minimum of 50GB. Also, choose "Split virtual disk into multiple files". Click "Next >".
Give the hard drive a custom name and click "Finish".
In the settings, go to "Network Adapter" and select "Network connection" - "Bridged: Connected directly to the physical network". Click "OK".
Start the virtual machine.
The MikoPBX command-line interface will open as the PBX starts loading from the optical disk where the ISO image was mounted. This is indicated by the line: "The system is loaded in Recovery mode":
Use the arrow keys to navigate through the menu options. Press Enter to select an option, or press the corresponding number on the numpad.
To install MikoPBX, select "[8] Install".
A list of available disks will be displayed (in this example, sdb, sdc). The system suggests a default disk, sdb in our case, for the installation. If you agree with the suggested disk for the system, press Enter. Otherwise, enter the name of another disk.
All data on the selected installation disk will be erased.
The system will issue a warning. To confirm the operation, enter "y" and press Enter.
After installation, you'll be prompted to select a disk for storing call recordings. Enter the disk name (in this example, sdc) and press Enter.
After installation, the system will restart. MikoPBX will now boot from sdb, the installation disk, without the line "The system is loaded in Recovery mode"—indicating a successful installation.
To access the MikoPBX web interface, enter your virtual machine's IP address in your browser's address bar. You can find the IP address in the console.
Enter the IP address in your browser’s address bar. Log in using the default credentials.
Use the following default credentials for the first login to the MikoPBX web interface:
Username: admin
Password: admin
An example of calculating the required channel bandwidth for different codecs for 30 simultaneous calls. PBX supports the most popular codecs:
G.711 - 4.67 Mbps
GSM - 1.68 Mbps
G.722 - 4.67 Mbps
G.729 - 1.38 Mbps
The calculation is approximate, when using the same codec on all devices connected to the PBX. Read more .
We recommend using two hard drives for PBX deployment.
800 Mb hard disk for the main system
A 50+ Gb hard drive for recording conversations
1 (2 cores) x86-64 processor
2 GB of RAM
Network Adapter
A PC with such parameters, in our tests, holds 38 simultaneous incoming calls under the conditions:
10 agents are connected to the queue (all online)
Every second a new call comes in
Music (MOH) is played to the client while waiting
Modules on the PBX is not installed
Approximately, 1 hour of conversation takes up 14MB of disk space.
Sign in to the service Amazon Web Services
To follow the instructions, install the Amazon Command Line Utility by opening Terminal and entering the following command
Let's get started with the setup
For quick and convenient navigation within the Amazon service, use the search panel
Go to your account
From the dropdown menu, select Security credentials
If you don't have an access key, do the following
Under the Access keys table, select Create access key
Copy the Access key and Secret access key
If you already have an access key, simply copy the Access key and Secret access key
Open Services / Storage / S3
On the tab select Create bucket
Enter a unique bucket name
Use default values for other fields
After entering the values, click Create bucket
Open the created bucket and select Upload
On the opened tab select Add files
Upload the file from the MikoPBX distribution with the .raw extension
Click Upload
Wait for the file to finish uploading
If not done previously for this cloud
Create a separate folder for files on your computer
Create a file named trust-policy.json in the folder
Open Terminal and navigate to the created folder
Run the command vi trust-policy.json
Enter editing mode by pressing i and paste the text
Press ESC and type :wq to save the file
Similarly, create a file named role-policy.json and change the bucket name value in the text to the name of your created bucket
Similarly, create a file named import-image.sh, change the DEFAULT_BUCKET parameter value to the name of your created bucket and the DEFAULT_IMAGE parameter value to the name of the image uploaded to the bucket
Run the command aws configure, specify the region and copied Access key and Secret access key
Run the command
Run the command
Run the command
If the command executes successfully, a unique AMI identifier will be generated
Open Services / Compute / EC2 and navigate to Images / AMIs
Select the created image and click Launch an instance from AMI to create a virtual machine
Enter the virtual machine name, for example mikopbx-vm
Specify the instance type - t3.micro
If you have an SSH key
Specify the SSH key in the Key pair field
If you don't have an SSH key
Select Create new key pair and specify the key pair name, for example mikopbx_key
Follow the instructions further
In the Network settings section, check Allow SSH traffic and Allow HTTPS traffic
To deploy the PBX use two disks:
A 1 Gb disk for the main system
A 50+ Gb disk for storing call recordings
If necessary, change the size of the storage disk in Configure storage, default size is 50Gb
For other fields use default values
Click Launch instance
Go to the created virtual machine mikopbx-vm
On the opened tab, select Connect / EC2 serial console, wait for the system to fully load until the authentication parameters are displayed
Copy the external address of the created virtual machine and enter it in the browser's address bar
Use the login and password provided in EC2 serial console for login
Make sure to configure the Firewall on the MikoPBX
Sign in to the service Amazon Web Services
MikoPBX in AWS Marketplace:
Let's get started with the setup
For quick and convenient navigation within the Amazon service, use the search panel
Open Services / Compute / EC2 and navigate to Images / AMI Catalog
In the open tab enter MikoPBX in the search bar
On the opened tab click Subscribe now
Click the Launch an instance from AMI button to create a virtual machine
Enter the virtual machine name, for example mikopbx-vm
If you have an SSH key
Specify the SSH key in the Key pair field
If you don't have an SSH key
Select Create new key pair and specify the key pair name, for example mikopbx_key
Follow the instructions further
To deploy the PBX use two disks:
A 1 Gb disk for the main system
A 50+ Gb disk for storing call recordings
If necessary, change the size of the storage disk in Configure storage, default size is 50Gb
Under Network settings, all required Firewall rules are configured automatically
For other fields use default values
Click Launch instance
Go to the created virtual machine mikopbx-vm
On the opened tab, select Connect / EC2 serial console, wait for the system to fully load until the authentication parameters are displayed
Copy the external address of the created virtual machine and enter it in the browser's address bar
Use the login and password provided in EC2 serial console for login
Make sure to configure the Firewall on the MikoPBX
Open the local / ISO images tab and select Download from URL
In the URL field, paste the link to the MikoPBX distribution file with the .iso extension
Click the Download button and wait for the file to finish downloading
Select Create VM
On the General tab, enter the name of the virtual machine, for example mikopbx-vm
Go to the OS tab, and in the ISO image field, select the previously downloaded image
Set the OS type to Linux
On the System tab, uncheck the Qemu Agent box, and use the default values for other fields
To deploy the PBX use two disks:
A 1 Gb disk for the main system
A 50+ Gb disk for storing call recordings
Go to the Disks tab
Adjust the size of the system disk to 1 GB
Click the Add button and add an additional disk for data storage
Specify a disk size of at least 50 GB
On the CPU and Memory tabs, specify the computing resources for the virtual machine based on the expected load on the PBX. For a test machine, you can set Cores (CPU tab) to 2 and Memory (Memory tab) to 2 GB
On the Network tab, uncheck the Firewall box
Go to the last tab, Confirm, and check the Start after created box
After entering the values, click the Finish button
Go to the created virtual machine mikopbx-vm
On the open tab, go to the Console section
If the boot is successful, a console menu will appear. Enter 8 from the keyboard to start the installation
Select the disk for the system and enter the disk name from the keyboard, for example sda. Confirm the selection by entering y from the keyboard
Connect the disk for storing call recordings, enter the disk name for connection from the keyboard, for example sdb
When the message "Press any key within 30 seconds to boot from LiveCD..." appears, do not press any buttons. In this case, the system will boot from the hard drive.
On the open tab in the Console section, copy the external address of the created virtual machine and enter it in the browser address bar
To log in, use the username - admin and password - admin
Tested on:
Intel NUC DCCP847DYE
Intel NUC D54250WUKH
Most modern PCs support booting from a USB device. MikoPBX can be run from a USB device.
Note! The minimum capacity of the USB drive is 600MB
The Bootable USB mode is designed for running the PBX from a USB drive (flash drive). Use the .img file for installation.
The Live USB mode is intended for system installation or recovery. Use the .iso file for installation.
To create a bootable USB drive, we recommend using the imageUSB application. You can download it . Alternatively, use .
Download and install the application.
Run ImageUSB
Perform the "Refresh drives" action. Select the USB drive, then select the image file. Perform the "Write" action.
Wait for the writing process to complete, then connect the USB drive to the PC. Restart the PC to boot from the drive.
Be careful when selecting the device for formatting. Changes are irreversible!
Open the Terminal application.
Connect the USB drive.
Run the following command:
Information about all connected drives will be displayed.
In this example, the name of the USB device is "/dev/disk3." Compare the output of the diskutil list
command before and after connecting the device.
Format the drive. You will need to enter the administrator password.
Unmount the device with the following command:
Write the image to the USB drive:
Wait for the writing process to complete, then connect the USB drive to the PC. Restart the PC to boot from the drive.
Installing MikoPBX in Google Cloud can be done in two ways: using an image from the Google Cloud Marketplace or from an image based on a file uploaded from the MikoPBX distribution. The first method provides quick and easy deployment of the standard version of MikoPBX, while the second is suitable for intermediate releases.
The simplest way to install MikoPBX is by deploying a ready-made image from the AWS Marketplace. If you wish to launch a custom version of MikoPBX, please refer to the detailed instructions where we describe step-by-step how to create an AMI image from any MikoPBX distribution.
First, log in to the Microsoft Azure portal
Let's proceed with the setup.
For quick and convenient searching on the Azure portal, use the search bar.
Open Menu / All services / General / Resource groups
In the Resource groups tab, select Create
Enter the group name, for example MikoPBX_group
Use default values for other fields
After entering the values, click the Review + create button, then the Create button
Open Menu / All services / Analyze and transform data / Storage accounts
In the Storage accounts tab, select Create
Specify the created resource group MikoPBX_group
Enter the storage account name, for example pbximgs
Use default values for other fields
After entering the values, click the Review + create button, then the Create button
Go to the card of the created storage account pbximgs
In the opened tab, go to the Data storage / Containers
Add a new container
Enter the container name, for example imgs
Click the Create button
Open the created container imgs
In the opened tab, select Upload
Select a file from the MikoPBX distribution with the .vhd extension
Click the Upload button
Open Menu / All services / Compute / Images
In the Images tab, select Create, let's create a new image based on the uploaded *.vhd file
Specify the resource group MikoPBX_group
Enter a unique name for the image, for example MikoPBX_Azure
Specify the OS type - Linux
Specify the generation of virtual machines - Gen 1
Select the blob storage object by clicking Browse, Browse / pbximgs / imgs / *.vhd
Specify the account type - Standard HDD
Use default values for other fields
After entering the values, click the Review + create button, then the Create button
Open Menu / All services / Compute / Virtual machines
In the Virtual machines tab, select Create / Azure virtual machine
Specify the resource group MikoPBX_group
Enter the virtual machine name, for example MikoPBX-vm
Choose the previously created image, See all images / Other items / My images / MikoPBX_Azure
Specify the machine size (combination of CPU / RAM to be at least 1GB / HDD parameters)
Specify the username for the administrator account
If you have an SSH key, do the following
Select the source of the SSH public key - Use existing public key
Specify it in the SSH public key field
If you do not have an SSH key, do the following
Select the source of the SSH public key - Generate new key pair
Specify the key pair name, for example mikopbx_key
Continue with the following instructions:
In the license type field, specify Other
Use default values for the other fields
To deploy the PBX use two disks:
A 1 Gb disk for the main system
A 50+ Gb disk for storing call recordings
Go to the Disks tab
Specify the OS disk type
Check the Delete with VM checkbox
Create a new data disk
Specify the disk size to be at least 50GB
Use default values for the other fields, click OK
After entering the values, click the Review + create button, then click Create
Open the virtual machine you created and go to Networking / Network settings / Rules
In the tab, choose Create inbound port rule
Specify the destination port ranges - 0 - 65535
Choose the protocol TCP
Specify a name, for example TCP
Use default values for the other fields
After entering the values, click the Add button
Similarly, create a rule for UDP. Specify the destination port ranges - 0 - 65535, protocol UDP, and name
Make sure to configure the Firewall on the MikoPBX
Open the virtual machine you created and go to the Connect section
In the drop-down menu under More ways to connect, select Serial console
Copy the external address of the created virtual machine and enter it in the browser's address bar
For login use the login and password provided in Serial console
Simultaneous Calls | Minimally Recommended Configuration |
---|---|
In the AWS Marketplace AMIs section select the image by clicking the Select button
5 - 10
1 GHz x86-64, 512 MB RAM
Up to 25
3 GHz x86-64, 1 GB RAM
Over 25
2 CPUs 3 GHz x86-64, 2 GB RAM or more
Before working with Docker, you need to install Docker and Docker Compose themselves. Here's how to do it:
Before creating the container on the host machine, it's necessary to create a user and group with limited permissions, as well as a folder for storing configuration settings and call recordings
Command to connect to the PBX console:
Command to connect to the PBX console menu:
Connecting to sngrep for SIP analysis
Setting Primary Phone Numbers
Configuring telegram as SIP softphone
Yealink T19
Yealink T21
Yealink T28
Snom D120
The "Extensions" section displays a list of internal user accounts for employees. On the left side of each employee, the status of the authorized device is displayed. If the device is successfully authorized under the respective internal user account, a green circle is shown; otherwise, it appears gray.
In the search bar, you can find the desired contact. You can search by the employee's name, internal number, mobile number, or email address.
The form also provides the ability to sort the list of employees by name, internal number, mobile number, or email address. There are buttons for copying the account password to the clipboard, editing the account, and deleting the account.
To add a new employee, simply click on the "Add new extension" button.
On the "Basic Parameters" tab, you can configure the general settings for an employee's internal account:
Username: This value will be used for name substitution and displayed in the corresponding field on the phone screen.
Internal Number: This is the employee's internal extension number, which is also used as the login when connecting the phone.
Mobile Number: It is used for additional routing purposes.
Email Address: It is used for email notifications.
Password for SIP
Please ensure that the passwords for SIP accounts meet the following requirements:
The password length should be greater than eight characters.
The password should contain both uppercase and lowercase letters. The password should include numbers and special characters: "-", "_", "[]", "{}", "@", ";".
By setting complex passwords, you can enhance the security of the user accounts and protect them from unauthorized access.
Accesses the Advanced drop-down list.
Redefining the set string
In the "Redefining the set string" field, enter the dialing rule for mobile numbers according to your provider's requirements.
If you want employees to have the ability to record conversations, you can enable the Сall recording feature.
The setting determines how DTMF (Dual Tone Multi-Frequency) signals are transmitted over the SIP protocol. DTMF signals are used, for example, when dialing phone numbers or interacting with IVR systems.
This setting allows you to specify the transport protocol used for this account. The transport protocol determines how data is transmitted over the network. The most common transport protocols used in SIP (Session Initiation Protocol) are UDP (User Datagram Protocol), TCP (Transmission Control Protocol), and TLS (Transport Layer Security)
The subnet described in the "Network Firewall" section specifies the allowed subnet for this account. It determines which IP addresses or networks are permitted to connect to this account. Connections originating from other subnets will result in authentication errors.
This field is used to modify/override the configuration files of Asterisk. You can override almost all parameters. For example, when using chan_pjsip, a SIP account for an employee is described by the following sections:
To override fields in the sections, you should fill in the "Additional Parameters" field as follows:
On this tab, you can set rules for call forwarding when the employee is unavailable, busy, or does not answer.
Set the time period in seconds during which the call will be directed to the employee's internal account. If the employee cannot answer the call within the specified time, indicate to which number the call should be forwarded. By default, the call will be redirected to the employee's mobile number.
You can also specify the numbers to which the call should be redirected in case of busy and unavailable status.
Feel free to configure these parameters according to your preferences and requirements.
To work with MikoPBX in a container, you need to install Docker and Docker Compose, as well as create a user and directories for storing configuration settings and call recordings according to the instructions
To launch the container with your application, use the following commands:
To ensure that your MikoPBX application is posted and working in the Docker container, you can follow these steps after launching it. These steps will help you verify the container's status and view its logs.
First, ensure that the container is successfully launched and running. To do this, use the command docker ps
, which will show a list of running containers and their statuses.
This command will display information about all active containers. Make sure that the mikopbx
container is present in the list and its status indicates that it is running (e.g., status up).
After confirming that the container is running, the next step is to view the logs to ensure that the application has loaded without errors and is functioning properly. The docker logs command will allow you to see the output generated by your application.
Check the command output for a message similar to the one below. This message indicates that MikoPBX is successfully loaded and ready for use:
If you see the MikoPBX startup process, wait a moment and re-run the command sudo docker logs mikopbx
When the container starts, it lacks information about the host system's address, so you need to open the external address of the host system, in this case, Ubuntu, in a web browser. https://<host machine IP>
Log into the web interface using the admin
login and the admin
password to make sure that the web interface is accessible and functioning correctly.
The NET_ADMIN flag is required for the proactive protection system fail2ban and the firewall iptables to function inside the container. When an access block is triggered, for example, by entering an incorrect password, access from the IP address of the attacker will be blocked.
If you need to use the "Backup Module", the container should be run with the –privileged flag. When MikoPBX is run in a container, backups can also be performed by manually archiving the cf and storage directories. In this case, the privileged mode is not necessary, but the container must be stopped during copying.
The –net=host flag indicates that NAT between the host and container will not be used. MikoPBX will be directly connected to the host machine's network. All ports that the container needs to occupy will also be occupied on the host machine. If any port on the host machine is unavailable, errors will occur when loading MikoPBX. More details in the Docker documentation...
If necessary, you can adjust the standard set of ports used by MikoPBX. This can be done by declaring environment variables when launching the container.
In addition to using our official registry, you might need to create a container from an image, for example, for a beta version. Our published releases and pre-releases include a tar archive, which we use to create a container.
Here is an example code for its use:
Below are some of the environment variables that will allow you to adjust the MikoPBX ports and settings used.
SSH_PORT - port for SSH (22)
WEB_PORT - port for the web interface via HTTP protocol (80)
WEB_HTTPS_PORT - port for the web interface via HTTPS protocol (443)
SIP_PORT - port for connecting a SIP client (5060)
TLS_PORT - port for connecting a SIP client with encryption (5061)
RTP_PORT_FROM - beginning of the RTP port range, voice transmission (10000)
RTP_PORT_TO - end of the RTP port range, voice transmission (10800)
IAX_PORT - port for connecting IAX clients (4569)
AMI_PORT - AMI port (5038)
AJAM_PORT - AJAM port used for connecting the telephony panel for 1C (8088)
AJAM_PORT_TLS - AJAM port used for connecting the telephony panel for 1C (8089)
BEANSTALK_PORT - port for the Beanstalkd queue server (4229)
REDIS_PORT - port for the Redis server (6379)
GNATS_PORT - port for the gnatsd server (4223)
ID_WWW_USER - identifier for www-user (can be set with the expression
$(id -u www-user)
, where www-user is NOT a root user)
ID_WWW_GROUP - group identifier for www-user (can be set with the expression
$(id -g www-user)
, where www-user is NOT a root group)
WEB_ADMIN_LOGIN - login for Web interface access
WEB_ADMIN_PASSWORD - password for Web interface access
A full list of all possible setting parameters is available in the source code here.
To work with MikoPBX in a container, you need to install Docker and Docker Compose following the instructions
Here is an example of a docker-compose.yml
file that can be used to manage your MikoPBX container via Docker Compose:
Save the contents into a file named docker-compose.yml
, make the necessary adjustments, and launch MikoPBX using the command:
It is also possible to organize the launch of multiple MikoPBX containers on a single host. However, you need to consider Docker's port handling features. If the –net=host mode is not used, it will lead to a high load on the host system's CPU because Docker creates a separate rule in Iptables for each allocated port.
With the –net=host mode enabled, you need to manually monitor the distribution of available ports between the running containers and built-in applications. For instance, to run two MikoPBX containers on one host, you can use the following configuration file:
Save the contents into a file named docker-compose.yml
, make the necessary adjustments, and launch MikoPBX using the command:
There is an option to launch MikoPBX containers in the –net=bridge mode. However, as mentioned above, to use this mode you either need to significantly limit the range of RTP ports or open them on the host machine without using Docker's capabilities.
For this, you will need to write a small script to determine the name of the current bridge interface and the IP address of each container. After running Docker Compose, you will then need to add the necessary iptables rules for the RTP port range as follows:
Let's describe several containers in the docker-compose.yaml file, specify different ports for the web interface, SIP ports, and ranges of RTP ports to ensure they do not overlap.
Creating a directory for scripts
Save the start-multiple-mikopbx.sh and docker-compose.yaml files into this folder.
Install the necessary dependencies for the script.
Navigate to our folder, add execution rights and launch our script.
While waiting for the containers to start, check the firewall settings on the host, and if necessary, open the ports specified in our docker-compose.yaml file, specifically:
TCP/UDP ports 5060 and 6060 for SIP
UDP ranges 10000-10800 and 20000-20800 for RTP voice transmission
TCP ports 8443 and 9443 for HTTPS protocol, for web interface operation.
Access each station in turn at the addresses:
https://<host machine IP>:8443
https://<host machine IP>:9443
To access the web interface of the first MikoPBX, use the login admin
and the password mikopbx-first-password
To access the web interface of the second MikoPBX, use the login admin
and the password mikopbx-second-password
Each machine should have NAT mode enabled, indicating that the container is behind a router in the network interface settings. If the stations will be used within a local network, then in the external IP field, enter the local IP address of the host machine, otherwise its public IP address.
Important note! One of our containers uses port forwarding from SIP port changing its value from 5060 to 6060. In this case, for the system to function correctly, you need to add the external value of the SIP port in the NAT settings in the network interfaces section of MikoPBX. This setting can also be made by setting the corresponding value of the environment variable EXTERNAL_SIP_PORT=6060 in the docker-compose file.
With that, the setup is complete, and you can configure accounts and make calls.
Below are some of the environment variables that will allow you to adjust the MikoPBX ports and settings used.
SSH_PORT - port for SSH (22)
WEB_PORT - port for the web interface via HTTP protocol (80)
WEB_HTTPS_PORT - port for the web interface via HTTPS protocol (443)
SIP_PORT - port for connecting a SIP client (5060)
TLS_PORT - port for connecting a SIP client with encryption (5061)
RTP_PORT_FROM - beginning of the RTP port range, voice transmission (10000)
RTP_PORT_TO - end of the RTP port range, voice transmission (10800)
IAX_PORT - port for connecting IAX clients (4569)
AMI_PORT - AMI port (5038)
AJAM_PORT - AJAM port used for connecting the telephony panel for 1C (8088)
AJAM_PORT_TLS - AJAM port used for connecting the telephony panel for 1C (8089)
BEANSTALK_PORT - port for the Beanstalkd queue server (4229)
REDIS_PORT - port for the Redis server (6379)
GNATS_PORT - port for the gnatsd server (4223)
ID_WWW_USER - identifier for www-user (can be set with the expression
$(id -u www-user)
, where www-user is NOT a root user)
ID_WWW_GROUP - group identifier for www-user (can be set with the expression
$(id -g www-user)
, where www-user is NOT a root group)
WEB_ADMIN_LOGIN - login for Web interface access
WEB_ADMIN_PASSWORD - password for Web interface access
A full list of all possible setting parameters is available in the source code here.
The "Host system" must run on Linux 5+. Tested on Debian 11, Ubuntu 21.04, and Ubuntu Server 22.04 LTS.
MikoPBX can be run in Docker using two main methods. The first method involves running the container directly using a Docker command with the necessary parameters. The second method involves using Docker Compose, which simplifies managing multi-container applications and allows the entire configuration to be described in a yaml file, making the deployment and maintenance of the system more convenient.
Log in to the platform at https://console.cloud.google.com/
MikoPBX on Google Cloud Marketplace: https://console.cloud.google.com/marketplace/product/mikopbx-public/mikopbx
Let's start with the setup
For quick and easy search on the Google Cloud platform, use the search bar
If you have a service account, check if it has the necessary roles, and add them if needed
If you do not have a service account, create one and add the necessary roles
Open the Navigation menu / Products & solutions / Management / IAM & Admin
Go to the Service accounts tab and click on CREATE SERVICE ACCOUNT
Enter a name for the service account, for example mikopbx-service-account
Click the CREATE AND CONTINUE button
Add the roles Cloud Infrastructure Manager Agent, Compute Admin, Compute Network Admin, Service Account User
Click the DONE button
Open the Marketplace and enter MikoPBX in the search bar
Select the MikoPBX image
On the opened tab select LAUNCH
In the Deployment name field, enter a name, for example mikopbx-vm
In the Deployment Service Account section, check the Existing account option and select the previously created service account
To deploy the PBX, use two disks:
A 1 GB disk for the main system
A 50+ GB disk for storing call recordings
If necessary, change the size of the data storage disk in the Data Storage section. By default, its size is 50 GB
Under Networking, all required Firewall rules are configured automatically
For other fields, use the default values
After entering the values, click the DEPLOY button
Open the Compute Engine tab and go to the Virtual machines / VM Instance section
Go to the created virtual machine mikopbx-vm-mikopbx-vm
On the opened tab, go to Logs / Serial port 1 (console)
Copy the external address of the created virtual machine and enter it in the browser address bar
Use the login and password provided in Serial port 1 (console) to log in
Authorize on the platform https://console.cloud.google.com/
Let's start configuring
For quick and convenient navigation on the Google Cloud platform, use the search pane
Open Navigation menu / Products & solutions / Storage / Cloud Storage
On the Cloud Storage tab select Create
Enter the storage name, for example miko-images
Use default values for other fields
After entering the values, click the Create button
Open the created miko-images storage
On the opened tab select UPLOAD FILES
Upload the file from the MikoPBX distribution with the .vhd extension
Wait for the file upload to complete
Open Navigation menu / APIs & Services / Library / Google Enterprise API / Cloud Build API
On the opened tab select ENABLE
Check the roles for the Cloud Build service account:
Open the IAM page https://console.cloud.google.com/projectselector2/iam-admin/iam.
Select your Google Cloud project
Check the Include Google-provided role grants checkbox
In the table, find the row with the email address ending with @cloudbuild.gserviceaccount.com
Select Edit principal
The roles to be granted to the Cloud Build service account are Compute Admin and Service Account User
If the required roles are not present, add them and click SAVE
Open Navigation menu / APIs & Services / Library / Google Enterprise API / Compute Engine API
On the opened tab select ENABLE
Open Navigation menu / Products & solutions / Compute / Compute Engine
Go to the Storage / Images section
Select CREATE IMAGE to create a new image
Enter the image name, for example mikopbx-new-image
Specify the source type - Virtual disk (VMDK, VHD)
Select Virtual disk file under the BROWSE link, Browse / miko-images / .vhd
Uncheck the Install guest packages checkbox
In the Operating system on virtual disk field specify - No operating system. Data only.
Use default values for other fields
After entering the values, click the Create button and wait for the image creation to complete
In the Compute Engine tab go to the Virtual machines / VM Instance section
Select CREATE INSTANCE
Enter the virtual machine name, for example mikopbx-vm
In the Machine configuration / General purpose table select Series - N1
In the Machine type section choose Shared-core / f1-micro from the dropdown menu
To deploy the PBX use two disks:
A 1 Gb disk for the main system
A 50+ Gb disk for storing call recordings
In the Boot disk section select CHANGE
On the opened tab go to CUSTOM IMAGES
In the Image field select the previously created mikopbx-new-image
Use default values for other fields on the tab
Click the SELECT button
In the Advanced options / Disks section select ADD NEW DISK
On the opened tab enter the disk name for data storage, for example disk-storage-mikopbx
Specify the disk size of at least 50GB
Use default values for other fields on the tab
Click the SAVE button
If you have an SSH key, proceed as follows:
In the Advanced options / Security / MANAGE ACCESS section, select ADD ITEM
Specify it in the SSH key field
If you don't have an SSH key, proceed directly to step 18
Use default values for other fields
After entering the values, click the CREATE button
Open Navigation menu / VPC network / Firewall
Select CREATE FIREWALL RULE to create a new rule for incoming connections
Enter the name of the new rule, for example internal-allow
Specify Direction of traffic - Ingress
Specify Targets
From the Source filter dropdown menu select IPV4 ranges and in the Source IPv4 ranges field enter 0.0.0.0/0
In the Protocols and ports section check the TCP (Ports - 0-65535) and UDP (Ports - 0-65535) checkboxes
Use default values for other fields
After entering the values, click the CREATE button
Make sure to configure the Firewall on the MikoPBX
Open the Compute Engine tab and go to the Virtual machines / VM Instance section
Go to the created virtual machine mikopbx-vm
On the opened tab navigate to Logs / Serial port 1 (console)
Copy the external address of the created virtual machine and enter it in the browser's address bar
For login use the login and password provided in Serial port 1 (console)
Авторизуйтесь на платформе https://console.cloud.google.com/
Приступим к настройке
Для быстрого и удобного поиска на платформе Google Cloud используйте панель поиска
Откройте Navigation menu / Products & solutions / Storage / Cloud Storage
На вкладке Cloud Storage выберите Create
Введите имя хранилища, например miko-images
Для других полей используйте значения по умолчанию
Завершив ввод значений, нажмите кнопку Create
Откройте созданное хранилище miko-images
На открывшейся вкладке выберите UPLOAD FILES
Загрузите файл из дистрибутива MikoPBX с расширением .vhd
Дождитесь окончания загрузки файла
Откройте Navigation menu / APIs & Services / Library / Google Enterprise API / Cloud Build API
На открывшейся вкладке выберите ENABLE
Проверьте роли учетной записи службы Cloud Build, для этого
Откройте страницу IAM https://console.cloud.google.com/projectselector2/iam-admin/iam
Выберите свой проект Google Cloud
Установите флажок Include Google-provided role grants
В таблице найдите строку с адресом электронной почты, заканчивающимся на @cloudbuild.gserviceaccount.com
Выберите Править (Edit principal)
Роли, которые должны быть предоставлены учетной записи службы Cloud Build, - Сompute Admin и Service Account User
Если нужных ролей нет, добавьте и нажмите SAVE
Откройте Navigation menu / APIs & Services / Library / Google Enterprise API / Compute Engine API
На открывшейся вкладке выберите ENABLE
Откройте Navigation menu / Products & solutions / Compute / Compute Engine
Перейдите в раздел Storage / Images
Выберите CREATE IMAGE для создания нового образа
Введите имя образа (Name), например mikopbx-new-image
Укажите тип источника (Source) - Virtual disk (VMDK, VHD)
Выберите Virtual disk file по ссылке BROWSE, *Browse / miko-images / .vhd
Уберите флажок Install guest packages
В поле Operating system on virtual disk укажите - No operating system. Data only.
Для других полей используйте значения по умолчанию
Завершив ввод значений, нажмите кнопку Create и дождитесь окончания создания образа
Во вкладке Compute Engine перейдите в раздел Virtual machines / VM Instance
Выберите CREATE INSTANCE
Введите имя виртуальной машины (Name), например mikopbx-vm
В таблице Machine configuration / General purpose ****выберите ****Series - N1
В разделе Machine type в выпадающем меню выберите Shared-core / f1-micro
В разделе Boot disk выберите CHANGE
На открытой вкладке перейдите к CUSTOM IMAGES
В поле Image выберите созданный ранее образ mikopbx-new-image
Для других полей на вкладке используйте значения по умолчанию
Нажмите кнопку SELECT
В разделе Firewall ****разрешите HTTP трафик, установите флажок Allow HTTP traffic
В разделе Advanced options / Disks выберите ADD NEW DISK
На открытой вкладке введите имя диска для хранения данных (Name), например disk-storage-mikopbx
Укажите размер диска (Size) не менее 50Гб
Для других полей на вкладке используйте значения по умолчанию
Нажмите кнопку SAVE
Если у вас есть ключ SSH, выполните следующее
В разделе Advanced options / Security / MANAGE ACCESS выберите ADD ITEM
Укажите его в поле SSH key
Если у вас есть нет ключа SSH, сразу перейдите к пункту 19
Для других полей используйте значения по умолчанию
Завершив ввод значений, нажмите кнопку CREATE
Откройте Navigation menu / VPC network / Firewall
Выберите CREATE FIREWALL RULE для создания нового правила для входящего соединения
Введите имя нового правила (Name), например http-80
Укажите Direction of traffic - Ingress
Укажите Targets
Из выпадающего меню в поле Source filter выберите IPV4 ranges и в поле Source IPv4 ranges укажите 0.0.0.0/0
В разделе Protocols and ports установите флажок TCP и в поле Ports укажите 80
Для других полей используйте значения по умолчанию
Завершив ввод значений, нажмите кнопку CREATE
Аналогично создайте правило для HTTPS. Укажите имя, Direction of traffic - Ingress, Targets, Source filter - IPV4 ranges, Source IPv4 ranges - 0.0.0.0/0, Protocols and ports - TCP, Ports - 443
Аналогично создайте правило для SIP сигнализации TCP. Укажите имя, Direction of traffic - Ingress, Targets, Source filter - IPV4 ranges, Source IPv4 ranges - 0.0.0.0/0, Protocols and ports - TCP, Ports - 5060
Аналогично создайте правило для SIP сигнализации UDP. Укажите имя, Direction of traffic - Ingress, Targets, Source filter - IPV4 ranges, Source IPv4 ranges - 0.0.0.0/0, Protocols and ports - UDP, Ports - 5060
Аналогично создайте правило для передачи звука RTP. Укажите имя, Direction of traffic - Ingress, Targets, Source filter - IPV4 ranges, Source IPv4 ranges - 0.0.0.0/0, Protocols and ports - UDP, Ports - 10000-10200
Откройте вкладку Compute Engine перейдите в раздел Virtual machines / VM Instance
Скопируйте External IP созданной виртуальной машины
Введите в строке браузера External IP
Откройте созданную виртуальную машину
Скопируйте Instance Id - это пароль для входа в АТС по умолчанию
Логин для входа по умолчанию - admin
An IVR menu includes options for routing incoming calls using an interactive voice menu. It allows callers to navigate through a series of menu prompts using their telephone keypad or voice input. The IVR menu typically provides various choices or options for callers to select based on their needs or preferences. Each option in the menu can be associated with a specific action or routing destination, such as transferring the call to a particular department, providing self-service options, or connecting the caller to a specific extension or queue. The IVR menu enhances the caller's experience by offering a self-service mechanism and streamlining call routing based on their selections.
Before creating an IVR menu, it is necessary to upload audio files that will be played to callers when they contact your company. The audio files can be added in the "Telephony" -> "Sound files"
Choose your music file using "Upload a new file"
Additionally, there is the option to record a file using a microphone if you connect to the MikoPBX over HTTPS.
Go to Telephony → IVR menu.
Press "Add New IVR Menu."
Set the name, number, and, if necessary, a comment for the IVR menu. Select the audio file that you uploaded in the previous step.
Configure Actions when you extend. In the first column, specify the extension number, and in the second column, set the addressing rule.
Set the number of retries before transferring to the default number.
Set the timeout for entering an extension number (value in seconds) after which the voice greeting will be repeated.
The Default extension is required in case the client does not enter an extension number (for example, due to technical limitations).
Enable the "Allow Dialing of any extension" toggle switch if needed.
Enter the IVR menu number that can be dialed to reach that specific IVR menu.
Press "Save."
The principle of operation of an IVR (Interactive Voice Response) is as follows:
When calling the IVR menu number, the Voice Greeting audio file starts playing.
During the playback of the voice menu, the caller can enter an extension number. The "Allow Dialing Any Internal Number" flag determines if callers can dial any internal number, including queues, IVRs, or internal extensions.
After the voice menu is played, there is a waiting period of the "Input Extension Timeout" for entering an extension number.
The total time allowed for entering the extension number is calculated as the sum of the audio file duration and the input extension timeout.
If the total time for entering the extension number expires, a repeat voice announcement occurs, and there is another waiting period within the timeout for the next IVR attempt.
If the user enters an incorrect number or does not enter any number at all, a repeat voice announcement occurs, and there is another waiting period within the timeout for the next IVR attempt.
The maximum number of attempts is set by the "Number of Retries" parameter before transferring to the default number.
Once the number of attempts exceeds the specified value, the call is redirected to the default number.
Supported file format mp3 and wav
Audio files in MikoPBX are used in various call scenarios and interactive voice menus (In IVR menu, during non-working hours, in call queues, for various system notifications, and in hold music.) to play voice greetings or notify customers.
The list of available sound files is displayed in the Telephony -> Sound files.
To add a new sound file, click "Add a new sound file".
Click "Upload a new file" and select a sound file.
Correct the file name if necessary.
Сохраните изменения.
When working over the https protocol, it is possible to record an audio file using a microphone.
Sound files are stored on the PBX along the path /storage/usbdisk1/mikopbx/media/custom
The function is available starting from version 2020.2.XXX
If a client gets into a queue during a call or is waiting for redirection, the PBX plays a melody for him. It is possible to download your own tunes for listening while waiting.
You can do this on the Music on Hold tab as described above.
Queues allow you to:
Distribute phone calls among a group of employees (agents): You can create a call queue and add multiple employees to it. When a call comes in, the system automatically routes it to an available employee in the queue, ensuring a more even distribution of workload and increasing call handling efficiency.
Hold the customer on the line when all employees are busy: If all employees in the queue are occupied with other calls, the customer will be placed on hold until one of the employees becomes available. This helps avoid call abandonment and ensures better customer service.
Notify the customer of their position in the queue and approximate wait time: While the customer is in the queue, the system can provide information about their current position in the queue and an estimated wait time. This helps keep the customer informed and improves their waiting experience.
Display the queue name along with the customer's number on the employee's phone: When an employee answers a call from the queue, their phone displays not only the customer's number but also the name of the corresponding queue. This helps the employee handle calls more effectively and provide personalized service.
To configure call queues in MikoPBX, go to the "Telephony" section and select "Call Queue." Here, you can create and customize your queues according to your business requirements and customer service needs.
The default call duration for a queue is set to 300 seconds (5 minutes). After this time limit is reached, the call will be automatically terminated. To bypass this limitation, you can configure "Scenario 1" as described in the instructions for "Call Routing on Failures".
To add a new queue, perform the "Add a new call queue" action
In the queue creation form or dialog, you will find the following fields:
Queue Name: Enter a name for the queue. This name will be used for reference when setting up call routing rules.
Note: Provide a brief description or note about the queue. This information will be visible in the queue list, allowing you to provide additional details or instructions.
In the Queue Operators section, you can add an arbitrary number of employees (queue agents) and specify a call distribution strategy.
Here are the options for queue strategy:
Ring All: Calls are distributed to all available agents until someone answers the call (default behavior).
Least Recent: The call is routed to the agent who has been idle for the longest time within the queue.
Fewest Calls: The call is routed to the agent who has handled the fewest number of calls within the queue.
Random: A random available agent within the queue is selected to receive the call.
Round Robin: The call is distributed to each agent in a sequential manner, cycling through the list of agents.
Memory Hunt: The system remembers the last agent who answered a call and starts the distribution from that agent onwards.
When setting up a queue, you can choose one of these strategies to determine how calls are distributed among the agents in the queue. The strategy you select will depend on your specific call handling requirements and the desired distribution behavior
In this section, you can provide additional information:
Phone number for this queue - you can call the queue using this number from any internal employee extension. Calls can also be transferred to this number.
Short name for the queue - for display before the CallerID on the telephone device of the subscriber, for example, "consult."
Time attempt call to agents - the duration in seconds for which a call will ring on an individual agent's phone. After this time elapses, the call to the agent will be logged as a missed call in the call history. Once the ring time is over, the call will be routed to the next available agent based on the selected strategy.
The rest time of the agent after the processing of the call, before starting to accept new calls - the duration in seconds that is counted from the moment an agent finishes a call from the queue until they are ready to receive new calls. This period allows agents to update notes, complete necessary tasks, or take a short break before being assigned another call.
Receive New Calls During A Call - this toggle switch enables or disables the ability to receive new calls while the agent is already on a call. When enabled, agents can handle multiple calls simultaneously.
What the caller hears while waiting - During the wait for their call to be answered, the caller can hear either hold music or a ringing tone.
Background Music (MOH) - You can specify a unique audio file to be played to the caller during the wait, such as promotional materials.
Notify about current queue position - If all operators (queue agents) are occupied, enabling this toggle switch allows you to notify the caller about their position in the queue. If the Additional Audio Announcement option is activated, this announcement will supplement the information about the position.
Notify about estimated hold time - If all operators (queue agents) are occupied, enabling this toggle switch allows you to inform the caller about the approximate wait time for a call to be answered. If the Additional Audio Announcement option is activated, this announcement will supplement the information about the estimated wait time.
Additional notification - A sound message is played only if all participants in the queue are occupied.
Time in seconds to repeat all alerts periodically - Describes the interval at which to announce the queue position, wait time, and announcement.
The script #1 - In this scenario, you can configure the maximum allowable wait time for a client in the queue. If none of the queue agents can answer the client within the specified time, you can set a number to which the call will be redirected.
The script #2 - If there are no agents available in the queue (meaning no agents are currently logged into the phone system), you can specify a number to which the client's call will be transferred.
In these scenarios, as a redirection number, you can choose not only an internal extension but also options such as a conference, queue, IVR (Interactive Voice Response), or a special number within the dial plan application. These options provide flexibility in directing the call to different destinations based on your specific requirements or business needs.
The default call duration for the queue is set to 300 seconds (5 minutes). If you require a longer interval, you can specify a higher duration in Scenario 1 and provide a backup number to redirect the call to. This allows you to customize the wait time and ensure that if none of the queue agents can answer the call within the specified duration, it will be redirected to the designated backup number.
Here you can find information about Call Detail Rescords (CDR)
Call History provides a log of all incoming, outgoing, and internal calls. It is located under Telephony -> Call History.
The Call History feature in MikoPBX enables users to:
Display all calls;
Filter calls based on criteria;
Visually identify missed calls from the call log;
Download or listen to call recordings.
Each entry in the call log contains information about:
The caller’s phone number (Who);
The recipient’s phone number (To Whom);
The date and time of the call (Call Date);
The duration of the call (Duration) – this excludes time spent on greetings or announcements.
Calls marked in red are missed calls. Their duration is logged as zero, and these calls cannot be played back:
For answered calls, users can listen to or download the recording. Call recordings are downloaded locally to your PC in .mp3 format.
Each call log entry provides detailed information about the participants involved.
To apply a filter, press Enter after entering the search criteria.
The search bar in the Call History page supports the following filters:
Phone Number Filter
You can search using either an internal staff number or an external client number.
Two Phone Numbers Filter
Enter two phone numbers separated by a space. For example, entering "74952293042 302" will display all answered calls between these numbers. Answered calls are those with a duration greater than 0 seconds, excluding greeting time.
Date Filter
When opening the Call History, the log defaults to the current date. To filter for a specific period, select the date range and click Apply.
Conference calling is used for conducting group discussions, meetings, or negotiations in cases where participants are unable to meet in person. It is also used when a particular matter needs to be discussed with multiple participants simultaneously.
The list of conference rooms is located in the Telephony -> Conferences section.
To create a new conference room, click the "Add conference".
You must specify the name of the conference and its internal number, by calling which you can enter this conference
To prevent unauthorized access to the conference by employees for whom the discussion is not intended, you can secure the conference room with a password. To do this, fill in the "Conference Pin" field. Only digits can be entered in this field, with a minimum requirement of at least one digit.
In this case, to join the conference, employees will need to enter the PIN code after dialing the conference PIN.
Communication is conducted solely through voice (no other means of information transmission besides speech are provided).
All participants can speak and hear each other simultaneously, ensuring duplex communication.
Participants use telephones (hardware or software) for communication.
Each participant dials the conference number. The first participant hears hold music until at least one more participant joins the conference. An employee can transfer their caller into the conference by using specific key combinations on their phone. Transfers can be made to both internal and external numbers. The key combination for transfers is set in the System -> General Settings -> Call Transfers section.
Example: An employee dials the combination **1111 (the combination for unconditional transfer), and their caller joins the conference as its first participant. The call is completed for the transferring employee, and to join the conference, they dial the conference number 1111.
The maximum number of conference participants is not limited.
In this section, rules for operating the station during non-working hours, holidays, and weekends are described. During non-working days, typically no employees are available to answer calls, so a voice notification is played to the caller requesting them to call back during regular business hours.
To add a new rule, click on the "Add Time Interval" button.
A form for creating a new rule will open.
In the form, you will find the following fields:
Period: The calendar period when employees are absent from the office, such as during New Year's or May holidays.
Weekdays: Specific weekdays for which the rule will be applied.
Time Range: The time period during the day when employees are absent.
Incoming Call Action: You can choose to play a sound file or perform a call transfer. Call transfer options include transferring the call to a conference, IVR menu, queue, internal employee extension, or specific termination numbers.
In the Note field, you can add a note with a description of the created rule, so that you can quickly navigate through the essence of this rule using this description. With the eraser button, you can clear the fields opposite which this button is located.
By activating this function, a new menu "Route restrictions" will appear on top of you
Here you can choose which specific routes the rule you are creating will apply to.
This rule is used for calls during non-working hours from Monday to Friday, specifically from 7:00 PM to 9:00 AM
This rule is used to handle calls on Saturdays and Sundays.
This guide explains how to connect, configure, and manage modules in MikoPBX. It also covers how to install applications using the built-in Marketplace.
Additional modules allow you to expand the functionality of the main system. In this guide, you will find information on managing modules and installing applications using the built-in Marketplace.
To use both paid and free modules, you need to register your copy of MikoPBX and obtain a free license key. Instructions on how to do this can be found .
Detailed instructions for configuring and operating each module can be found .
You can find the Module Management section under "Modules" -> "Marketplace of modules".
All installed modules are listed under the tab of the same name:
You can upload your own module using the "Upload New Module" button. You need to upload .zip
files. After uploading, the module will appear in the list under the "Installed Modules" tab.
You can also access the settings of any module for further configuration:
Additionally, you can enable or disable a module.
From the interface of an installed module, you can quickly access its documentation by clicking on the question mark to the right of the module's short description:
You can add any module to the sidebar menu for quick access, which can be useful if you need constant access to the module's settings to change parameters or its status.
To do this, follow these instructions:
Go to the settings of the module you want to add to the sidebar menu by clicking on the edit icon to the right of the module's version:
Click on the settings icon to the right of the module's status to access the display settings for the module in the sidebar menu:
In this section, you can:
Toggle the display of the module in the sidebar menu—"Show module in sidebar menu".
Choose the section where it will be displayed—in the example, the "Modules" section is selected.
Specify a custom name for the module if desired.
After completing the settings, click "Save".
In this section, you can install modules from MIKO as well as from partner developers.
Each module has a button for downloading and installing it. Basic information about the module with a short description is also displayed here.
To the left of the module's name, you can find an icon indicating whether it is paid or free. For example, in the image above, the "Access Control Management" module is paid, while the "Backup&Recovery module" module is free.
You can access a module's detailed page by clicking on its name in the Marketplace interface.
Here you can find the version of the current release, information about the developer, and whether the module is paid or free. There are also three sections:
Module Description
This section contains images illustrating the module's functionality and settings. Additionally, there is a basic description of the module and a "Useful Links" section with a link to detailed documentation on configuring and operating the module.
Version History
In this section, you can find the module's version history with detailed descriptions of changes, as well as the minimum compatible version of MikoPBX for proper operation. You can also install a specific version of the module by clicking on the blue link under its description.
If you purchase a module, you will receive a coupon. To activate it, go to Modules -> Marketplace of modules:
Then navigate to the "License Management" section.
In the "Activate Coupon" field, enter your coupon code and click "Activate Coupon"
The protection key always starts with MIKO-. Coupons for modifying product composition always start with MIKOUPD-.
Description of the registration process
Registering in the MikoPBX Module Marketplace is not required for the system’s basic functionality. You can fully utilize MikoPBX for handling calls without registration or installing additional modules. However, we recommend registering in the marketplace to expand your system’s capabilities.
Registration gives you access to additional modules and extensions. These include both free modules (moved out of the core system for easier initial setup) and paid modules from us and third-party developers. If you are a developer, you can contact us at [email protected] to get instructions on creating and adding your module to the Marketplace.
MikoPBX is a free solution and does not require registration. The absence of a license does not impact call functionality. You can register or cancel your Marketplace registration anytime.
To begin the registration process, navigate to "Modules" -> "Marketplace of modules":
If you are not registered in the Marketplace, the section will look as follows:
One license key is issued per company. If your company uses multiple MikoPBX instances, a single registration is sufficient.
To start the registration process, click the Register in Marketplace button:
The license key stores all your licenses for MikoPBX products. If you already have a key, you can enter it in the corresponding field. If you've forgotten your key, search your email inbox for messages from [email protected]
If you don’t have a key, you can generate a new one by completing the registration form:
Organization Name – Enter your company/organization name.
Contact Email – Enter your organization’s email address.
Contact Person – Enter the name of the contact person.
Contact Phone (optional) – Provide a contact number.
Unique Company Identifier (e.g., Tax ID, VAT) (optional).
Click Register.
Upon successful registration, you will see the following screen:
A notification confirming the system's registration.
The license key field will display a blurred value by default. Hover over it to view or copy the key.
To manage your license, go to Marketplace -> License Management and click the corresponding option:
Enter your license key in the Enter your license key or activated coupon field and click Login:
You will access a system with nine sections:
Go to the Session monitor section:
In the Info column, click the i button for each binding to view detailed host information.
In the Action column, use the Drop button to unbind the license from the current host.
If you encounter issues during registration, check for internet access to the MikoPBX server. Ensure connectivity to lic.miko.ru and lic.mikopbx.com over port 443 (HTTPS). Verify firewall settings and network permissions.
MikoPBX periodically connects to licensing servers to verify installed modules. If a module license becomes unavailable, the module will be disabled, and a strikethrough key icon will appear next to its name.
To make or receive external phone calls over the public switched telephone network or the Internet, you must create at least one provider account. Each technology has its own account type. To add a new account or modify an existing one, go to Routing -> Telephony Providers.
The provider overview contains a list of all available service providers. A green icon next to the provider's name indicates that MikoPBX has registered this provider, and you can start using this provider. You can enable or disable the use of the provider using the switch on the left.
To connect a new provider account, click Connect SIP or Connect IAX depending on the type of account you are connecting.
In the general settings of the SIP provider, specify the following settings:
Provider Name - an arbitrary name that is convenient for you. It will be displayed in the selection lists in the corresponding menus.
Account Type - the type of registration for the provider account.
Provider host URL or IP Address - can be either a URL or an IP address.
Username and Password provided by your provider.
DTMF Mode - determines how DTMF signals are transmitted over SIP. There are different standards used to transmit DTMF to SIP providers. Try using different standards to find the mode that suits you.
inband sends keypresses as "tones." To use this standard, you need a high-quality audio codec.
Auto, rfc, and info transmit keypresses through SIP encoding.
In this section, list all communication service provider addresses from which incoming calls can arrive. Access to these addresses for SIP and RTP ports will be automatically opened on the firewall.
By default, it is set to 5060. The SIP protocol describes how a client application (e.g., a softphone) can request the initiation of a connection from another, possibly physically remote client in the same network using its unique name. The protocol defines how clients agree on opening exchange channels based on other protocols that can be used for direct information transmission (e.g., RTP).
Allows you to specify the transport protocol used for this provider account.
This is the provider's SIP proxy server for processing requests. The actual SIP server may differ from this address. The outbound proxy takes on primary requests and forwards them to the appropriate server.
When this option is enabled, Asterisk will send SIP OPTIONS packets. This is necessary to support NAT tunneling on your router.
Specify the frequency with which Asterisk will send OPTIONS-type SIP messages to check if this device is working and available for making calls.
If this device does not respond within the specified period (default is 60 seconds), Asterisk considers it turned off and unavailable for making calls.
You can disable the use of the fromuser field of the SIP packet header.
The fromuser and fromdomain parameters in the pjsip.conf file are used for outgoing calls from Asterisk to the SIP device.
You can override:
the username in the From field in SIP packets (fromuser).
the domain name in the From field in SIP packets (fromdomain).
The fields User and Domain serve this purpose.
In this field, you can modify Asterisk configuration files.
You can override almost all parameters. For example, when using chan_pjsip, the provider is described with the following sections:
To override fields in sections, fill in the Additional Parameters field as follows:
To complete the configuration, click Save Settings.
There are cases when you need to connect multiple accounts from one communication service provider. In this case, the settings Host or IP Address and SIP Connection Port may be the same for all accounts.
Asterisk handles this situation differently. The PBX will not be able to correctly route the call to the desired provider, and the call will be dropped.
As a solution, in older versions of the PBX, you could describe additional inbound routes for which you would fill in the Additional Number (DID) field with the Username value for each account of the provider. This required creating N number of additional routes, equal to the number of provider accounts.
The Username field, in most cases, will be used as the destination number Additional Number (DID) for incoming calls. Considering that outgoing routes for all Usernames will be configured, the call will be correctly processed by the PBX.
This option is used when connecting most providers.
Registration is necessary when the provider cannot know from which IP address the client will connect. For example, when the PBX is behind NAT. The provider's server is usually on a public IP address.
This option is relevant for the operation of some FXO / GSM gateways when an external device must connect to your PBX using a login and password.
This option is also relevant when the remote device is behind NAT, and MikoPBX cannot know its IP address.
Relevant for secure private networks. For example, Rostelecom often lays its network cable and connects the client to its local network.
In this case, the PBX and the provider must be in the same network.
In this section, you need to create rules and templates for distributing outgoing calls for providers connected to the PBX.
You can create an unlimited number of outbound routing rules.
You can create several rules for one provider.
To add a new outgoing routing rule, click the Add a new rule button.
The name of the rule can be set arbitrarily.
In a note, you can describe the call route that you want to implement; this can help you in debugging in the future.
The example in the picture above means the following: if the dialed number starts with "345" or "375" and the rest of the number consists of 10 digits.
If the dialed number matches the rules of several routes, then the call will be made in the order of the route descriptions, one by one, until the call is answered, or until there are no more suitable routes.
Convert number - this setting is intended to remove the number prefix and replace it with the desired prefix.
In the example given, digits are not cut off at the beginning of the number and digits are not added.
Select from the list the provider for which you configured outgoing routing and save the changes.
For example, the number +74952293042 should be converted to the number 84952293042.
The implementation of the rule looks like this:
For example, the numbers 84952293042 and 74952293042 should be converted to +74952293042.
The implementation of the rule looks like this:
For example, the numbers 4952293042 and 4996382584 should be converted to 84952293042 and 84996382584 respectively.
The implementation of the rule looks like this:
For example, the numbers 84952293042 and 74996382584 should be converted to 2293042 and 6382584 respectively.
The implementation of the rule looks like this:
In this section, you need to create rules and templates for distributing incoming calls for providers created in MikoPBX. The rules for incoming calls describe the route of a call from the moment it arrives at the PBX to the moment it is completed. You can create an unlimited number of inbound routing rules. You can create several rules for one provider.
Rules are listed in order of priority. If no one answers the incoming call within the time interval specified in the rule, the call will be routed to the next priority rule. Rules can be moved up and down in the list, that is, their priority can be changed by dragging them by the arrows.
If the call is not answered according to any of the rules, the Default incoming route is used.
The following actions are available and can be specified as the default rule:
Play busy signal - the client will play a busy signal and the incoming call will be ended;
Hang up;
Redirect the call - the call can be transferred to a number that you can select in the field located to the right of the action. You can select an IVR menu, call queue, conference, or employee extension number as the number for transfer.
For one provider, you can describe several incoming routes.
First, the call goes along the upper route. If the client does not get through, then the call goes according to the lower rule (lower priority). If the client does not get through via the second route, then the call goes through the default route.
To add a new incoming routing rule, click the Add a new rule button.
In the Note field, describe the route you want to implement. In the future, this will help you debug the call circuit.
Select the Provider for which you are creating a new incoming call distribution template.
The additional DID number is the number the client called you on. This field is optional and should be completed if you need to route calls more accurately.
At the next step, you need to indicate to which phone number the incoming call from the client will be sent. The telephone number can be IVR menu numbers, call queues, conferences, or employee internal numbers.
Specify the time during which the call will be sent to the phone number you specified.
If after the specified time interval no one answers the incoming call, the call will be routed to the next priority rule.
This article contains step-by-step instructions for updating MikoPBX to a newer version.
Before updating, be sure to back up your PBX settings using the .
Below is an example of a PBX installed on a VirtualBOX virtual machine, updated from version 2023.1.223 to version 2023.2.206. Download the iso image of the required PBX version from the .
In VirtualBOX, open the settings of the virtual machine where the PBX is installed. Go to the Storage section. Select the virtual optical drive. Click the icon in the Attributes group, and click Choose Disk File. Select the downloaded PBX iso image. Start the machine.
The console will display the line "The system loaded in Recovery mode".
Select Install / Repair (or press the number 8 on the keyboard) and press Enter.
You need the command "Update to version ****.*.**". Press the number 2 on the keyboard, then press Enter. The update installation will begin. When it is complete, the PBX will reboot.
After the PBX reboots, the message "The system loaded in Recovery mode" will no longer appear, indicating that the PBX has booted from the hard disk and not from the virtual optical drive. The installed update version will be displayed in green at the top.
Contains 3 tabs: Show log, System information, Capturing network packets.
This section allows you to view log files for detailed analysis of PBX operations.
To start, select a file.
Set the lines for the number of lines to fetch.
Set the offset value to shift the selection.
Set the filter by entering a string to be included in the selection.
The following options are available:
Suppose you need to analyze an outgoing call to the number 74952293042.
Select the log file asterisk/verbose.
Set the phone number 74952293042 as the filter.
Set the limit to a sufficient value, such as 2000, to ensure all log entries are included.
In the last line of the log selection, find the identifier:
In this example, the ID = C-0000000f.
Repeat the log query but use the filter C-0000000f this time.
You will receive the entire log of the dialplan process.
The obtained data can be sent to technical support for further assistance.
The tab displays the following information:
Network settings
CPU load
RAM usage
iptables settings
This section allows you to perform a detailed analysis of errors in PBX operation.
You can start capturing network packets passing through the network interface.
To start the process, press the Start button.
Reproduce your issue: make a call or perform an action that causes the error or failure.
Press the Stop and Download button.
The network packets will automatically be saved in the archive MikoPBXLogs_log-tcpdump-XXXXXXXXXX. They should also automatically save in your browser's Downloads folder.
You can use the search function in WinSCP by entering "log-tcpdump*" in the file name field and specifying the search directory as "/storage"
You can download all system logs accumulated on the PBX. To do this, click the Download All System Logs button.
The system logs will automatically be saved in the archive MikoPBXLogs_log-sys-XXXXXXXXXX.zip. The logs should also automatically save in your browser's Downloads folder. You can also obtain this log archive from the /storage/usbdisk1/mikopbx/tmp directory by connecting to the PBX using WinSCP. The file will be log-sys-XXXXXXXXXX.zip.
Be careful! If there are many calls or heavy network "load" on the PBX, logs can take up a significant amount of disk space.
Other ways to collect logs:
This section allows you to manage modules: connecting them, configuring them, and uploading your own custom modules. Documentation on developing your own modules can be found .
Each paid module has a trial period of 2 weeks. During this period, you can try the module's functionality and decide whether to purchase it. To purchase a module, write to
If you move MikoPBX to another host or restore it from a backup, you will need to reset license bindings in the .
You will be redirected to the :
Instructions for connecting to the most popular service providers can be found in our .
An alternative is the instruction. This approach was not very intuitive.
Additional examples of configuring outgoing routing are available in the section.
Set a template for outgoing calls. Read more about number templates in the .
Set a template for outgoing calls. Read more about number templates in the .
The number starts with | The rest of the number consists of the specified number of digits | Examples of numbers |
---|
Additional examples of configuring incoming routing are available in the section.
Download the selected log as a file
Refresh the log
Auto-refresh the log
If you cannot find the archive in the Downloads folder, you can and download it from the /storage/usbdisk1/mikopbx/tmp directory - the file will be log-tcpdump-XXXXXXXXXX.zip.
Using an
Using the
Using the
[7-8]{1} | 10 | 79257184255, 84952293042 |
7925 | leave the field blank | 79257184255, 7925, 7925718… |
7ХХ | 0 | 700, 701, 702… |
74952293042 | 0 | 74952293042 |
74(95|99) | 7 | 74952293042, 74996382584… |
(7|8)0{1} | 1 | 700, 701, 802, 803… |
(25|26) | 0 | 25, 26 |
[0-9]{1} | 0 | digit from 0 to 9, occurrence once |
[1-5]{2} | 0 | 12, 15, 14, 25 digit from 1 to 5, occurrence twice |
[8-9]+ | 0 | 8899, 888, 988888 digit from 8 to 9, occurrence one or more times |
To update the MikoPBX container to the latest version, you can follow these steps in the command line. These steps include stopping the current container, downloading the new version of the image, and running the container with the updated image.
First, you need to properly stop the running container. After stopping the container, you can safely remove it
To launch a new container using the latest image version with the same settings as before, use the following commands:
First, you need to properly stop the running container. After stopping the container, you can safely remove it
The next step is to download the latest MikoPBX image:
An example of the docker-compose.yml
file that can be used to update your MikoPBX container through Docker Compose:
Save the contents to a file named docker-compose.yml
, make the necessary adjustments, and run the command:
Data: Since data is stored in Docker volumes (mikopbx_cf
and mikopbx_storage
), it remains untouched during the update, preserving settings and user data.
Environment Variables: Ensure that all necessary environment variables are correctly passed.
Safety: Always create backups of your data before updating.
These steps will help ensure a smooth and safe update of your MikoPBX container.
This section configures the main system parameters. It is recommended to set these parameters immediately after installing the PBX.
The name of the PBX - will be displayed on the MikoPBX home page.
Additional Description - visible only to system administrators.
PBX sound messages language - specify the language for voice notifications.
Maximum lenght of extension - maximum length of the internal number (for employees).
Maximum Timeout Between Digits When Entering Extension.
Allow incoming calls from any servers
The PBX is restarted every night - restart Asterisk every night.
Send developers information about crashes - when an error occurs, its description will be sent to the developers (requires internet access).
Call Recording - enables/disables call recording.
Recording internal conversations - enables/disables internal call recording.
Save recordings in stereo changes the recording mode from mono to stereo. The recording stream will be split into incoming and outgoing channels and merged into a stereo file.
There is a slider that allows you to choose how long call recordings will be stored.
You can also select an audio file for call recording notifications.
Phone calls are saved in mp3 format. Here is an example of the final call recording file information:
Approximately, 1 hour of conversation takes up 14MB of disk space.
Call parking is a variant of "holding" a customer on the line. It is useful when you need to temporarily disconnect to clarify information. During parking, the customer will hear music.
MikoPBX supports two methods of parking customer calls:
To park a customer call, enter *2. The customer's call will be put on hold by MikoPBX, and you will be informed of the parked call slot number. Any employee can pick up the call by dialing the parked call slot number from their phone.
In the Call Transfers section, assign a Car Park Number. When the customer's call is transferred to the parking number, MikoPBX will park the call, and you will be informed of the parked call slot number. Any employee can pick up the call by dialing the parked call slot number.
You can set the range of parked call slot numbers in the Call Transfers section: Start Parking Slot and End Parking Slot.
MikoPBX offers two types of transfers: Attended and Unattended (blind).
With an attended transfer, you can speak to the person before transferring the call. The caller will be on hold during this time. Once the person handling the transfer hangs up, the transfer is completed successfully.
An unattended transfer occurs when you transfer the call without first speaking to your colleague. For example, when you receive a second incoming call while already on the phone, you can transfer the new call to a colleague without interrupting your current call.
By default, the combination for an attended transfer is two pound signs (##).
By default, the combination for an unattended transfer is two asterisks (**).
The return time for a call if there is no answer after an unattended (blind) transfer is 45 seconds.
If your colleague's phone is ringing, you can intercept the call by dialing *8. If you don't know your colleague's number, simply dial *8.
Session Initiation Protocol (SIP) is the signaling protocol used by most VoIP phones. You can change the SIP port (default is port 5060) to enhance security. Additionally, some SIP providers require additional parameters, such as Registration Periods (the time before the registration expires). Some firewalls close ports after a period of inactivity, which may require shortening the SIP provider's registration timeout. Another reason might be the need for different registration timeouts for certain SIP providers. The default values are:
SIPMiniExpiry - minimum registration duration in seconds, default is 60 seconds.
SIPMaxExpiry - maximum registration duration in seconds, default is 3600 seconds.
In real-time, the Transport Protocol (RTP) defines the standard format for transmitting audio and video over IP networks. By default, RTP uses port ranges between 10000 and 10200. Some routers and firewalls may require the port range to be adjusted. Another reason to adjust the port range is the number of simultaneous calls. Each call uses two RTP ports. This means if there are 200 ports, only 100 simultaneous calls are possible. If your phone system needs to handle more calls at once, you should expand the port range.
STUN Server Address - helps with PBX operation behind NAT, especially when using WebRTC.
Use WebRTC - additional settings will be configured for WebRTC connections. For example, for extension 201, an additional endpoint will be created, accessible via WebRTC using the URL
sip:201-WS@IP_PBX
Configuration of allowed codecs for the PBX.
Asterisk Manager Interface (AMI) is a powerful and convenient API for Asterisk, allowing external programs to control the system. AMI allows external programs to connect to Asterisk via the TCP protocol, execute commands, read results, and receive notifications of real-time events. AMI is often used for integration with business processes and CRM (Customer Relationship Management) systems. AMI listens for connections on a network port (default TCP port 5038). Once a client program connects and authenticates, Asterisk responds to requests and sends notifications about changes in subsystem states.
Asynchronous Javascript Asterisk Manager (AJAM) is a new technology that allows web browsers or other HTTP-capable applications to directly interact with the Asterisk Manager (AMI) interface via HTTP/HTTPS. By default, port 8088 is used.
SSH or Secure Shell is an encrypted protocol commonly used for interacting with and remotely managing servers. The SSH server can authenticate users using various algorithms. The most popular method is password authentication. It's simple but not very secure. Passwords are transmitted over a secure channel, but they may not be strong enough to resist brute-force attempts. The computing power of modern systems, combined with special scripts, makes brute-forcing very easy.
Default SSH client authorization in MikoPBX:
Login - root
Password - admin (we recommend changing this immediately)
A more secure and reliable authentication method is SSH keys. Each key pair consists of a public and private key. The private key is stored on the client side and should not be accessible to anyone else. If the private key is leaked, the attacker will be able to log in to the server unless additional password authentication is set up.
We highly recommend disabling password authentication. To do this, enable the "Disable password authorization" option.
The public key is used to encrypt messages, which can only be decrypted with the private key. This property is used for authentication with key pairs. The public key is uploaded to the remote server where access is needed. It should be added to the special file ~/.ssh/authorized_keys
.
When the client tries to authenticate with this key, the server sends a message encrypted with the public key. If the client can decrypt it and return the correct response, authentication is successful.
How to create an SSH key for authorization and add it to the server? Read more here.
You can save the public SSH key on the PBX in the SSH Authorized Keys field. If you have multiple public keys, you can paste them one after the other, separated by a blank line.
In this subsection, you can increase security by changing the HTTP port (default is port 80) or activating HTTPS mode.
HTTPS (HyperText Transfer Protocol Secure) is an extension of HTTP that supports encryption for enhanced security. HTTPS data is transmitted over cryptographic protocols such as SSL or TLS. Unlike HTTP, which uses TCP port 80, HTTPS uses TCP port 443 by default.
Redirect to HTTPS - when attempting to open the web interface via HTTP, the user will be redirected to HTTPS.
When the system starts, the PBX generates its own certificate for HTTPS operation - this is a "self-signed" certificate, not verified by a public "registrar," but it still allows HTTPS operation and encrypts traffic between the PBX and the browser. You can use Let's encrypt module.
In this subsection, you need to change the WEB interface Login and Password.
Default MikoPBX authorization:
Login - admin
Password - admin
The system shutdown/reboot menu can be found in MikoPBX by clicking on "Reboot" in the "Maintenance" section
When you open the page, a list of active calls to the PBX will be displayed. The start date of the call is displayed, from whom and to whom the call
Restart the PBX - the command starts restarting the station.
Turn off PBX - completes all processes and disconnects the station.
As long as there are active calls, the reboot and shutdown will not be available via the web interface.
You can restart the station via the console menu. To do this, select the section "[3] Reboot the system"
If you want to restart the station: press "[1] Reboot MikoPBX"
If you want to turn off the station: press "[2] Shutdown"
The system will reboot.
In case of an emergency restart of the PBX (for example, power outage), it may be necessary to check the disk for errors.
In the PBX console menu, enter the command "[9] Console(Shell)" and press Enter
System launch the Miko PBX console
Enter the command reboot
Press Enter.
The system will reboot with a disk check.
In this subsection, you can configure the clock and calendar settings.
You need to set the time zone correctly to ensure accurate system time display. If the time zone is not set, notifications and call history will be recorded with incorrect timestamps.
To configure the time zone, go to the "System" section and select "Time Settings":
There is an option to set the time "manually" without using an NTP server. However, whenever possible, we recommend using automatic time synchronization.
To manually set the time, toggle the switch "Adjust the time manually."
"In MikoPBX, all local subnets can be configured in the 'Network and Firewall' → 'Network Firewall' section. The network firewall is designed to restrict access to the station based on traffic type and subnets."
To add a new rule, you need to click on the button:
You can give the rule any custom name. To the right of the subnet address, there is a field for Subnet Mask in CIDR format.
SIP&RTP - registration of phones and voice traffic. Session Initiation Protocol is used for establishing connections between VoIP phones.
WEB - access to the administrative interface for configuring the PBX. SSH - root access to the system.
SSH (Secure Shell) allows accessing the MikoPBX console.
AMI - access to Asterisk Manager API via telnet. Asterisk Manager Interface (AMI) provides access to Asterisk via TCP/IP protocol.
AJAM - access to Asterisk Manager API via HTTP or HTTPS.
ICMP - communication check using the 'ping' command.
CTICLIENT - connection of the telephony panel 2 for 1C.
Each subnet has a flag 'Is it a VPN or a local network'. When this flag is set, MikoPBX will present itself as a local IP to all local subnets instead of external ones.
The flag 'Never block addresses from this network' should be enabled only for trusted subnets. If this flag is enabled, intrusion prevention rules will not apply to this subnet
In some sections of the interface (e.g., Extensions), the current version of MikoPBX is displayed in the lower right corner.
In the PBX web interface, go to Maintenance → PBX update.
If there are newer versions of the PBX available, they will be displayed in the Online updates available table, with the version number in the first field and the list of changes in the second.
We recommend performing updates sequentially without skipping releases.
There are two update options: online update and update using a downloaded img file.
Be cautious! If the system is installed on the same disk where call recordings are stored, there may be difficulties with the update. See forum
A warning window will appear. Click Upgrade.
The PBX will download and apply the updates, and then reboot.
Please note that this method can also be used to roll back to a previous version.
The img file will start downloading. Wait for the download to complete.
Then click Apply the update, and in the warning window, click Upgrade.
The updates will be applied, and the PBX will reboot upon completion.
The hostname is the name of the machine. If no value is specified, the default hostname used is 'mikopbx.local'.
There are two ways to configure the IP address:
DHCP (Dynamic Host Configuration Protocol) can be used for automatic IP address configuration. Enable the 'Use DHCP to obtain network settings' switch. This is recommended for most users. To not rely on DHCP server settings (to provide a specific address), you can disable the switch.
If you do not want to use settings obtained from a DHCP server, you can configure the network manually. This requires some knowledge about the network topology. To the right of the IP address, there is a field for Subnet Mask in CIDR format. You should use the alternative format: /8 corresponds to the subnet mask 255.0.0.0, /16 corresponds to 255.255.0.0, and /24 corresponds to 255.255.255.0.
'VLAN ID' - MikoPBX supports virtual network interfaces. This is relevant only for physical PCs. Sometimes a PC may have only one network interface, and it may not be possible to connect a second one physically. Using VLAN, you can create a virtual interface that works 'on top' of the physical one. One of the advantages of using VLAN is that all phone calls can be routed through it, while the network equipment can 'tag' all VLAN traffic and guarantee a stable connection.
The number of network interfaces in MikoPBX is not limited.
The 'Network interface with internet access' is the primary network interface through which access to external addresses (non-local) will be established.
If no DNS server address is specified, the default server 8.8.8.8 will be used.
Depending on your network topology, you need to perform the following steps to configure MikoPBX. The PBX can be behind a network router, which is the most common scenario, or it can have a public IP.
If the PBX is behind a router, you need to check the 'This station is located behind a NAT router' option.
If you know the external address of the station (IP or domain name) and have forwarded the ports of the PBX to the external world, it is recommended to fill in the fields 'External IP address of your router' or 'External hostname of your router'.
For all addresses that are not local to the PBX, the station will be represented by the external address:
If 'External IP address of your router' is empty and 'External hostname of your router' is filled, the PBX will be represented by the hostname (External hostname) field.
The external IP address is mandatory to fill in. If a domain name is specified, it takes priority, and the external IP address field is not used.
When enabling the option 'This station is located behind a NAT router,' it is mandatory to specify the external address or hostname of the router. Additionally, you need to perform port forwarding on the router for SIP port 5060 and RTP ports 10000-10200 to the local address of the PBX.
If your provider allows registration and you do not need to connect external subscribers, you can choose not to enable the option 'This station is located behind a NAT router,' even if the PBX is behind a NAT router.
Go to the 'System' → 'System file customization' section.
Open the file '/etc/static-routes' for editing.
Select the 'To replace all' mode and insert the rule. For example, 'route add -net 54.246.198.136 netmask 255.255.255.255 gw 172.16.32.15 dev eth0'
We specify to the operating system that the specified IP address 54.246.198.136 can be found through the network interface 'eth0' and the request should be directed to the gateway (172.16.32.15).
The netmask '255.255.255.255' indicates that the rule will only be applicable to the address 54.246.198.136. If you need to create a rule for a group of addresses, for example, the entire subnet 54.246.198.0: In fact, it is the range of addresses from 54.246.198.1 to 54.246.198.254.
Click 'Save settings'.
When working with telecom service providers, issues may occasionally arise. For example, the provider's server might become unresponsive or unavailable. This article provides a mechanism for notifying the system administrator via email.
To enable notifications, you will need to configure the SMTP client. See instructions in the section "Mail and Notifications".
Create a new "Dialplan Application".
Enter a name (e.g., Blacklist), a short number for the application (e.g., 99), and select "Code Type" - "PHP AGI Script".
Go to the "Program Code" tab:
Insert the following code:
Save the changes and copy the dialplan application identifier from the browser's address bar. It will look like "DIALPLAN-APP-CF967EE0".
Go to System → Customizing System Files and open the file /var/spool/cron/crontabs/root for editing.
Select the mode "Append to the end of the file", and in the black editing field at the bottom, insert the following code:
Adjust the file name according to your dialplan application identifier "DIALPLAN-APP-CF967EE0
Save the changes.
You're done!
Asterisk Manager Interface (AMI) is a powerful and convenient Asterisk programming interface (API) for managing the system from external programs. Thanks to the AMI, external programs can connect to Asterisk via the TCP protocol, initiate the execution of commands, read the result of their execution, as well as receive notifications about events in real time.
AMI is often used for integration with business processes and systems, CRM software (Customer Relationship Management - customer interaction management). Asterisk is often managed from the CLI console, but using AMI does not require direct access to the server running Asterisk. AMI is the simplest tool, which in the hands of a developer can be a very powerful and flexible tool for integration with other software products. It enables developers to use the information generated by Asterisk in real time.
The first thing to do is to enable the AMI and create a user with which the client program will authenticate. "System" - "Asterisk Manager Interface"
To add a new account, you must specify a Username and Password. In addition, it is necessary to set a Network filter, i.e. from which subnet the connection to the AMI user is allowed. You can allow connections from any addresses, or specify a specific network that you have configured in the Network and Firewall → Network Firewall.
AMI user rights set in the [user] section of the configuration file /etc/asterisk/manager.conf
The system file customization section can be found under System -> System file customization:
This section allows for customization of system and Asterisk configuration files. We recommend using this section only for experienced Asterisk administrators. MikoPBX provides the ability to modify the following configuration files via the web interface:
You will be presented with the configuration file editing form:
Choose one of four editing options:
"Not change" - prevents modifications, read-only mode.
"Add to end of file" - appends content to the end of the selected configuration file (recommended).
"To replace all" - your changes will completely overwrite the configuration file.
"Script" mode in MikoPBX system file customization allows administrators to add custom scripts or commands directly into the configuration files. This mode is ideal for advanced users who need to execute specific actions, automate tasks, or modify system behavior dynamically, enhancing the flexibility of the PBX configuration. It should be used with caution to avoid system disruptions.
In some cases, more complex modifications to system files are required than simply adding text to the end of a configuration file. For instance, you may need to redistribute PJSIP account parameters while retaining the ability to configure the system through the web interface.
We've introduced a new approach to customization, where you can describe a Bash script that will execute each time the system generates a configuration file. This way, integrators can make precise changes to configuration files without developing additional modules.
For example, you can modify the pjsip.conf file and change the max_contacts parameter for all internal numbers, except one.
You can add parameters to an existing section using the (+) syntax:
Modify the dialplan with caution – there is a high chance of disrupting the PBX!
It is possible to intercept the execution of the dialplan by defining custom contexts. Currently, you can intercept executions in the following contexts:
internal-originate-custom - used for calls originating from the telephony panel for 1C.
<PROVIDER-ID>-incoming-custom - used for handling incoming calls from the provider.
<PROVIDER-ID>-outgoing-custom - used for handling outgoing calls via the provider.
all_peers-custom - used for direct outgoing calls from a phone.
outgoing-custom - used when dialing an external number, before selecting an outbound route.
add-trim-prefix-clid-custom - used for handling incoming calls, best suited for normalizing incoming phone numbers by adding/removing a prefix.
internal-users-custom - used for handling calls to internal extensions.
public-direct-dial-custom - used for handling incoming calls without authentication.
Example context:
Make sure to call the method "return" at the end.
Some examples of using custom contexts:
Configuring outbound AOH for an employee
Always use "Application Passwords" for authorization. See instructions. Instructions for setting up smtp from Gmail
To receive notifications about missed calls by email, you need to configure the SMTP client. Detailed information about notifications in MikoPBX is reviewed here. As part of this instruction, an example of setting up missed call notifications for the Gmail mail service will be considered.
Enter the IP address of the MikoPBX PBX in the browser and go to System → Mail Settings
SMTP Client Settings for Gmail service:
SMPT host - smtp.gmail.com
SMPT port - 465 (Customer Service port)
SMPT login and Sender address- the E-mail from which messages about missed calls will be sent
SMPT Password - the email password required for authorization
Encryption Method - Use TLS
Save the entered settings and proceed to setting up your email account. A feature of the Gmail service is that access to your account is automatically denied to untrusted applications, which include MikoPBX, so you need to manually allow access to these applications (setup instructions are posted here).
Go back to System → Mail Settings. We will send a test letter to the e-mail of any service. In case of successful testing, a test email will be sent to the email address you specified.
You can read about how to set up a letter template to create an E-mail notification here.
To receive notifications about missed calls and voicemail messages by email, you need to configure the SMTP client. SMTP (Simple Mail Transfer Protocol) is used to send e-mail over the Internet. SMTP clients interact with an SMTP server that sends email.
SMTP host - address of the mail server
SMTP port - the port of the mail server
SMTP login, SMTP password - authorization parameters
Sender's address - Emails will be sent on behalf of this address Email of the system administrator - all system notifications will be sent to this email address, for example, about the lack of disk space. When changing and saving the settings, a test email will be sent to this address
Use TLS - activates the use of encryption when connecting to the server, to connect via SSL, you need to add a protocol description to the server address
Validate server certificate - in some cases it is necessary to disable it when using self-signed certificates
Use mail motifications - allows you to enable/disable all email alerts, including voice mail
If the server supports a secure connection only over SSL, then you can explicitly specify the protocol in the "SMTP host" field, for example
Setting up notifications for mail services:
Email for missed notifications - by default, missed notifications are sent to the email specified in the employee card. If the call cannot be matched with an employee or email is not specified, the call will be sent to this "shared" address
The subject, text, and footer of the letter may contain parameters in the form of PARAMETER_NAME
List of available "parameters":
NOTIFICATION_MISSEDCAUSE - currently always takes the value "NOANSWER", i.e. a missed call
NOTIFICATION_CALLERID - who was the call from
NOTIFICATION_TO - who was the call to
NOTIFICATION_DURATION - duration in seconds
NOTIFICATION_DATE - date of the call
It is possible to set up an address and a template for a voicemail notification:
Voice mail will be sent to each employee who missed the call (if the email is specified in his card).
Voicemail will always be sent to the "Email address to receive all voice mail records"
It is possible to listen to the voicemail recording from the PBX call history
The following "parameters" can be used in the subject, body and footer of the email:
VM_DATE - date and time
VM_CALLERID - caller's callerid, consists of name and num, example "Alex Magnet" <101>
VM_DUR - message duration
VM_CALLER_NAME - caller's name (taken from VM_CALLERID)
VM_CALLER_NUM - caller's phone number (taken from VM_CALLERID)
To specify a parameter, you need to use a construction of the form PARAMETER_NAME.
Click Save to complete the setup.
Go to "General Settings" -> "Delete all system settings"
In the input field, paste the text "delete everything", click "Save settings"
Open the MikoPBX console menu. Use the keyboard to enter 9 to go to the PBX console.
Enter two commands sequentially:
After executing these commands, MikoPBX will reboot. The login to the web interface takes place with the login (admin) and password (admin) by default.
Some virtual machines allow you to increase the disk size
Be sure to back up your data before you work!
To execute the following commands, you will need to .
The data storage disk is usually mounted in the "/storage/usbdisk1" directory. From the example above, it can be seen that 4.5G of 4.9G is currently available.
Before starting work, you should unmount the disk. To do this, run the script:
Make sure that the data storage disk is no longer mounted:
First, delete the existing partition. This operation does NOT delete data on the disk, just edits the partition table.
Launching the Section Editor:
The system will prompt you to enter a command, enter "d" and press Enter:
Система запросит выбрать раздел к удалению, он один, вводим номер раздела «1» и жмем Enter:
Сохраняем таблицу разделов, вводим команду «w» и жмем Enter:
Launching the Section Editor:
The system will prompt you to enter a command, enter "n" and press Enter:
Next, specify the command "p", the section will be primary, press Enter:
Enter the number of the created section "1", press Enter:
Next, the system will ask you to enter the numbers of the first and last sector "First sector" / "Last sector", wait for Enter, do not enter anything and agree with the "default" values.
The size of the partition must match the size of the disk.
Run the verification command:
Example of the result of the team's work:
Run the command:
Example of command output:
When booting, the system will automatically mount a disk for data storage:
Perform a Backup of your current MikoPBX following .
Install MikoPBX on the new server. Follow the steps in this .
Upload the previously created MikoPBX backup to the new server following .
If the data size is large, it's practical to save the backup directly on the target machine. Here's the process:
Install MikoPBX on the new machine.
On the original MikoPBX, set up .
Ensure the connection is via SFTP.
Username and password should be those used for .
Set the Path on the server to "/storage/usbdisk1/mikopbx/backup/".
Wait for the backup to complete.
Shut down the original machine.
On the target machine, perform a .
Manual data migration script.
When a new is added to the PBX, a SIP account with a numeric internal number is created on the PBX. In some cases, for security reasons, it is necessary to change the name for authorization of this employee.
When configuring SIP Clients, you can often see two key parameters:
Username - usually equal to the account ID, in the case of MikoPBX equal to the internal number
Auth name - username for authorization. In the case of MikoPBX is equal to the internal number
To change the authorization name:
Open the employee's account for editing
Go to "Advanced Settings" → "Advanced SIP Settings"
Add the following lines:
Instead of MIKO204, specify a name for authorization, it is advisable to use both letters and numbers
When publishing a PBX on a public IP address, the task arises to protect the speaker from scanners, pests who are trying to pick up passwords to SIP PBX accounts. If a simple numeric password is set, it will be picked up very quickly, which will cause losses.
For basic protection against scanners, fail2ban must be enabled. Additionally, you can fine-tune the iptables rules.
Go to the "System file customization" section
Go to edit the /etc/firewall_additional file
Set the "Add to end of file" mode, insert the following code:
The added rule allows blocking all incoming requests over the UDP protocol that contain the substring "friendly-scanner"
A more complete example of a set of rules:
This will protect you from most scanners that I mention User-Agent when requesting.
Updates are downloaded to the PBX and applied immediately. To update this way, click the button for the desired version.
To update using this method, click the button for the desired version.
Then click the button and select the downloaded img file.
rights ID | reading | writing |
---|---|---|
To edit a configuration file, use the button:
System
Reading general information about the system, for example, configuration restart notifications
Allows the user to execute Asterisk control system commands such as Restart, Reload, or Shutdown. This permission also gives users the ability to run system commands outside of Asterisk. Granting such permission is equivalent to granting access to the command shell, with the rights of the user/group under which the Asterisk process is running
Call
Reading an event about channels in the system
Allows the user to set information on channels
Log
Provides the user with access to reading logs
Read only
Verbose
Provides the user with access to reading detailed logs
Read only
Agent
Reading agent status events from app_queue and chan_agent modules
Allows the user to perform actions to manage and retrieve the status of queues and agents
User
Access to user events as well as Jabber/XMPP user events
Allows the user to execute the UserEvent command to create custom events
Config
For recording only
Allows the user to receive, update, and overload configuration files
Command
For recording only
Allows the user to execute Asterisk CLI commands from AMI
DTMF
Allows the user to receive DTMF events
Read only
Reporting
Access to call quality events such as jitterbuffer or RTCP
Allows the user to perform a number of actions to obtain statistics and information about the status of the entire system
Cdr
Reading data write events in CDR
Read only
Dialplan
Reading events for setting dialplan variables, creating extents
Read only
Originate
For recording only
Allowing the user to execute the Originate command, which sends a request to create a new call
Sngrep is a command-line tool for capturing and analyzing SIP traffic. It allows you to visualize SIP sessions, filter them, and track issues in voice connections.
Use this application to analyze logs and send them to technical support.
To start working with the application, follow the SSH connection to the PBX guide.
To start the application, use the command:
If multiple network interfaces are used, specify the interface ID when launching the application:
The -r key allows capturing audio traffic.
You can view the list of interfaces using the following command:
Example of Sngrep Interface:
The application window displays a list of all SIP dialogues:
Use the ⇑ and ⇓ arrows to navigate between dialogues.
Press Enter to view detailed information about a dialogue.
In the detailed view, you can examine specific SIP packets by selecting them with ⇑ and ⇓.
Press Enter to view the contents of a SIP packet.
Press ESC to return to the previous window.
Use the Space key to select multiple SIP dialogues and press Enter to view them in one window.
In the detailed view, use the Space key to select two SIP packets for comparison.
Use the Space key to select the SIP dialogue "Call" of interest.
Press F2 to open the save dump dialogue:
Use the ⇑ and ⇓ arrows to navigate between form fields.
Enter the path and file name.
Select the save action and press ENTER.
Download the file using SSH connection to the PBX with WinSCP.
Press F7 to open the filter dialogue:
Use the ⇑ and ⇓ arrows to navigate between form fields.
Use the Space key to select SIP methods for analysis.
Select the Filter action and press ENTER.
In the development of MikoPBX, we strive to make features as simple as possible so that even a beginner can quickly start using the system.
However, some issues can significantly complicate life for an unprepared user. One of these issues is poor call quality, such as one-way audio. In this article, I'll outline an approach to analyzing audio problems.
This is likely the first thing to check. MikoPBX allows you to connect a wide variety of SIP / IAX devices (endpoints), such as:
Hardware SIP phone
Analog phone (via a SIP gateway)
Provider account, where the "endpoint" could be either physical hardware or an application (such as Asterisk)
Devices attempt to "negotiate" a session by exchanging information about supported codecs (media formats), such as gsm / ulaw / alaw, etc.
If the devices cannot find a common codec, the call will likely drop, and the logs will show an error indicating that no compatible codec was found.
In MikoPBX, codecs are configured in the "General Settings" - "Audio/Video Codecs" section (see wiki). The most common codec in Russia is alaw. For working with webRTC, you should enable the opus codec.
Incorrectly configured network settings are the most common problem.
Typical Example
At a company, there may be several local subnets:
172.16.32.0/24 - Office
172.16.33.0/24 - VPN
172.16.34.0/24 - Other
There is an external IP address 109.61.231.230. Employees need to connect to the PBX from the following subnets:
Office
VPN
Directly from the internet (LTE) for mobile employees
For external employees to connect, you will need:
A public, static IP address - purchased from the internet service provider.
In the network interface settings, specify the external PBX address (see wiki).
Map the external SIP and RTP ports on the router (see wiki) to the corresponding PBX ports (one-to-one). For example, if the PBX uses SIP port 5060 and RTP ports from 10000 to 20000, these ports should be opened on the router as well.
In the firewall, all local subnets must be specified. Be sure to check the box "This is a local subnet or VPN...". If this box is not checked, the PBX will treat the subnet as external, and SIP messages will use the external PBX address instead of the internal one, causing audio issues.
In PBX versions 2021.4.1+, you can specify a STUN server, which helps correctly determine the external address. From my experience, this is useful for webRTC clients:
Symptoms of incorrect configuration:
One-way audio
No audio in both directions
Inability to make calls
Calls not completing
"SIP ALG" is a Network Address Translation (NAT) helper feature found in most modern routers.
When the router receives a SIP packet with an INVITE, it modifies the IP address in the packet, which can cause communication problems.
If you're not sure how to configure it properly, disable SIP ALG on your router.
There are several problems that can be harder to detect at first glance. In practice, I have encountered the following:
Disk failure for storing data - This can cause improper PBX operation, leading to poor call quality.
Unreliable internet connection - A damaged network cable (surprisingly common) or overloaded network with torrent downloads, etc.
Hardware issues
Here's an example of network traffic analysis for a problematic call:
In the image, you can see "red-yellow dots". These represent "dropped packets" that will not be played back to the client. In this case, increasing the Jitter Buffer value to 800 stabilized the audio and eliminated stuttering.
Although the client "received" all the packets, due to significant delays, they were not played back. This specific problem was related to the use of the Proxmox virtualization system and was resolved by switching the client to a physical server.
When experiencing call quality issues, check the NAT settings.
Ensure that all devices support the selected codecs.
Capture traffic logs and send them to your provider for analysis.
File Name
Description
asterisk.conf
General (global) settings of Asterisk. In the asterisk.conf configuration file, you define the following: - The location, permissions, and owner of the socket used to connect the remote management console to the server. The location of various directories used by the Asterisk server to determine where configuration files, libraries, scripts, and logs will be created. Default command-line parameters for starting the server.
cel.conf
Channel Event Logging. Unlike CDR, it logs all events that occur in the channel.
extensions.conf
The Asterisk dialplan. It defines how incoming and outgoing calls are handled and routed. This file controls the behavior of all connections passing through your PBX.
features.conf
The file defines custom codes and options for Asterisk functions like call transfer, call pickup, on-demand recording, digit timeout, call parking, etc.
http.conf
Built-in Asterisk HTTP server configuration.
iax.conf
Describes your IAX protocol connections.
indications.conf
Nationalization of tonal signals.
logger.conf
Asterisk logging configuration. This file configures logging of Asterisk events to files, console, and Linux syslog. To apply settings, run the command "logger reload" in the Asterisk console (CLI).
manager.conf
AMI (Asterisk Manager Interface) configuration.
modules.conf
Asterisk module loading parameters.
musiconhold.conf
Music-on-hold settings in IVR.
queues.conf
Asterisk queue settings. Detailed description of call strategies, penalty, timeout, member, and other available parameters.
rtp.conf
Global RTP settings – media ports and protocol.
sip.conf
Configures internal and external SIP channels in Asterisk.
voicemail.conf
Email notification settings.
jail.local
Fail2ban settings.
msmtp.conf
SMTP client settings.
Download the WinSCP installer from the official website at the link
Install the program
After installation, the main menu of the program will open
Host Name (or IP address) — MikoPBX IP address Port — the default port for SSH connection is 22 User name — always specify root Password — SSH password of your MikoPBX
Before connecting, you need to allow password authorization in the MikoPBX web interface, as well as set a password for connection: to do this, go to "General Settings" -> "SSH"
To connect, click "Login"
After successful connection, the MikoPBX root folder will open for you
Wireshark is a program for capturing and analyzing network traffic. It provides a user-friendly graphical interface for viewing and closely inspecting packets, making it useful for diagnosing and resolving network issues.
Download Wireshark from this link. Install it with the default settings.
Launch Wireshark. Select the network you will use to analyze traffic by left-clicking on it, then press the blue shark icon to start capturing traffic.
Reproduce the issue by making a test call.
To stop the capture, click on the red stop icon:
tcpdump is a Linux utility for capturing and analyzing network traffic. It allows you to monitor packets passing through a network interface in real time and save them for further analysis.
Connect to your PBX via SSH (instructions here).
Run the following command:
Reproduce the issue by making a phone call. After the call, press CTRL + C in the SSH console to stop tcpdump.
Connect to the PBX using WinSCP (instructions here).
Send the log file /tmp/capturefilename.pcap to technical support.
Download the program to connect via SSH. This can be done on the official website at the link
Run the downloaded program. The main menu will open for you.
Go to the "Connection" - "Data" section
"Auto-login username" specify root
"Terminal-tipe string" specify xterm-256color
Go to the "Translation" section
«Remote character set» - specify UTF-8
Set the flag «Enable VT100 line drawing even in UTF-8 mode»
Go to the section "Session" - "Logging". Here you can configure saving the output to a file:
Go to the "Session" section
Required data:
Host Name (or IP address) — IP address of the PBX
Port — port for SSH connection by default 22
Enter the session name and save its settings
In the future, use the "Load" action to use the previously saved session
Perform the "Open" action to connect to the PBX and enter the SSH password
Before connecting, you need to allow password authorization in the MikoPBX web interface, as well as set a password for connection: to do this, go to "General Settings" -> "SSH"
After entering the SSH password, the PBX menu will open
To open the console, go to "[9] Console(Shell)"
Go to the System file customization section
Proceed to editing the "modules.conf" file
Add the following code to the end of the file:
Go to editing the file "extensions.conf"
Add the following code to the end of the file:
In the extension card, in the "Advanced Settings" - "Extra Options" field, set the value
If the employee is busy, a beep file (a short beep) will be played to the caller, then music will be played instead of beeps until the employee answers the call
device_state_busy_at is the number of conversations at which the employee should be considered "busy", in this case the "Routing Settings" rules described in the employee card will start working.
If the problem solution does not work correctly, change the code in extensions.conf to:
There are cases when a customer can be heard very quietly during a phone call and there is no way to increase the volume level on the telephone /softphone. Let's describe a way that can help in solving the problem:
Go to "System" -> "System file customization"
Open modules.conf for editing
Add to the end of the file
Save the changes
Open the extensions.conf file for editing
Add the following code to the end of the file:
Save the changes.
Open the features.conf file for editing
Add the following code to the end of the file:
Save the changes
The default volume will be higher, the value is 5 instead of 0. If desired, the employee can dial #1 to increase the volume or #0 to decrease
Jitter configuration is usually required when there are significant issues with RTP traffic transmission, such as delayed voice, dropped audio, or the inability to hear the other party.
It is best to investigate the root cause by analyzing call dumps on the PBX, router, or upstream router. Compare the data and observe where the jitter increases.
There is this on sound problems.
However, in some cases, you may not be able to influence the quality of the communication channel. If the audio stream delay becomes too large, Asterisk will discard "late" packets. Increasing the Jitter value can solve this issue.
In MikoPBX, jitter can only be configured through .
modules.conf - Add the following line:
extensions.conf - You can add custom contexts for the provider:
For internal (outgoing):
For internal (incoming):
For incoming calls:
For outgoing calls:
When configuring inbound routing, a common scenario arises when a provider offers a single SIP account for multiple purchased phone numbers.
For example, at MIKO, there are phone numbers:
+7(495)229-30-42
+7(499)638-25-84
In the MikoPBX interface, only one "Telephony Provider" account is created. Each phone number needs to be directed to its own route, such as different IVRs.
This is where the comes to the rescue, which the provider can transmit during inbound calls. Knowing the DID number, you can define multiple inbound routes for the provider, each with a different DID, which solves the described problem.
For call analysis, I usually use the "". Here's an example request from the provider for an incoming call:
When receiving such a packet, MikoPBX analyzes the first line with the keyword "INVITE," extracts the value "84996382584," and considers it as the DID number.
In practice, it's not always so straightforward. For example, I've encountered a provider that sends the following INVITE:
The "PJSIP_HEADER" function reads the value of the "To" header.
The "PJSIP_PARSE_URI" function retrieves the "user" field from the header, which corresponds to the DID value.
Gosub moves the channel to the beginning for reinitializing the route.
SIP-1622040384 is the ID of the MikoPBX provider account, which can be found in the browser's address bar when editing the account.
This occurs when using the roistat service. The service may send the following request for incoming calls:
In this case, there is no correct DID in either the INVITE or the To field, but a new header "x-roistat-phone" has appeared.
The "PJSIP_HEADER" function reads the value of the "x-roistat-phone" header.
Gosub moves the channel to the beginning for reinitializing the route.
Mango Office
Obtaining the number that the customer called from the "Diversion" field:
Novafon (Zadarma)
Obtaining the number that the customer called from the "CALLED_DID" header:
The client calls the company, a welcome message (voice greeting) sounds.
During the playback of the voice greeting, the client can dial any internal number, for example, the extension number of an employee or the extension number of a department.
After playing the voice greeting, the client can enter numbers from the phone:
1 - in this case, the call will be sent to the sales department. The sales department is a call queue consisting of two queue agents (two employees). When calling the sales department, the call must be received on the phones of employees at the same time. If none of the employees answered the customer's call within 25 seconds, the call should be sent to the employees' mobile numbers.
2 - the call will be sent to the technical support department. The Technical Support Department is a call queue consisting of three queue agents (three employees). The call must be received by any available employee (queue agent). If the client waits more than 30 seconds for his call to be answered, the call must be transferred to the secretary. If the client has not entered anything / incorrectly dialed the number, then a repeated voice notification occurs and the client can enter the number again. As soon as all attempts to enter the correct number for the client are completed, the call is forwarded to the secretary.
Instructions on call queues are available at the .
For our example, you need to create three call queues:
Sales Department (mobile numbers of employees)
Sales Department (internal employee numbers)
Technical Support Department
You must first create internal accounts for employees according to the indicating their mobile numbers.
Go to the Telephony → Call queue. Click on the "Add a new call queue" button.
Creating a call queue for the sales department (for employees' mobile numbers).
Creating a call queue for the sales department (for internal employee numbers).
We indicate that if none of the employees answered the customer's call within 25 seconds, the call should be sent to the employees' mobile numbers.
Creating a call queue for the technical support department.
Go to Telephony → IVR menu. Click on the "Add new IVR menu" button.
Specify the IVR settings according to our description.
At the last step, we create an incoming call route for our provider. In the Call Routing → Incoming routing add a new rule.
Fill in the data according to the template:
When connecting multiple providers to MikoPBX, you may encounter situations where customer phone numbers come in different formats:
In 7-digit format - 2293042
With a "+" sign, for example, +79257184444
With "8", for example, 89257184444
There is a need to standardize all these formats.
Go to the Routing → Telephony Providers section. Open the provider's account for editing. Copy the Provider ID from the address bar, through which subscribers call your company. Please note that in our example, we are using a single provider. If you have multiple providers configured, you need to perform the following steps for each provider.
In our example, the Provider ID looks like: SIP-1687941868
Go to the System → System file customization section.
Open the configuration file extensions.conf for editing.
Add the folowwing code in the end of file:
In the code above, you need to create the context with the correct name. Format for creating the context:
ID-PROVIDER - the value you saved in the first step of this instruction. In our example, it's SIP-1687947415.
Please note that if you have multiple providers in MikoPBX, you need to create the code fragment above for each provider, taking into account the uniqueness of each provider's ID.
If you want to add normalization for all providers at once, you can create the "add-trim-prefix-clid-custom" context. For example, to add a "7" to all 10-digit caller IDs:
In this case, the account login is described in the "INVITE" line, while the DID is described in the "To" header. To set it up correctly, you just need to add the following lines to the section at the end of the "extensions.conf" file:
To set it up correctly, you just need to add the following lines to the section at the end of the "extensions.conf" file:
Instructions for the IVR menu are available at the .
Instructions for incoming routes are available at the .
When describing outgoing routes, it is allowed to use the same phone number template.
If several routes are used with the same template, the PBX will try to make a call on each of the routes until the call is accepted.
This functionality is not always necessary and there may be a need to disable it.
At the moment, this can only be done through the customization of the PBX.
Go to the provider's settings and copy its ID in the browser's address bar:
Go to the section "System file customization"
Go to the editing section of the extensions.conf file.
Add the following context to the end of the file:
Save the changes. Now all calls via routes associated with the provider will occur without taking into account the backup provider. It will work out only the first of the outgoing routes.
Let's say a conference room with the number "354233" is configured on the PBX.
When calling an employee(s) to a conference, it is always necessary to connect an external subscriber.
When disconnecting employees from the conference, the external subscriber must be disconnected
This may be required to organize communication with an external (relative to MIKOPBX) conference. It will allow saving on outgoing calls (only one line will be occupied).
In the "Telephony" section, go to "Conference" and create a new conference.
We will indicate the name of the room "Z-CONF-354233"
We will indicate the internal number "354233"
Let's describe the "Dialplan Application" (see Dialplan Applications)
Name "Z-Worker-CONF"
The number to call "2200103" (can be arbitrary)
Specify the code type "PHP-AGI script"
Programme code:
Edit the file "/var/spool/cron/crontabs/root" via the System files Customization menu
Adding the task to the end of the file:
In this example, "DIALPLAN-APP-EC12CFAE6783FE82FD34F16E40C7386B" is the ID of the previously created application. The ID can be peeped in the browser address bar when editing the application.
We will describe additional contexts through the Customization of system files menu. We will edit the extensions.conf file.
Add the following code to the end of the file:
When calling the conference number 354233, an external subscriber with the number 37127776675 will automatically connect. As soon as the subscriber answers, the extension number 354233 will be dialed. As soon as all the "internal" participants have left the conference, the external subscriber will be disconnected.
The task in the crown is needed only for additional "protection", in fact it is a restart of the php script every minute
Some providers require sending an additional SIP header when initiating an outgoing call. In this article we will describe a way to install it.
To solve the problem, additional contexts should be described through the System File Customization menu.
We will edit the extensions.conf file.
Add the following text to the end of the file:
Pay attention:
All occurrences of the line "SIP-1611151795" should be replaced with the provider ID "you can find" in the browser address bar when editing an account in the MIKOPBX web interface
Instead of "sip:${OUTGOING_CID}@127.0.0.1", the required header value should be set
The peculiarity of this option is that the value "OUTGOING_CID" will be taken from the settings of user groups. For each group, you can assign your own value of the outgoing caller id. For example, the Westcall provider thus allows you to control the value of the callerid that the client sees.
A customer calls the company, and a welcome message (greeting) is played.
While the greeting is playing, the customer can dial any internal extension number, for example, an employee's extension number.
Additionally, the customer can press:
1 - the call will be routed to the employee with extension number 201.
2 - the call will be routed to the employee with extension number 202.
If the customer doesn't press anything or enters an incorrect number, the call will be redirected to the default number - the employee with extension number 201.
The task can be visually represented as follows:
Create employee accounts by following the instructions. Connect softphones or hardware phones to these accounts.
Add the greeting sound file by following the instructions. This file will be played when the customer calls the company's phone number.
Create a new IVR menu by following the instructions.
When a call is made to the IVR menu (IVR menu number), the sound file "Greeting" will start playing.
While the greeting is playing, the customer can:
Dial any internal extension, for example, an employee's extension. This is enabled by the Allow dialing of any extension option.
Press 1 to route the call to the employee with extension number 203.
Press 2 to route the call to the employee with extension number 201.
If the customer does not enter anything during the greeting, after the greeting plays, the system waits 7 seconds for a digit input. "Total time for number entry" = "Greeting duration" + 7 seconds.
If the "Total time for number entry" expires, the call is redirected to the "Default number," which is the employee with extension number 101.
To repeat the greeting and allow the customer to enter a number again, set the "Number of retries before redirecting to the default number" to 2 or more. The greeting will be repeated, followed by another 7-second wait, allowing the customer to retry the IVR. Once the retries exceed the set value, the call is redirected to the "Default number."
If the customer enters an incorrect number or does not enter anything, the greeting will repeat (if the Number of retries is set to more than 2), or the call will be redirected to the "Default number" (if the Number of retries is set to 1).
Add a providers account through which calls will be made, following the instructions. Examples of provider connections can be found here.
Set up incoming calls to be routed to the IVR menu via the configured provider.
Instructions for configuring incoming call routing are available here.
Some softphones / CTI solutions transmit a phone number with special characters when dialing, for example +371(2) 229-3042
Such a call is very likely to fail, it will be completed by mistake.
To solve the problem of "filtering" characters, an additional context should be described through the Customization of system files menu
We will edit the extensions.conf file.
Add the following context to the end of the file:
According to the described rule, only the characters *#1234567890 will remain in the dialed number
It is necessary to be able to call emergency numbers 112, 1xx
Go to the Routing → Outbound routes section.
Adding a new rule
Fill in the parameters as in the screenshot below:
You direct calls to emergency numbers through an arbitrary provider. The provider must support dialing emergency numbers. The priority of this rule should be the highest, i.e. it should be described first in the list of created outgoing routes.
Go to System → System file customization
Open the extensions.conf configuration file for editing.
Set the "Add to end of file" mode. In the black window, add the following code snippet:
In the above code snippet, we described the rules for all three-digit numbers starting with 1. If you need to specify specific emergency numbers, then instead of the above code, you need to insert the following lines:
Google Cloud Marketplace
Instructions for installing a ready-made image from Google Cloud Marketplace
Creating a new virtual machine.
After downloading the latest version of the image (link), specify the ISO file with the installation distribution.
Click "Continue"
Select the type of operating system Other Linux 5.x and later kernel 64-bit
Click "Continue"
Choosing the Legacy bios type
Click "Continue"
Click "Finish"
After creating a virtual machine, wait for it to load
Go to the section "[3] Reboot the system"
Choose "[2] Shutdown"
After shutting down the virtual machine, go to Settings
Select "Add device"
Select "New Hard Disk"
Click "Add..."
Choose the size of the hard drive (we recommend at least 50 GB)
Click "Apply"
1 hour of recording conversations takes approximately 14mb on disk.
Start the virtual machine
Select "[8] Install"
Enter the name of the disk on which MikoPBX will be installed
In our case - sdb, enter its name and press Enter
Confirm the disk selection: enter y
Select a disk for recording conversations
In our case - sdc, enter its name and press Enter
The system will reboot and MikoPBX will be ready for use.
The PBX displays the IP address of the station by which you can connect to it
Enter the IP address of the station in the browser bar and the MIkoPBX login menu will open
The default username and password is "admin"
Application dialplans are programmable voice applications in PHP and Asterisk Dialplan.
MikoPBX comes with several pre-configured applications. With some basic knowledge of Asterisk dialplan, you can easily create additional applications. Like a phone extension, applications can have an internal number assigned in the settings.
Below you will see a description of the basic applications included in MikoPBX:
MikoPBX applications are created from several plans of the Asterisk application suite. There are many examples of ready-to-run applications in the system. To add a new MikoPBX application, click on "Add a New" in the application menu.
In just a few steps, you can create your own applications. First, define the Name and Call Number for the application, and optionally fill in the Comment field.
Possible application code types:
PHP-AGI script - AGI is an embedded method in Asterisk for executing external scripts (similar to CGI for HTTP servers), which can extend Asterisk's functionality using other programming languages, particularly PHP. AGI scripts can control call handling in the dialplan and are invoked from the extensions.conf file.
Asterisk Dialplan - The configuration of the dialplan is contained in the Asterisk configuration file called extensions.conf. This is one of the most important configuration files where the processing and routing of incoming and outgoing calls are defined. This file governs the behavior of all connections passing through your PBX (Private Branch Exchange).
Let's clarify: we will refer to MikoPBX applications as "applications" and Asterisk dialplan functions as "functions". For example, Answer(), NoOP(), Set(), and Wait() are functions. These are individual target functions in Asterisk that are then combined in MikoPBX to create more powerful MikoPBX applications.
Describe the logical operations in the text field of the Programme Code. Please note that only one command is allowed per line, for example:
The figure shows an example of the simplest application for the number 000063. After dialing the number, you will hear the robot voice your internal number.
MikoPBX will check the commands used. It is possible that incorrectly programmed operations may affect the performance of your telephone system.
Description of Asterisk functions that you can use in your applications:
Application Number | Application Description |
---|---|
Наименование команды | Описание |
---|---|
000063
The application reads the internal number of the employee used to call the application and voices it to the employee, i.e. the employee is voiced his internal number on the PBX
000064
0000MILLI - Generates a constant sound signal with a frequency of 1000 Hz. Used to check the quality of the connection.
10003246
The Echo application sends the received audio signals back to the user so that the delay duration can be determined. In general, you hear what you say. The application is mainly used for testing.
answer
Transfer the call to the answered state.
channel status
Returns the status of the connected channel.
control stream file
Sending a preset audio file to the channel, with the ability to control its playback (pause/rewind/resume playback) using the DTMF digits received from the subscriber, if specified. (Asterisk 1.2)
database del
Deleting a key/value from the database.
database deltree
Deleting the key/value tree from the database.
database get
Get the value from the database.
database put
Adding/changing a value in the database.
exec
Execution of the specified Command. (Commands are functions that you use when describing the set plan in the extensions.conf file).
get data
Get data from the channel.
get option
Behaves similarly to the "STREAM FILE" command, but is used with a specified value for timeout. (Asterisk 1.2)
get variable
Get the value of the channel variable.
hangup
Break the connection (Hangup) on the current channel.
noop
An empty command. Does nothing.
receive char
Accepts one character from the channel if it supports this feature.
receive text
Accepts a text string from a channel if it supports this feature.
record file
Writes to the specified file.
say alpha
Pronounces the specified string of characters. (Asterisk 1.2)
say date
Pronounces the date. (Asterisk 1.2)
say datetime
Pronounces the date and time according to the specified format. (Asterisk 1.2)
say digits
Pronounces the specified string of digits.
say number
Pronounces the specified number.
say phonetic
Pronounces the specified string of characters.
say time
Pronounces the time.
send image
Sends the image to the channel if it supports this feature.
send text
Sends text to the channel if it supports this feature.
set autohangup
Automatic termination of the connection (Autohangup) on the channel at the specified time.
set callerid
Setting the caller id for the current channel.
set context
Setting the context for the current channel.
set extension
Change the extension for the current channel.
set music
Включение/Выключение музыки ожидания (Music on hold), например: «SET MUSIC ON default».
set priority
Enabling/Turning off the standby music (Music on hold), for example: "SET MUSIC ON default".
set variable
Setting the channel variable.
stream file
Sending an audio file to the channel.
tdd mode
Setting the TDD mode for a channel that can support it to enable interaction with TDD.
verbose
Writing a message to the verbose log of the asterisk server.
wait for digit
Waiting for the DTMF button to be pressed
This section is used to configure Fail2ban
Fail2ban is enabled together with the Network Firewall switch in the 'Network and Firewall' → 'Firewall' section.
Fail2ban blocks IP addresses with abnormal activity. When there is a failed authentication attempt, information about the error will be logged in the PBX. Fail2ban analyzes all failed attempts and keeps track of them. When the number of failed attempts exceeds the maximum allowed authentication attempts, the IP address is banned. Fail2ban is capable of slowing down the rate of failed authentication attempts. Please note that Fail2ban will not help with the use of simple passwords.
The Anti brute force settings can be found at the bottom of the "Network Firewall settings":
If a certain number of failed login attempts (Number of attempts for blocking) occurs within a specific period (Within (seconds)), the IP address will be blocked for a specified duration (Block for (seconds)).
The whitelist of addresses defines IP addresses that will not be blocked by Fail2ban. You can specify individual IP addresses like 93.188.40.10 or subnet like 93.188.40.10/32. The separator used is a 'space'.
Please note that if you have set the 'Never block addresses from this network' option in the 'Network Firewall' section for a subnet, that subnet is automatically added to the whitelist, and you don't need to add it manually. It is not recommended to manually populate the whitelist of IP addresses. It is preferable to specify IP addresses only in exceptional cases.
The list of blocked addresses shows which IP addresses are currently blocked.
You can also unblock an address by clicking on the corresponding icon in the table.
WARNING: All data on the disks will be erased.
Prepare a PC with two disks of the same size.
Boot the machine in LiveCD or LiveUSB mode.
Connect to the machine via SSH.
Run the following command in the console to display disk names:
The disk names will be displayed. In this example, the disk names are:
Clear the superblocks on the disks:
Clean the old metadata:
Create the RAID1 array:
When prompted with "Continue creating array?", confirm by entering "y".
You can now proceed with the installation as per the installation guide. When selecting the disk during installation, choose md0
.
TODO: You may need to modify the grub.cfg
file. Otherwise, there is no guarantee that the system will boot if one of the disks fails.
In some cases, it is necessary to save call recordings on a network drive. This example shows how to connect a shared Windows folder to MikoPBX.
Note: If the network folder becomes unavailable, it may cause disruptions in PBX operation.
Create a directory for the script:
Create the script file:
Insert the script content:
Press "CTRL+D" twice to finish creating the file.
Grant execution permissions:
In the script variables "HOST, USER, PASS", specify the connection parameters to the shared folder.
Add the script to cron for automatic connection of the shared folder.
Go to the System → Customizing System Files section.
Add the following rule to the end of the /var/spool/cron/crontabs/root file:
Test the PBX operation to ensure that call recordings are being saved to the network drive.
MikoPBX can determine the phone number to which the call came from the client. For example, company employees, when receiving an incoming call from a client, need to understand which number the client called. This information should be displayed when a call is received from a client and displayed on the phone. The number the customer called is called the did number. Further in the instructions, we will consider how to display information about the did number on the screen of your phone.
Go to Call Routing → Telephony Providers. Open the provider's account for editing. Copy in the address bar the ID of the provider through which subscribers call you to the company. Please note that in our example, a single provider is used. If you have configured the connection of several providers, then the following steps must be performed for each provider.
In our example, the provider ID takes the form: SIP-1687941868
Go to System -> System File Customization
Open the extensions.conf configuration file for editing.
Set the "Add to end of file" mode. In the black window, add the following code snippet:
In the above code snippet, you need to make the correct context name.
Format of the created context:
PROVIDER-ID is the value that you saved in the first step of this instruction. In our example, this is SIP-1687941868.
In addition to the did number, you can output the name of the provider / line through which the call passed. To do this, follow these steps:
Go to Call Routing → Telephony Providers. Open the provider's account for editing. In the Advanced Options field, specify a variable with the name of the provider.
Go to System -> System file customization
Open the extensions.conf configuration file for editing.
Set the "Add to end of file" mode. In the black window, add the following code snippet:
In the above code snippet, you need to make the correct context name.
Format of the created context:
PROVIDER-ID is the value that you saved in the first step of this instruction. In our example, this is SIP-1687941868.
Task: Several providers A,B, C, D are installed on the PBX… The call arrives at MikoPBX through provider A. When dialing an employee's mobile number, the call must also go through provider A. The provider must support more than one simultaneous call.
Go to System → System file customization
Open the extensions.conf configuration file for editing.
Set the "Add to end of file" mode. In the black window, add the following code snippet:
For each provider, it is necessary to describe the outbound routes
Fill in the mobile numbers for employees (see the documentation)
Limit the use of outgoing routes for users, use the "User Groups" module
Now, if an incoming call is sent to an employee's mobile phone, for example through the IVR menu, then the call will be sent through the same provider through which it came
Such a need may arise in many cases, For example, when a client is tired of waiting on the line, you can offer him to leave a voice message, connect with an internal number known to the client.
Go to System → System file custmization.
Open the file "queues.conf" for editing
In the black window, find the queue section that you need to configure
Select the "Add to End of File" mode. Add a similar section with the prefix (+) :
In this example, we have described the internal context, the dialing of all internal numbers is allowed. You can specify the context of the IVR menu, in the format ivr<InternalNumberIVR>
Go to System → System file custmization.
Open the extensions.conf configuration file for editing.
Set the "Add to end of file" mode and paste the following code:
The whitelist of numbers sometimes needs to be described for specific providers:
PROVIDER-ID - the value that you can find in the address bar at the time of provider configuration
In MikoPBX, in the Call Routing → Night and Holiday section, rules for routing calls outside working hours are configured. These rules apply to all calls, regardless of which company number the client called. It is necessary to set individual non-working hours for the Zadarma provider. Working hours for this provider: from 9.00 to 18.00 Moscow time.
Go to Modules → Dialplan Applications. Create a new application (Asterisk dialplan) following the . Application parameters take the form:
The program code of the created application:
Otherwise, the call will be routed to the employee with extension 201.
Set up inbound routing rules for the created provider. Go to the Routing → Incoming routing section. We direct all incoming calls to the created application
Find and copy the provider ID. To do this, go to the configuration of the required provider. In our example, this is SIP-1687941868
Go to System -> System file customization
Open the configuration file extensions.conf for editing.
Set the "Add to end of file" mode. In the black window, add the following code snippet:
In the above code snippet, you need to make the correct context name.
Format of the created context:
PROVIDER-ID is the value that you saved in the second step of this instruction. In our example, this is SIP-1687941868.
Working hours are from 9.00 to 18.00, therefore it is necessary to set two intervals for non-working hours: 00:00-09:00 and 18:00-23:59.
Let's analyze the ExecIfTime command in more detail. This command executes the specified Asterisk application if the current time matches the specified time specification. In our case, the command plays a sound file located in the /offload/asterisk/sounds/other/out_work_times directory in MikoPBX.
Command syntax:
times - Time ranges in 24-hour format
weekdays - Days of the week (mon, tue, wed, thu, fri, sat, sun)
mdays - Days of the month (1-31)
months - Months (Jan, Feb, Mar, apr, etc.)
appname[(appargs)] - Asterisk command specifying the call parameters
In our example, the time range, the range of days of the week are indicated. Instead of specifying days months and months, * are entered. This symbol means "for all other cases".
The ExecIfTime command executes the specified Asterisk application if the current time matches the specified time specification. If we receive a call from 9:00 to 18:00 on any weekday (Monday to Friday), we redirect the call (command) to 2003. 2003 is the IVR menu number.
Let's say there is a certain number +371 (2) 637‑23‑33, by calling to which and dialing an extension you can get to a specific employee. This can be extremely convenient, especially if the extension number is longer than 3 characters. Next, we describe an example of the implementation of the task.
To solve the problem, additional contexts should be described through the Customization of System Files menu.
We will edit the extensions.conf file.
Add the following text to the end of the file:
Next, it is necessary to describe the Applications of dialplans
Select "Type of code" - "Asterisk Dialplan"
Let's say you need to "dial" the number 3542331, set this value to "Number to call the application"
Go to the "Programme Code" tab and insert the template:
If you specify the 9XXXX template in the "Application call number" field, it will be possible to "dial" any five-digit numbers starting with the digit "9"
In the application, assign the variable "ZDST" the number to which the call should be made In the "ZDTMF" variable, specify the number for the additional set
In the "ZPROVIDERID" variable, specify the ID of the provider through which the outgoing call should be made. ID can be peeped in the browser address bar when editing the provider