From d1524e1c9ac01c91e3640c2f90c5698b8014cf30 Mon Sep 17 00:00:00 2001 From: liamcottle Date: Tue, 21 May 2024 00:16:39 +1200 Subject: [PATCH] allow hanging up active calls --- public/call.html | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/public/call.html b/public/call.html index 515bd31..e1b0741 100644 --- a/public/call.html +++ b/public/call.html @@ -132,12 +132,22 @@ Direction: Inbound -
- + + + +
@@ -324,6 +334,19 @@ }; }, + async hangupCall(callHash) { + try { + + // hangup call + await axios.get(`/api/v1/calls/${callHash}/hangup`); + + // reload calls list + await this.updateCallsList(); + + } catch(e) { + alert("failed to hangup call"); + } + }, leaveCall: function() { // mute mic