Feature request: notify Incoming Call Policy owners when a call goes unanswered
Summary
When an Incoming Call Policy ends a call without connecting anyone, nobody is told. The call is recorded in the policy's call log, but no owner, team or workflow is notified. We'd like the policy's owners to be emailed on every missed call, and the call log to be available as a workflow trigger.
Use case
We run a customer support hotline on an Incoming Call Policy with a follow-the-sun hunt chain. If nobody on shift answers, we deliberately do not forward the call to an escalation team. Instead the caller hears our No answer message ("…please create a ticket on and leave a number…") and the call ends.
The escalation team still needs to know that a customer called and couldn't reach anyone, so they can call back or watch for the ticket. Today the only way to find out is to open the call log in the dashboard.
Current behaviour (from reading master)
App/FeatureSet/Notification/API/IncomingCall.tsends a missed call in one of two ways:- the chain is exhausted: log status
NoAnswer, No answer message played - no rule resolves to anyone when the call comes in: log status
Failed, No one available message played
In both cases the only side effect is an update to
IncomingCallLog.- the chain is exhausted: log status
IncomingCallLoghas no@EnableWorkflow, so a workflow can't react to a missed call.NotificationSettingEventTypehas no incoming-call events.Incoming Call Policies have Owners (users and teams), but nothing sends them anything.
IncomingCallStatus.CallerHungUpexists, but nothing sets it as far as I can tell. If the caller hangs up during the hunt, the log stays atRinging/Escalatedwith noendedAt. With a multi-minute hunt this is probably the most common kind of missed call, and it's currently impossible to tell apart from a call that's still in progress.
Proposal
Email policy owners on a missed call. Use the same pattern
OnCallNotificationAlertingService.notifyOfUndeliverablePagealready uses for on-call policies:- recipients: owner users, plus accepted members of owner teams
- fallback: project owners if the policy has no owners
- delivery: direct
MailServiceemail
Send it when the log reaches
NoAnswer,FailedorCallerHungUp. Add a policy setting to turn it on or off (on by default seems right; a missed customer call is never something you want to miss). Suggested email content:- caller number, routing number and policy name
- time of the call
- which rules were tried, who was dialled and each attempt's result
- a link to the call log entry
Enable workflows on
IncomingCallLog(on create and on update), so teams can send missed calls to Slack or Teams, create a ticket, or trigger anything else.Close the log when the caller hangs up. Set
CallerHungUpandendedAt, for example from the inbound call's status callback, so hang-ups are reported and the log is accurate. See #4219
Acceptance criteria
- A call that ends in
NoAnswer,FailedorCallerHungUpsends exactly one email to the policy's owners, or to the project owners if there are none. - A call that connects to an engineer sends nothing.
- Hanging up during the hunt leaves the log as
CallerHungUpwithendedAtset, not open indefinitely. IncomingCallLogappears as a trigger in the workflow builder.
Related: #3689, #3690
Source: OneUptime/oneuptime