System files customisation
Description of the capabilities of the "System file customization" section
Last updated
Description of the capabilities of the "System file customization" section
Last updated
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:
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.
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
To edit a configuration file, use the button: