diff --git a/frontend/src/components/Telephony/ExotelCallUI.vue b/frontend/src/components/Telephony/ExotelCallUI.vue index 11e7c6ba..f34c1f4d 100644 --- a/frontend/src/components/Telephony/ExotelCallUI.vue +++ b/frontend/src/components/Telephony/ExotelCallUI.vue @@ -431,12 +431,15 @@ function setup() { callStatus.value = updateStatus(data) const { user } = sessionStore() - if ( - !showCallPopup.value && - !showSmallCallPopup.value && - (!data.AgentEmail || data.AgentEmail == (user || user.value)) - ) { - phoneNumber.value = data.DialWhomNumber || data.To + if (!showCallPopup.value && !showSmallCallPopup.value) { + if (data.AgentEmail && data.AgentEmail == (user || user.value)) { + // Incoming call + phoneNumber.value = data.CallFrom || data.From + } else { + // Outgoing call + phoneNumber.value = data.To + } + showCallPopup.value = true } })