From 6b0a6ce6f396be88f0d3aaf57ec949bee1305a10 Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Sat, 11 Jan 2025 18:23:22 +0530 Subject: [PATCH] fix: callback at in-progress and completed status --- crm/integrations/exotel/handler.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crm/integrations/exotel/handler.py b/crm/integrations/exotel/handler.py index 741c2588..6314a71f 100644 --- a/crm/integrations/exotel/handler.py +++ b/crm/integrations/exotel/handler.py @@ -79,6 +79,7 @@ def make_a_call(from_number, to_number, caller_id=None, link_to_document=None): "Record": "true" if record_call else "false", "StatusCallback": get_status_updater_url(), "StatusCallbackEvents[0]": "terminal", + "StatusCallbackEvents[1]": "answered" }, ) response.raise_for_status() @@ -163,6 +164,8 @@ def get_call_log_status(call_payload, direction): status = call_payload.get("Status") if status == "completed": return "Completed" + elif status == "in-progress": + return "In Progress" elif status == "busy": return "Ringing" elif status == "no-answer":