Первое, что необходимо сделать - настроить входящий WebHook:
Настройте изображением, название и скопируйте сгенерированный входящий URL.
Дальше, в public маршрутизации нашего городского номера на событие OnDisconnect добавляем:
Данный код проверяет на отмену звонка пользователем и выполняет httpRequest в slack:
{ "if": { "expression": "${DIALSTATUS} == 'CANCEL'", "then": [ { "httpRequest": { "url": "https://hooks.slack.com/services/T3xxHP/Bxx1B/Taxxx25", "method": "POST", "data": { "attachments": [ { "fallback": "Abandoned call ${effective_caller_id_name} from ${caller_id_number} to ${destination_number}.", "color": "#DC143C", "pretext": "Abandoned call: ${effective_caller_id_name}", "text": "from ${caller_id_number} to ${destination_number}", "fields": [ { "title": "Priority", "value": "High", "short": false } ] } ] } } } ] } } |
Теперь, если мы пропустили звонок, то webitel отправит уведомление в чат:
Related articles appear here based on the labels you select. Click to edit the macro and add or change labels.
|