Skip to content

Commit

Permalink
fix: update receiver while updating call log
Browse files Browse the repository at this point in the history
  • Loading branch information
shariquerik committed Jan 23, 2025
1 parent b2e6c3b commit 1273d14
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crm/integrations/exotel/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1273d14

Please sign in to comment.