ahs-cti 0.0.2-beta.7 → 0.0.2-beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +5 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3458,6 +3458,7 @@ function CallControls({ onDataChange }) {
|
|
|
3458
3458
|
"process_id": 101,
|
|
3459
3459
|
"process_name": "ConVoxProcess"
|
|
3460
3460
|
};
|
|
3461
|
+
setProcessList([data]);
|
|
3461
3462
|
sdkStateManager.setProcess(data);
|
|
3462
3463
|
}).catch((err) => {
|
|
3463
3464
|
showToast(err.response.data.message, "error");
|
|
@@ -3473,7 +3474,7 @@ function CallControls({ onDataChange }) {
|
|
|
3473
3474
|
}
|
|
3474
3475
|
}, [state.agentId]);
|
|
3475
3476
|
const connectWebSocket = () => {
|
|
3476
|
-
var _a3, _b2
|
|
3477
|
+
var _a3, _b2;
|
|
3477
3478
|
if (!state.agentId) {
|
|
3478
3479
|
return;
|
|
3479
3480
|
}
|
|
@@ -3482,7 +3483,7 @@ function CallControls({ onDataChange }) {
|
|
|
3482
3483
|
reconnectTimeoutRef.current = null;
|
|
3483
3484
|
}
|
|
3484
3485
|
try {
|
|
3485
|
-
webSocketRef.current = new WebSocket(`${(_a3 = state.urlConfig) == null ? void 0 : _a3.webSocketURL}?
|
|
3486
|
+
webSocketRef.current = new WebSocket(`${(_a3 = state.urlConfig) == null ? void 0 : _a3.webSocketURL}/api/v1/ws/agent/events?token=${(_b2 = state.authorization) == null ? void 0 : _b2.accessToken}`);
|
|
3486
3487
|
webSocketRef.current.onopen = () => {
|
|
3487
3488
|
console.log("\u{1F310} WebSocket connection established");
|
|
3488
3489
|
reconnectAttemptsRef.current = 0;
|
|
@@ -3500,7 +3501,7 @@ function CallControls({ onDataChange }) {
|
|
|
3500
3501
|
}, 3e4);
|
|
3501
3502
|
};
|
|
3502
3503
|
webSocketRef.current.onmessage = (event) => {
|
|
3503
|
-
var _a4, _b3,
|
|
3504
|
+
var _a4, _b3, _c2, _d2, _e2;
|
|
3504
3505
|
try {
|
|
3505
3506
|
const data = JSON.parse(event.data);
|
|
3506
3507
|
if (data.type === "pong") {
|
|
@@ -3579,7 +3580,7 @@ function CallControls({ onDataChange }) {
|
|
|
3579
3580
|
isMergeCall: false
|
|
3580
3581
|
}
|
|
3581
3582
|
]);
|
|
3582
|
-
if ((data == null ? void 0 : data.mode) !== "manual" && audioRef.current && ((
|
|
3583
|
+
if ((data == null ? void 0 : data.mode) !== "manual" && audioRef.current && ((_c2 = state == null ? void 0 : state.sdkConfig) == null ? void 0 : _c2.enableRingtone)) {
|
|
3583
3584
|
audioRef.current.play().catch((error) => {
|
|
3584
3585
|
console.error("Failed to play ringtone:", error);
|
|
3585
3586
|
});
|