arnacon-webrtc-service 0.1.39 → 0.1.40
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/package.json
CHANGED
|
@@ -67,12 +67,24 @@ function createBridgeApi({
|
|
|
67
67
|
}
|
|
68
68
|
session._bridgeDisposers = [];
|
|
69
69
|
}
|
|
70
|
+
const isWinnerLockedLoser = reason === "mr-loser-winner-locked";
|
|
70
71
|
try {
|
|
72
|
+
if (isWinnerLockedLoser) {
|
|
73
|
+
// Losing leg should get a clear "someone else answered" semantic before hangup.
|
|
74
|
+
sendDataChannelMessage(sessionId, { msgType: "call", action: "reject", reason: "cancelled-answered-elsewhere" });
|
|
75
|
+
}
|
|
71
76
|
sendDataChannelMessage(sessionId, { msgType: "call", action: "end", reason });
|
|
72
77
|
} catch (_) {}
|
|
73
|
-
|
|
78
|
+
const finalize = () => {
|
|
79
|
+
if (typeof destroySession !== "function") return;
|
|
74
80
|
try { destroySession(sessionId, false); } catch (_) {}
|
|
81
|
+
};
|
|
82
|
+
if (isWinnerLockedLoser) {
|
|
83
|
+
// Give DC control messages a short chance to flush before tearing down.
|
|
84
|
+
setTimeout(finalize, 250);
|
|
85
|
+
return;
|
|
75
86
|
}
|
|
87
|
+
finalize();
|
|
76
88
|
}
|
|
77
89
|
|
|
78
90
|
function getCallerNumberLabel(identity) {
|