LogoLogo
www.mikopbx.comTelegram communityForum
English
English
  • MikoPBX Manual
    • Quick start
    • Getting to know MikoPBX
    • System requirements
  • Installation
    • Standalone Computer
    • Virtual Machine
      • VMware ESXi
      • VMware Fusion
      • VirtualBOX
      • VMware Workstation Pro
      • Hyper-V
      • Proxmox
    • Cloud
      • AWS
        • AWS deployment guide
        • AWS Marketplace
      • Microsoft Azure
      • Google Cloud
        • Google Cloud deployment guide
        • Google Cloud Marketplace
      • Hetzner cloud (In dev)
      • Digital Ocean
      • Alibaba Cloud
      • Vultr
    • Docker container
      • Docker installation and creating a user and directories
      • Running MikoPBX in a container
      • Running MikoPBX using docker compose
  • User manual
    • Telephony
      • Extensions
      • Call queues
      • IVR Menu
      • Conferences
      • Sound files
      • Call detail records (CDR)
    • Call Routing
      • Telephony providers
      • Incoming routing
      • Outbound routing
      • Night and Holiday Switch
    • Modules
      • Registration in the modules marketplace
      • Module management
      • Application dialplans
    • Maintenance
      • PBX update
        • Updating from the web interface
        • Updating from the MikoPBX console
        • Updating the docker
      • System log entries
      • Reboot
    • Network and Firewall
      • Network interface
      • Firewall
      • Anti brute force
    • System
      • General settings
      • Time Settings
      • Mail settings
        • Setting up E-mail notifications for the Gmail mail service
      • Asterisk Manager Interface(AMI)
      • System files customisation
  • FAQ
    • Setup
      • Installation on MDADM RAID1
      • Fine-tuning the firewall
      • Migrating MikoPBX to Another Server
        • Transfer Using Backup
        • Transfer using scheduled backup (SFTP)
        • Transfer using rsync
      • Reset to factory settings
      • Monitoring Providers on MikoPBX
    • Management
      • Change the login name
      • The extra disk space has run out, the disk size has increased
      • Storing Recordings in a Shared Windows Folder
      • Resetting WEB Interface Credentials
      • Backup Internet and Provider Re-Registration
    • Troubleshooting
      • Connecting to the PBX using SSH
        • Connecting to PBX using SSH client (Putty)
        • Connecting via SSH (Windows)
        • Connecting via SSH (Linux/MacOS)
      • Connecting to a PBX using WinSCP
      • Getting logs using the tcpdump application
      • Capturing Logs from PBX using Wireshark
      • Traffic Analysis Using Sngrep
      • Adjusting the volume
      • Troubleshooting sound problems
      • Jitter Configuration
    • Incoming Routing
      • Choosing a provider when redirecting to a mobile
      • Notification of Employment, Call Waiting
      • Black and white lists
      • Allow additional dialing of the internal number in the queue
      • Output of information about the did number
      • Setting individual non-working hours for a provider account
      • An example of the implementation of a typical route of incoming calls
      • Routing by DID Number
      • Normalization of incoming phone number
      • Basic IVR example
    • Outbound routing
      • Add P-Preferred-Identity and Remote-Party-ID header
      • Conference with a regular external subscriber
      • Outgoing with internal number dialing
      • Remove all special characters from the dialed number
      • Prohibiting calls via a backup route
      • Calls to emergency numbers
      • Number Templates
        • Uniform distribution of outgoing
        • Sample template: calls to another country
        • How to prohibit the replacement of "+" with 00
        • Changing the number prefix from "+345" to "347"
        • Changing the number prefix from "345, 347" to "+345"
        • Removing the area code from the number
        • Adding the prefix "1" to the number
      • Making Calls Through a Specific Provider
    • Scenarios and cases
      • Generate extensions by REST API
      • Missed Call Telegram Notifications
      • Call the company from your mobile and dial an extension to call a third-party company
      • Sending an incoming fax to email
      • Customer's assessment of the quality of service
      • Simulation of external calls
      • Disabling "off-hours" for VIP numbers
      • Registering multiple accounts from one provider
      • Setting up individual non-working hours for several providers on one host
      • Disable forwarding to mobile for internal calls
      • Unique background music for the queue
      • Pause for Queue agent
      • Dynamic Queue Agents
      • Setting up the "Paging" function
      • Limit the number of authorizations per SIP account
      • Call Monitoring (ChanSpy)
      • Conversion of Call History FreePBX -> MikoPBX
      • SSL Certificate for MikoPBX Web Interface from OPNSense
      • Hiding the Caller’s Number from Employees
    • Interconnections
      • Merging two MikoPBX
      • Integration of MikoPBX and Grandstream UCM6202
      • MikoPBX and FreePBX (PJSIP)
      • MikoPBX and FreePBX (IAX)
    • VoIP providers
      • Mango
      • Zadarma
    • Softphones
      • Bria Solo
      • Sessiontalk
      • MicroSIP
      • Groundwire
      • Zoiper
      • Jitsi
      • PhonerLite
      • Linphone (MacOS)
      • Telephone(MacOS)
      • Configuring webRTC client SIMPL5
      • Softphone.pro
      • 3CX Softphone
      • PortSIP
    • IP telefones
      • Snom D120
      • Yealink T19
    • VoIP gateways
      • GoIP4
      • Grandstream HT503
      • Using a Huawei E173 USB Modem for Calls (chan_dongle)
  • Modules
    • MIKO modules
      • for 1C:Enterprise
        • Панель телефонии 4.0 для 1С
        • Панель телефонии 1.0 для 1С
        • Модуль умной маршрутизации
      • Users groups
      • CRM Bitrix24 integration
      • Autoprovision
      • Let's Encrypt
      • Access control management
      • Module auto dialer
      • Backup
      • Synchronization with LDAP/AD
      • Callback module
  • other
    • Changelog
      • MikoPBX 2024.1
      • MikoPBX 2023.2
      • MikoPBX 2023.1.223
Powered by GitBook
On this page
  • Refinement of Dialplan
  • Evaluation result processing script

Was this helpful?

Edit on GitHub
Export as PDF
  1. FAQ
  2. Scenarios and cases

Customer's assessment of the quality of service

Last updated 1 year ago

Was this helpful?

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.

Refinement of Dialplan

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:

  1. 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

  1. Go to "System" → "System file customization".

  1. Open the extensions.conf configuration file for editing.

  1. Set the "Add to end of file" mode.

  1. In the black window, add the following code snippet:

[SIP-PROVIDER-SIP-1687947415-after-dial-custom]
exten => _.!,1,Goto(quality-start,s,1)
	same => n,return

[SIP-PROVIDER-SIP-1687947415-outgoing-custom]
exten => _.!,1,Set(DOPTIONS=${DOPTIONS}F(quality-start,s,1))
	same => n,return

[quality-start]
exten => _.!,1,NoOp(--- Quality assessment ---)
	same => n,ExecIf($[${M_DIALSTATUS}!=ANSWER]?return)
	; We describe the path to the conversation termination file. Thank you for the quality assessment. 
	same => n,Set(filename_bye=/storage/usbdisk1/quality/sounds/bye)
	; We describe the paths to the survey files.
	same => n,Set(filename_1=/storage/usbdisk1/quality/sounds/miko_hello)
	same => n,Set(filename_2=/storage/usbdisk1/quality/sounds/q_1)
	same => n,Set(filename_3=/storage/usbdisk1/quality/sounds/q_2)
	same => n,Set(f_num=0);
	same => n,Goto(ivr-quality,s,1)

[ivr-quality]
exten => s,1,NoOP( start ivr quality )
	same => n,Set(f_num=$[${f_num} + 1])
 	same => n,Set(filename=${filename_${f_num}})
	same => n,GotoIf($["x${filename}" == "x"]?ivr-quality,bye,1);
	same => n,Background(${filename})
	same => n,WaitExten(5)

exten => _[1-5],1,NoOP( quality is ${EXTEN})
	; AGI a script that will save the result of the evaluation of the conversation by the client.
	same => n,AGI(/storage/usbdisk1/quality/quality_agi.php)
	same => n,Goto(ivr-quality,s,1)

exten => _[06-9],Goto(ivr-quality,s,1)

exten => bye,1,ExecIf($["x${filename_bye}" != "x"]?Playback(${filename_bye}));
	same => n,Hangup()

In the above code snippet, you need to make the correct context name.

Format of the created context:

[PROVIDER ID-outgoing-custom]
[PROVIDER ID-after-dial-custom]

PROVIDER ID is the value that you saved in the first step of this instruction. In our example, this is SIP-PROVIDER-1687947415.

Evaluation result processing script

chmod +x /storage/usbdisk1/quality/quality_agi.php

Implementation example quality_agi.php:

#!/usr/bin/php
<?php
require_once 'phpagi.php';
require_once 'globals.php';

$agi 		= new AGI();
$linkedid   = $agi->get_variable('CDR(linkedid)', true);

$arr = [
    'quality'   => $agi->request['agi_extension'],
    'f_num'     => $agi->get_variable('f_num', true),
    'filename'  => $agi->get_variable('filename', true),
    // 'Оцененный оператор:' => $operator,
    'linkedid'  => $linkedid,
    'date'      => date('Y-m-d H:i:s'),
    'callerid'  => $agi->request['agi_callerid']
];

$file_log = '/storage/usbdisk1/quality/'.$linkedid.'.log';
Util::mw_mkdir(dirname($file_log));
file_put_contents($file_log, json_encode($arr)."\n", FILE_APPEND);

The evaluation result will be saved in files like /storage/usbdisk1/quality/<ID>.log

Example file:

{"quality":"1","f_num":"1","filename":"\/offload\/asterisk\/sounds\/other\/miko_hello","linkedid":"mikopbx-1574331248.66","date":"2019-11-21 13:14:13","callerid":"79265775289"}
{"quality":"2","f_num":"2","filename":"beep","linkedid":"mikopbx-1574331248.66","date":"2019-11-21 13:14:15","callerid":"79265775289"}
{"quality":"3","f_num":"3","filename":"\/offload\/asterisk\/sounds\/other\/out_work_times","linkedid":"mikopbx-1574331248.66","date":"2019-11-21 13:14:16","callerid":"79265775289"}

The file should be saved to the PBX along the path /storage/usbdisk1/quality/quality_agi.php You can create a file using the file manager The file should be set to execute access rights. Connect via and run the command

WinSCP
SSH