You can add integration with Asterisk along with the path administrator account — section "Settings" — subsection "Integration" — button "Add integration" — Telephony — Asterisk.
Integration with Asterisk works through the ARI interface, so before connecting the integration, you need to set up some settings in Asterisk itself. To do this, you might need to involve your Asterisk specialist, who is responsible for its operation and is familiar with the settings.
Important points
a) By default, connection is made via https. If you do not have it configured, you will get an authorization error when connecting. To bypass this, in the IP-address field specify the address with http, for example: http://188.188.188.188.
b) After filling in all the fields in the integration connection form, a request for the list of internal operator numbers in Asterisk is executed: https://docs.asterisk.org/Asterisk_16_Documentation/API_Documentation/Asterisk_REST_Interface/Endpoints_REST_API/ If the list of operators does not appear after filling in all the fields, make sure that you have access from outside.
The essence of the integration is to set up events transfer based on calls from Asterisk to Deskie. These events will be displayed in the agent account, and cases based on corresponding calls will be created.
Setting up Asterisk settings
1. To interact with Deskie, you need to create a separate user in ARI: https://docs.asterisk.org/Configuration/Interfaces/Asterisk-REST-Interface-ARI/Getting-Started-with-ARI/
exten => s,1,Set(DATE_NOW=${STRFTIME(${EPOCH},,%d.%m.%Y-%H:%M:%S)}) same => n,set(OMNI_RESULT=${CURL([deskie_webhook_url],datetime=${DATE_NOW}&from_user=${ARG1}&to_user=${ARG2}&unique_id=${ARG3}&status=${ARG4})})
Don't forget to replace [deskie_webhook_url] with the URL from the second step of the integration connection form (see the second paragraph in the screenshot at the beginning of the article).
Call events, that have to be transferred to Deskie
The event name must be passed in the macro in the status parameter.
1. Incoming call without an answer:
Request example:
curl -vvvvvvvv --location --request POST 'https://company.omnidesk.ru/webhooks/asterisk/cc75532f' -F status=record -F unique_id=1640854015.26 -F record=@/var/spool/asterisk/monitor/2021/12/30/q-50-+375291701899-20211230-114656-1640854015.26.mp3
Integration options
To learn more about the main points of how the integration works, take a look at the following scenarios:
Incoming call from a known user
1. Incoming call notification is displayed in the upper right corner. If there is already a user in Deskie with the same phone number, the notification will display their data:
You can choose which user data to display in the notification. To do this, activate the "Incoming call" form for the required fields (administrator account — section "Data fields" — editing the field):
By default, we display the fields "Full name", "Email address" and "Company".
Next, there are two options:
capture the subject and essence of the call by filling in the appropriate fields and clicking on the "Create" button. This information will help in the future to quickly understand what the conversation was about, without having to listen to the record;
add or change the user's data by clicking on the link "edit";
return to the user profile (via the link "go to user profile" in the header of the main area) in order to still select one of the previous cases to link with the current call.
After the agent fills in the fields "Subject", "Essence of the call" and clicks on the "Create" button, the page of the created case will open:
While the agent continues to communicate with the user, the message displays "Call in Progress" and there is no record of the conversation. After the conversation is over, the page is refreshed and a record of the conversation is attached to the message.
b) If an agent selects one of the user's previous cases to link it to the current call, then after going to the page of the case, the agent can:
fixate the call within the current case by clicking on the appropriate link;
go back to the user profile to select another case or create a new one.
When you click on the "Fixate the call within the current case" link, a special field appears to indicate the nature of the call. After saving changes to the case, a new message appears with a call record.
Incoming call from an unknown user
3. Incoming call notification is displayed in the upper right corner. If there is no user with the same phone number in Deskie yet, it will be stated in the notification:
4. When an agent receives a call via a softphone, two options appear in the notification: "Find a user from the database for the profile linking" and "Create a call based case".
Let's take a closer look at each of them.
Further actions of the agent are identical to those described in the first example when the user was known at the time of the call.
In a situation where the call ends before the agent creates a case, we create it automatically, picking up the subject and essence of the call if the agent filled them out.
Outgoing call to a user via softphone
In this case, we will also pull the information about the outgoing call to Deskie, and the agent will be able to perform the necessary actions by analogy with incoming calls:
create a new user if such a number is not yet in the Deskie database;
create a new call based case;
link the call to an existing case.
5. If, when making a call via softphone, an agent does not open Deskie and does not create a case (or fixate the call within one of the previous cases), when the call ends, Deskie automatically creates a case with the status “closed” and the assignee.
Capturing missed calls from the user
6. If the user's call goes unanswered, we create a case with a standard subject "Missed call from [phone number]" and a red handset icon to make it easier for agents to identify missed calls in the all cases list:
You can also activate the "Phone" column in the list of cases so that you can immediately see the user's phone number.
However, the grouping of missed calls within one case occurs only if between these calls there was no completed call between the user and the agent. If there was a conversation, we will create a separate case for the next missed call.
Statuses logic
9. If the agent has accepted the user's call, at the end of the conversation, the status of the case will be set to "pending".
How it is reflected in Reports
14. "Overall workload" subsection
New cases in total: the number of new cases on incoming and outgoing calls created in the selected period.
New user cases: the number of new cases on incoming calls created in the selected period.
Reopened cases: the number of cases of incoming and outgoing calls created earlier but reopened in the selected period.
Cases being handled: the number of cases of incoming and outgoing calls, in which agents performed some actions (added responses or notes, changed parameters) in the selected period.
Cases with a response: the number of cases of incoming and outgoing calls, in which there is a record of a conversation between a user and an agent in the selected period.
Closed cases: the number of cases of incoming and outgoing calls closed in the selected period, in which there is a record of conversation between the user and the agent.
15. "Peak load" subsection
New and reopened cases: the sum of new cases created in the selected period and reopened cases on incoming and outgoing calls in the selected period.
Cases being handled: the number of cases on incoming and outgoing calls, in which agents performed some actions (added answers or notes, changed parameters) in the selected period.
16. "Case channels" subsection
New and reopened cases: the sum of new cases created in the selected period and reopened cases on incoming and outgoing calls in the selected period.
Cases being handled: the number of cases on incoming and outgoing calls, in which agents performed some actions (added answers or notes, changed parameters) in the selected period.
Closed cases: the number of cases of incoming and outgoing calls closed in the selected period, in which there is a record of conversation between the user and the agent.
17. "Time metrics" subsection
First response time: cases through the "Calls" channel are not counted in this indicator.
Response time: cases through the "Calls" channel are not counted in this indicator.
Response writing time: cases through the Calls channel are not counted in this indicator.
Number of responses for resolution: when calculating this indicator, messages in cases of incoming and outgoing calls that contain a record of a conversation between a user and an agent during the selected period are taken into account.
Resolution time: the calculation of this indicator takes into account cases of incoming and outgoing calls closed in the selected period, in which the times of creation and closing are different. If the creation and closing times are completely the same, cases are not taken into account, so that the speed does not turn out to be zero.
18. "SLA compliance" subsection
First Response SLA violated: cases through the Calls channel are not counted in this indicator.
Response SLA violated: cases from the "Calls" channel are not counted in this indicator.
Resolution SLA violated: cases of incoming and outgoing calls closed in the selected period, in which creation and closing times are different, are taken into account when calculating this indicator. If the creation and closing times are completely the same, cases are not taken into account, so that the rate does not turn out to be zero.
19. "Leaderboard" subsection
New cases in total: the number of new cases on incoming and outgoing calls created in the selected period.
New user cases: the number of new cases on incoming calls created in the selected period.
Reopened cases: the number of cases of incoming and outgoing calls created earlier but reopened in the selected period.
Cases being handled: the number of cases of incoming and outgoing calls, in which agents performed some actions (added responses or notes, changed parameters) in the selected period.
Cases with a response: the number of cases of incoming and outgoing calls, in which there is a record of a conversation between a user and an agent in the selected period.
First response time: cases through the "Calls" channel are not counted in this indicator.
First Response SLA violated: cases through the Calls channel are not counted in this indicator.
Response time: cases through the "Calls" channel are not counted in this indicator.
Response SLA violated: cases from the "Calls" channel are not counted in this indicator.
Response writing time: cases through the Calls channel are not counted in this indicator.
Total number of responses: the number of messages in cases of incoming and outgoing calls that have a record of a conversation between a user and an agent during the selected period.
Number of responses for resolution: when calculating this indicator, messages in cases of incoming and outgoing calls that contain a record of a conversation between a user and an agent during the selected period are taken into account.
Closed cases: the number of cases of incoming and outgoing calls closed in the selected period, in which there is a record of conversation between the user and the agent.
Resolution time: the calculation of this indicator takes into account cases of incoming and outgoing calls closed in the selected period, in which the times of creation and closing are different. If the creation and closing times are completely the same, cases are not taken into account, so that the speed does not turn out to be zero.
Resolution SLA violated: cases of incoming and outgoing calls closed in the selected period, in which creation and closing times are different, are taken into account when calculating this indicator. If the creation and closing times are completely the same, cases are not taken into account, so that the rate does not turn out to be zero.