@voicenter-team/opensips-js 1.0.13 → 1.0.14
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/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
|
}
|