@ipcom/asterisk-ari 0.0.133 → 0.0.135
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/cjs/index.cjs
CHANGED
|
@@ -953,7 +953,9 @@ var ChannelInstance = class extends import_events.EventEmitter {
|
|
|
953
953
|
);
|
|
954
954
|
const wsClient2 = this.client.getWebSocketClients().get(this.app);
|
|
955
955
|
if (wsClient2) {
|
|
956
|
-
|
|
956
|
+
setTimeout(() => {
|
|
957
|
+
wsClient2.removeScopedChannelListeners(this.id, this.app);
|
|
958
|
+
}, 5e3);
|
|
957
959
|
} else {
|
|
958
960
|
console.warn(
|
|
959
961
|
`WebSocketClient n\xE3o encontrado para o app '${this.app}'.`
|
|
@@ -1021,6 +1023,7 @@ var ChannelInstance = class extends import_events.EventEmitter {
|
|
|
1021
1023
|
}
|
|
1022
1024
|
const scopedEvent = `${this.app}:Channel:${this.id}:${event}`;
|
|
1023
1025
|
wsClient.off(scopedEvent, callback);
|
|
1026
|
+
wsClient.removeScopedChannelListeners(this.id, this.app);
|
|
1024
1027
|
return this;
|
|
1025
1028
|
}
|
|
1026
1029
|
async answer() {
|
|
@@ -1104,8 +1107,11 @@ var ChannelInstance = class extends import_events.EventEmitter {
|
|
|
1104
1107
|
console.log(
|
|
1105
1108
|
`Canal '${this.id}' foi destru\xEDdo. Removendo listeners associados.`
|
|
1106
1109
|
);
|
|
1107
|
-
|
|
1108
|
-
|
|
1110
|
+
setTimeout(() => {
|
|
1111
|
+
console.log(`Removendo listeners associados ao canal '${this.id}'.`);
|
|
1112
|
+
wsClient.removeScopedChannelListeners(this.id, this.app);
|
|
1113
|
+
wsClient.removeScopedPlaybackListeners(playback.id, this.app);
|
|
1114
|
+
}, 5e3);
|
|
1109
1115
|
});
|
|
1110
1116
|
return playback;
|
|
1111
1117
|
}
|