diff --git a/crm/twilio/api.py b/crm/twilio/api.py index 91914134..ce1ff21c 100644 --- a/crm/twilio/api.py +++ b/crm/twilio/api.py @@ -148,7 +148,9 @@ def add_note_to_call_log(call_sid, note): if not twilio: return call_details = twilio.get_call_info(call_sid) - frappe.db.set_value("CRM Call Log", call_details.parent_call_sid, "note", note) + sid = call_sid if call_details.direction == 'inbound' else call_details.parent_call_sid + + frappe.db.set_value("CRM Call Log", sid, "note", note) frappe.db.commit() def get_lead_or_deal_from_number(call): diff --git a/frontend/src/components/CallUI.vue b/frontend/src/components/CallUI.vue index 3b999a20..b2bde380 100644 --- a/frontend/src/components/CallUI.vue +++ b/frontend/src/components/CallUI.vue @@ -41,11 +41,11 @@ class="rounded-full" @click="toggleMute" /> -