@voicenter-team/opensips-js 1.0.13 → 1.0.14
Sign up to get free protection for your applications and to get access to all the features.
- package/build/index.js +7 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
@@ -567,8 +567,14 @@ class OpenSIPSJS extends UA_1.default {
|
|
567
567
|
if (target.toString().length === 0) {
|
568
568
|
return console.error('Target must be passed');
|
569
569
|
}
|
570
|
-
this._updateCallStatus({ callId, isTransferring: true });
|
571
570
|
const call = activeCalls[callId];
|
571
|
+
console.log('callTransfer', call);
|
572
|
+
if (!call._is_confirmed && !call._is_canceled) {
|
573
|
+
console.log('refer', `sip:${target}@${this.sipDomain}`);
|
574
|
+
call.refer(`sip:${target}@${this.sipDomain}`);
|
575
|
+
return;
|
576
|
+
}
|
577
|
+
this._updateCallStatus({ callId, isTransferring: true });
|
572
578
|
call.refer(`sip:${target}@${this.sipDomain}`);
|
573
579
|
this.updateCall(call);
|
574
580
|
}
|