NTP-26125 | fixed connected event
This commit is contained in:
@@ -117,32 +117,19 @@ class CallStateManager {
|
||||
this.state.customerCallStatus = data?.status;
|
||||
this.state.crtObjectId = data?.crtObjectId;
|
||||
|
||||
// If we detect a connected state from customer call update
|
||||
if (data?.status === 'connected' && !this.state.isConnected) {
|
||||
this.state.isConnected = true;
|
||||
this.sendConnectedMessage();
|
||||
}
|
||||
|
||||
// Handle call disconnection
|
||||
// Keep disconnect handling
|
||||
if (data?.isDisposing && data?.status === 'hungup') {
|
||||
this.handleCallDisconnect();
|
||||
}
|
||||
}
|
||||
|
||||
private handleCustomerCallCreated(data: any) {
|
||||
// Store customer call information
|
||||
this.state.customerInfo = {
|
||||
...this.state.customerInfo,
|
||||
phoneNumber: data?.phone,
|
||||
crtObjectId: data?.crtObjectId,
|
||||
callId: data?.callId
|
||||
};
|
||||
|
||||
// If we're already in a connected state but missed the event
|
||||
if (data?.status === 'connected' && !this.state.isConnected) {
|
||||
this.state.isConnected = true;
|
||||
this.sendConnectedMessage();
|
||||
}
|
||||
}
|
||||
|
||||
private handleCRMCreate(data: any) {
|
||||
|
||||
Reference in New Issue
Block a user