From 1273d14c3642eb5b8637acc616827d410fb3aed4 Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Thu, 23 Jan 2025 16:51:20 +0530 Subject: [PATCH] fix: update receiver while updating call log --- crm/integrations/exotel/handler.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crm/integrations/exotel/handler.py b/crm/integrations/exotel/handler.py index add2267c3..6629570dd 100644 --- a/crm/integrations/exotel/handler.py +++ b/crm/integrations/exotel/handler.py @@ -277,6 +277,12 @@ def update_call_log(call_payload, status="Ringing", call_log=None): call_log.recording_url = call_payload.get("RecordingUrl") call_log.start_time = call_payload.get("StartTime") call_log.end_time = call_payload.get("EndTime") + + if direction == "incoming": + call_log.receiver = call_payload.get("AgentEmail") + else: + call_log.caller = frappe.session.user + call_log.save(ignore_permissions=True) frappe.db.commit() return call_log