@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.
Files changed (2) hide show
  1. package/build/index.js +7 -1
  2. 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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voicenter-team/opensips-js",
3
- "version": "1.0.13",
3
+ "version": "1.0.14",
4
4
  "description": "The JS package for opensips",
5
5
  "default": "src/index.ts",
6
6
  "main": "build/index.js",