fix: call type doctype, fixes

This commit is contained in:
Subin Tom
2022-02-25 16:52:25 +05:30
parent 00b0f10100
commit 5b79496f05
9 changed files with 105 additions and 22 deletions

View File

@@ -34,14 +34,14 @@ def handle_end_call(**kwargs):
@frappe.whitelist(allow_guest=True)
def handle_missed_call(**kwargs):
status = ""
CallType = kwargs.get("CallType")
DialCallStatus = kwargs.get("DialCallStatus")
call_type = kwargs.get("CallType")
dial_call_status = kwargs.get("DialCallStatus")
if CallType == "incomplete" and DialCallStatus == "no-answer":
if call_type == "incomplete" and dial_call_status == "no-answer":
status = 'No Answer'
elif CallType == "client-hangup" and DialCallStatus == "canceled":
elif call_type == "client-hangup" and dial_call_status == "canceled":
status = 'Canceled'
elif CallType == "incomplete" and DialCallStatus == "failed":
elif call_type == "incomplete" and dial_call_status == "failed":
status = 'Failed'
update_call_log(kwargs, status)