diff --git a/erpnext/erpnext_integrations/doctype/exotel_settings/exotel_settings.py b/erpnext/erpnext_integrations/doctype/exotel_settings/exotel_settings.py
index 763bea0..77de84c 100644
--- a/erpnext/erpnext_integrations/doctype/exotel_settings/exotel_settings.py
+++ b/erpnext/erpnext_integrations/doctype/exotel_settings/exotel_settings.py
@@ -16,6 +16,6 @@
 	def verify_credentials(self):
 		if self.enabled:
 			response = requests.get('https://api.exotel.com/v1/Accounts/{sid}'
-				.format(sid = self.account_sid), auth=(self.account_sid, self.api_token))
+				.format(sid = self.account_sid), auth=(self.api_key, self.api_token))
 			if response.status_code != 200:
 				frappe.throw(_("Invalid credentials"))
\ No newline at end of file
diff --git a/erpnext/erpnext_integrations/exotel_integration.py b/erpnext/erpnext_integrations/exotel_integration.py
index f8b605a..3a922f7 100644
--- a/erpnext/erpnext_integrations/exotel_integration.py
+++ b/erpnext/erpnext_integrations/exotel_integration.py
@@ -1,21 +1,24 @@
 import frappe
 from erpnext.crm.doctype.utils import get_document_with_phone_number
+import requests
+
+# api/method/erpnext.erpnext_integrations.exotel_integration.handle_incoming_call
 
 @frappe.whitelist(allow_guest=True)
 def handle_incoming_call(*args, **kwargs):
-	incoming_phone_number = kwargs.get('CallFrom')
+	# incoming_phone_number = kwargs.get('CallFrom')
 
-	contact = get_document_with_phone_number(incoming_phone_number)
-	last_communication = get_last_communication(incoming_phone_number, contact)
+	# contact = get_document_with_phone_number(incoming_phone_number)
+	# last_communication = get_last_communication(incoming_phone_number, contact)
 	call_log = create_call_log(kwargs)
-	data = {
-		'contact': contact,
-		'call_payload': kwargs,
-		'last_communication': last_communication,
+	data = frappe._dict({
+		'call_from': kwargs.get('CallFrom'),
+		'agent_email': kwargs.get('AgentEmail'),
+		'call_type': kwargs.get('Direction'),
 		'call_log': call_log
-	}
+	})
 
-	frappe.publish_realtime('incoming_call', data)
+	frappe.publish_realtime('show_call_popup', data, user=data.agent_email)
 
 
 def get_last_communication(phone_number, contact):
@@ -23,6 +26,17 @@
 	return {}
 
 def create_call_log(call_payload):
+	communication = frappe.get_all('Communication', {
+		'communication_medium': 'Phone',
+		'call_id': call_payload.get('CallSid'),
+	}, limit=1)
+
+	if communication:
+		log = frappe.get_doc('Communication', communication[0].name)
+		log.call_status = 'Connected'
+		log.save(ignore_permissions=True)
+		return log
+
 	communication = frappe.new_doc('Communication')
 	communication.subject = frappe._('Call from {}').format(call_payload.get("CallFrom"))
 	communication.communication_medium = 'Phone'
@@ -33,9 +47,34 @@
 	communication.status = 'Open'
 	communication.sent_or_received = 'Received'
 	communication.content = 'call_payload'
+	communication.call_status = 'Incoming'
 	communication.communication_date = call_payload.get('StartTime')
-	# communication.sid = call_payload.get('CallSid')
-	# communication.exophone = call_payload.get('CallTo')
-	# communication.call_receiver = call_payload.get('DialWhomNumber')
+	communication.call_id = call_payload.get('CallSid')
 	communication.save(ignore_permissions=True)
 	return communication
+
+def get_call_status(call_id):
+	settings = get_exotel_settings()
+	response = requests.get('https://{api_key}:{api_token}@api.exotel.com/v1/Accounts/erpnext/{sid}/{call_id}.json'.format(
+		api_key=settings.api_key,
+		api_token=settings.api_token,
+		call_id=call_id
+	))
+	return response.json()
+
+@frappe.whitelist(allow_guest=True)
+def make_a_call(from_number, to_number, caller_id):
+	settings = get_exotel_settings()
+	response = requests.post('https://{api_key}:{api_token}@api.exotel.com/v1/Accounts/{sid}/Calls/connect.json'.format(
+		api_key=settings.api_key,
+		api_token=settings.api_token,
+	), data={
+		'From': from_number,
+		'To': to_number,
+		'CallerId': caller_id
+	})
+
+	return response.json()
+
+def get_exotel_settings():
+	return frappe.get_single('Exotel Settings')
\ No newline at end of file
