fix: Decouple call popup from exotel

This commit is contained in:
Suraj Shetty
2019-06-17 08:46:38 +05:30
parent 3fdeffff7a
commit 5ea6a5e33a
3 changed files with 19 additions and 13 deletions

View File

@@ -1,5 +1,4 @@
import frappe
from erpnext.crm.doctype.utils import get_employee_emails_for_popup
import requests
# api/method/erpnext.erpnext_integrations.exotel_integration.handle_incoming_call
@@ -17,14 +16,9 @@ def handle_incoming_call(*args, **kwargs):
call_log = get_call_log(kwargs)
employee_emails = get_employee_emails_for_popup(kwargs.get('To'))
for email in employee_emails:
frappe.publish_realtime('show_call_popup', call_log, user=email)
@frappe.whitelist(allow_guest=True)
def handle_end_call(*args, **kwargs):
call_log = update_call_log(kwargs, 'Completed')
frappe.publish_realtime('call_disconnected', call_log)
@frappe.whitelist(allow_guest=True)
def handle_missed_call(*args, **kwargs):