webitel-sdk 0.1.190 → 0.1.192
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/bundles/index.esm.js +4 -2
- package/bundles/index.esm.js.map +1 -1
- package/bundles/index.esm.min.js +1 -1
- package/bundles/index.esm.min.js.map +1 -1
- package/bundles/index.umd.js +4 -2
- package/bundles/index.umd.js.map +1 -1
- package/bundles/index.umd.min.js +1 -1
- package/bundles/index.umd.min.js.map +1 -1
- package/esm2015/socket/client.js +3 -2
- package/esm2015/socket/client.js.map +1 -1
- package/esm2015/socket/socket.js +1 -0
- package/esm2015/socket/socket.js.map +1 -1
- package/esm5/socket/client.js +3 -2
- package/esm5/socket/client.js.map +1 -1
- package/esm5/socket/socket.js +1 -0
- package/esm5/socket/socket.js.map +1 -1
- package/package.json +1 -1
- package/types/socket/client.d.ts.map +1 -1
- package/types/socket/socket.d.ts.map +1 -1
package/bundles/index.esm.js
CHANGED
|
@@ -35091,6 +35091,7 @@ class Socket extends EventEmitter {
|
|
|
35091
35091
|
close(code) {
|
|
35092
35092
|
this.socket.close(code || 1000);
|
|
35093
35093
|
delete this.socket;
|
|
35094
|
+
this.onClose(code || 1000);
|
|
35094
35095
|
}
|
|
35095
35096
|
onOpen() {
|
|
35096
35097
|
this.emit('open');
|
|
@@ -35697,8 +35698,9 @@ class Client extends EventEmitter {
|
|
|
35697
35698
|
async pingServer() {
|
|
35698
35699
|
if (this.pingTimer && this.connectionInfo.ping_interval) {
|
|
35699
35700
|
const t = setTimeout(async () => {
|
|
35701
|
+
this.log.error('close socket without pong');
|
|
35700
35702
|
this.socket.close(3005);
|
|
35701
|
-
},
|
|
35703
|
+
}, 2000);
|
|
35702
35704
|
await this.ping();
|
|
35703
35705
|
clearTimeout(t);
|
|
35704
35706
|
}
|
|
@@ -35719,7 +35721,7 @@ class Client extends EventEmitter {
|
|
|
35719
35721
|
}
|
|
35720
35722
|
callBySession(session) {
|
|
35721
35723
|
for (const call of this.allCall()) {
|
|
35722
|
-
if (call.sip === session) {
|
|
35724
|
+
if (call.sip && call.sip.id === session.id) {
|
|
35723
35725
|
return call;
|
|
35724
35726
|
}
|
|
35725
35727
|
}
|