261102_07_FIX: 통화 중 새로고침 시 컨택 페이지 이탈 방지 및 CTI 송수신 로그 추가
This commit is contained in:
@@ -756,6 +756,7 @@ const send = (command: Record<string, string>): boolean => {
|
||||
if (!socket || socket.readyState !== WebSocket.OPEN) return false;
|
||||
try {
|
||||
socket.send(JSON.stringify(command));
|
||||
console.log("[CTI][TEMP_LOG] send ->", command); // TEMP_CTI_LOG
|
||||
return true;
|
||||
} catch {
|
||||
return false;
|
||||
@@ -817,7 +818,10 @@ const openSocketAndLogin = (params: CtiLoginParams) => {
|
||||
AgentGroup: CTI_AGENT_GROUP, ANINumber: params.aniNumber, AgentPhone: params.agentPhone });
|
||||
};
|
||||
ws.onmessage = (event) => {
|
||||
if (socket === ws) handleIncomingMessage(event.data);
|
||||
if (socket === ws) {
|
||||
console.log("[CTI][TEMP_LOG] message <-", event.data); // TEMP_CTI_LOG
|
||||
handleIncomingMessage(event.data);
|
||||
}
|
||||
};
|
||||
ws.onerror = () => console.warn("[CTI] WebSocket 연결 오류");
|
||||
ws.onclose = () => {
|
||||
|
||||
Reference in New Issue
Block a user