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:
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:
[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.
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
The file should be saved to the PBX along the path /storage/usbdisk1/quality/quality_agi.php You can create a file using the WinSCP file manager The file should be set to execute access rights. Connect via SSH and run the command