@subiz/wsclient 4.0.1 → 4.0.2
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 +1 -1
- package/webrtc.js +13 -1
package/package.json
CHANGED
package/webrtc.js
CHANGED
|
@@ -144,11 +144,23 @@ function WebRTCConn(options) {
|
|
|
144
144
|
if (!callid || callid == '*' || callid == '-') {
|
|
145
145
|
let calls = Object.assign({}, activeCalls)
|
|
146
146
|
Object.keys(dialingRequest).map((callid) => {
|
|
147
|
-
let call =
|
|
147
|
+
let call = calls[callid]
|
|
148
148
|
if (!call && dialingRequest[callid]) {
|
|
149
149
|
calls[callid] = dialingRequest[callid]
|
|
150
150
|
}
|
|
151
151
|
})
|
|
152
|
+
|
|
153
|
+
Object.keys(calls, (callid) => {
|
|
154
|
+
let call = calls[callid]
|
|
155
|
+
if (endRequest[callid] && call && call.status != 'ended') {
|
|
156
|
+
calls[callid] = Object.assign({}, call, {
|
|
157
|
+
call_id: callid,
|
|
158
|
+
ended: endRequest[callid],
|
|
159
|
+
status: 'ended',
|
|
160
|
+
hangup_code: 'cancel',
|
|
161
|
+
})
|
|
162
|
+
}
|
|
163
|
+
})
|
|
152
164
|
return calls
|
|
153
165
|
}
|
|
154
166
|
|