Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Connect providers registered on the same host as described in the instructions.
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:
Instead of the numbers X9522140000 and X9629771111, specify the customer phone numbers as they appear in the call history.
This functionality is convenient for mobile employees. When it is important that the conversation is recorded and recorded on the PBX in the call history. When it is not possible to use a softphone / or "IP-SIM".
Add a new dialplan application (see Dialplan Applications)
Assign an internal number, for example 2200109
Paste the code into the "Programme Code" tab:
In the browser's address bar, copy the application ID. It will look like "DIALPLAN-APP-6A9902C631C5E7B5AC8F501C559FD678"
Go to the "System file customization" section
Open the file "extensions.conf" for editing
Paste the following code at the end of the file:
here "DIALPLAN-APP-6A9902C631C5E7B5AC8F501C559FD678" is the application ID.
The application will be executed for all incoming calls
It will be possible to enter an extension only if the caller's phone number is filled in the employee card, that is, the number must belong to the employee. This is done for security.
The script is not a complete product, but is open for customization
Example of using REST API to generate employees
In release 2023.2, an API for quickly creating a large number of employees was implemented. During testing, we described the algorithm for generating new employees in ChatGPT and conducted stress testing for creating 700 random accounts in different languages. It took about 1 minute to complete the load test, and it was successful.
To perform this task, a request to ChatGPT was written with the following content.
If the result parameter in the response is true, we will take the data for creating a new user from the data parameter and make a POST request to the address http://127.0.0.1:8081/pbxcore/api/extensions/saveRecord, using the modified array of form fields in x-www-form-urlencoded format.
The script should be written in Python without using NodeJS and should allow creating 100 different employees. In the user_username field, enter the name and surname of a random person so that national alphabets are used. In the user_email field, enter any email address. In the mobile_number field, enter random mobile phone numbers, only digits, without duplicates. In the fwd_forwarding and fwd_forwardingonbusy fields, fill in with mobile_number values.
When creating an employee, print user_username, user_email, and number to the console and report the result.
If the result of the saveRecord or getRecord request is false, also print the messages parameter from the received response. If the response results in an error of another type or cannot be parsed, print the complete text received from the API server to the console.
As a result, a Python script was generated that allowed us to perform this test.
As a result of the script's execution, you will see a list of created employees in the console, and new user accounts will appear in the web interface.
It's important to note that since the system is read-only, you need to install Python libraries after each reboot, and the /tmp folder will be cleared. Development and refinement of the script should be done in an external system.
When making REST API requests from external addresses, it's necessary to authenticate with an administrative username and password or create a user with the necessary permissions in the employee rights management module and authenticate with it.
When making requests, as in this example, from the address 127.0.0.1, no authentication is required.
Improving the quality of the organization's service is an extremely important component of the successful operation of the company. The mechanism for evaluating the work of an operator will be useful to any business.
In the current article, we offer an example of the implementation of the quality assessment mechanism by the client for PBX MikoPBX.
You should first upload the question/greeting record files to the PBX.
WAV (Microsoft) signed 16-bit PCM recording format. Files can be conveniently placed in the directory: /storage/usbdisk1/quality/sounds.
In dialplan, the path to the file should be specified without an extension.
To begin with, let's add the logic of processing incoming calls:
Go to "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, the only provider Zadarma 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-1687947415
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-PROVIDER-1687947415.
Implementation example quality_agi.php:
The evaluation result will be saved in files like /storage/usbdisk1/quality/<ID>.log
Example file:
Paging through phones, i.e. transmitting a voice message through several phones via speakerphone. For example, a manager can quickly call a meeting.
This instruction is suitable for phones:
Linksys
Cisco
Telephone (Softphone)
Grandstream
microsip (Softphone)
Yealink
Fanvil
Snom
Go to the "System file customization" section
Open the file "/var/spool/cron/crontabs/root" for editing
Add the following code to the end of the file:
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 "extensions.conf" file
Go to the "Dialplan Applications" section, create a new dialplan
Assign an internal number, for example 2200110. Set the code type: "Asterisk Dialplan"
Go to the "Programme Code" tab, insert the following code:
In the application code, describe the contacts to whom you should call. Contacts are listed with a & separator.
Go to the "Modules" - "Dialplan Applications". Create a new dialplan.
Enter the name "Eavesdropping". Specify the "number to call the application", here we will use the template "911XXX" - XXX means all three-digit numeric numbers. In the "Type of code" field, specify "Dialplan Asterisk"
Further functionality you can choose from three options:
It becomes possible to eavesdrop on someone else's conversation, so that neither the operator nor the client will suspect anything
In the tab "Programme code" insert the following code:
ChanSpy(SIP/${EXTEN:3},qw) - note that the application number will be passed as EXTEN. If you dial 911101, the internal number 101 will be dialed. The first three digits are cut off.
If you change the length of the template, then you should adjust this line.
When using PJSIP, the command will look like ChanSpy(PJSIP/${EXTEN:3},qw)
In the tab "Programme code" insert the following code:
The differences are only in the parameters for ChanSpy
In the tab "Programme code" insert the following code:
The differences are only in the parameters for ChanSpy
Assign an internal number, for example, 2200110.
Insert the following code into the "Programme Code" tab:
In the code, replace '[email protected]' with your own email address.
Go to the "System file customization" section.
Open the "extensions.conf" file for editing.
Add the folowwing code to the end of file:
Replace "2200100" with the number of your application.
In the code, replace "SIP-1687941868" with your provider's ID. You can find it in the provider's card in the browser's address bar.
Open the "modules.conf" file for editing.
Add the following code to the end of the file:
In the provider's card, in the advanced settings, in additional parameters, specify:
Go to edit the employee account.
In the "Extra oprions" field, add:
The last registration will work. The softphone/phone that registered last and will receive calls. Outgoing calls can be made by each end device.
The function can be useful if there is a need to play an advertising audio file instead of background music. You can assign your own file to each queue.
Go to the section "Telephony" -> "Sound files" -> "Music on hold"
Add media files:
After saving the media file, copy its ID from the browser address bar. For example , in a link like "http://192.168.0.41/admin-cabinet/sound-files/modify/5" the identifier is the number 5.
Go to the "System" -> "System file customization"
Open the file "/etc/asterisk/extensions.conf" for editing
Paste the following code at the end of the file:
According to this example, for the queue with the number "2001", a file with the ID 5 will be played in the background, for the queue "2002", a file with the ID 6
Add a new dialplan application (see ).
For the case when an employee has moved away and cannot answer a call, it is convenient to put the agent on pause. For example, an employee dials a special extension number *46 and leaves for lunch.
New calls to the employee will stop coming.
When the employee returns, he dials *46 again and disables the pause. In modern phones, everything can be reduced to pressing a single button.
Go to "Modules" -> "Dialplan Applications"
Create a new dialplan.
Specify the name, as well as the dialplan number (in our case - 2200105). Specify "Dialplan Asterisk" as the code type
Go to the "Programme Code" tab. Paste the following code into the black area:
Go to the "System file customization" section
Open the file "/etc/asterisk/extensions.conf" for editing
Paste the following code at the end of the file:
The "Dynamic Queue Agents" application in MikoPBX is a feature designed to enhance the flexibility and efficiency of call center operations.
From time to time there is a need to add and remove employees from the queue. Until now, this was only possible to do through the web interface of the telephone exchange.
In this article I will tell you how to implement the ability to connect and disconnect from a queue by dialing a service extension number.
Create a new queue with a four-digit extension number. For example, 2001. (see documentation “Call Queue”)
Describe the new “Dialplan Application”
Assign a “Extension to call the application” - 999XXXXX, you can redefine the first three digits with your own combination
Code type - “PHP AGI script”
In the "Programme code" tab, paste the following content:
Press "Save settings"!
Dial 99912001 to join queue 2001 .
Dial 99902001 to disconnect from queue 2001.
In the extension settings you can configure routing. If an employee is not available, the call can be directed to his mobile phone number. This function is not necessary for all cases. For example, clients often ask to turn it off for internal calls.
Go to the “System” section -> “System file customization”
Select the file “/etc/asterisk/extensions.conf” to edit.
Select the “Add to end of file” mode.
Add the code to the second field:
Now "Dynamic queue agents" application is ready to use .