Files
contact-front/src/const/ctiConst.ts

23 lines
987 B
TypeScript

import type {CtiCallPhase} from "@/lib/cti/ctiClient";
export const CTI_AGENT_GROUP = "KRI_CONTACT";
export const CTI_CALL_PHASE: CtiCallPhase[] = [
'dialing',
'active'
] as const;
// WS 서버가 보내는 CTIAgentStatus 값 중 통화 중 또는 통화 중 재로그인 대기로 간주할 값들
export const CTI_ON_CALL_STATUSES = ["0", "2", "3"] as const;
// localStorage에 저장한 CTI 상태의 만료 시간. 마지막 저장(updatedAt) 기준이며 복원 시점에만 검사한다.
export const CTI_STATE_TTL_MS = 2 * 60 * 60 * 1000;
// 상대가 받기 전(dialing) 상태의 최대 유지 시간. 이 시간 안에 StartSessionRecord/CallClosed가 없으면
// 종료 신호를 놓친 것으로 보고 idle로 되돌린다.
export const CTI_DIALING_TIMEOUT_MS = 30 * 1000;
// 처리하지 않는 오류(ZCommand에 Error 포함) alert를 같은 ZCommand에 대해 다시 띄우기까지의 최소 간격
export const CTI_ERROR_ALERT_THROTTLE_MS = 10 * 1000;