@babblevoice/babble-drachtio-callmanager 3.7.16 → 3.7.17

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.
Files changed (2) hide show
  1. package/lib/call.js +19 -11
  2. package/package.json +1 -1
package/lib/call.js CHANGED
@@ -750,6 +750,20 @@ class call {
750
750
  }
751
751
  }
752
752
 
753
+ /**
754
+ *
755
+ * @param { object } startingpoint
756
+ * @param { object } other
757
+ */
758
+ #calledidother( startingpoint, other ) {
759
+ if( "uas" === other.type ) {
760
+ other.#calledidforuas( startingpoint )
761
+ other.#overridecalledid( startingpoint )
762
+ } else {
763
+ other.#calleridforuac( startingpoint )
764
+ }
765
+ }
766
+
753
767
  /**
754
768
  *
755
769
  * @returns { object }
@@ -824,10 +838,10 @@ class call {
824
838
  if( this.options.partycalling ) {
825
839
  const other = this.other
826
840
  if( other ) {
827
- other.#fromdestination( startingpoint )
828
- other.#fromoutentity( startingpoint )
841
+ this.#calledidother( startingpoint, other )
842
+ } else {
843
+ this.#fromrefertouri( startingpoint )
829
844
  }
830
- this.#fromrefertouri( startingpoint )
831
845
  } else {
832
846
  this.#calledidforuac( startingpoint )
833
847
  }
@@ -3786,21 +3800,15 @@ class call {
3786
3800
  #configcalleridfornewuac() {
3787
3801
 
3788
3802
  let callerid, calleridrem
3803
+ let party = ";party=calling"
3789
3804
 
3790
- const direction = this.direction
3791
-
3792
- if( "inbound" === direction ) {
3805
+ if( "inbound" === this.direction ) {
3793
3806
  callerid = this.calledid
3794
3807
  calleridrem = this.calledid
3795
3808
  } else {
3796
3809
  callerid = this.callerid
3797
3810
  calleridrem = this.callerid
3798
- }
3799
-
3800
- let party = ";party=calling"
3801
- if( "outbound" === direction ) {
3802
3811
  party = ";party=called"
3803
- this.#fromrefertouri( calleridrem )
3804
3812
  }
3805
3813
 
3806
3814
  const calleridstr = `"${callerid.name?callerid.name:callerid.user}" <sip:${callerid.user}@${callerid.host}>`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babblevoice/babble-drachtio-callmanager",
3
- "version": "3.7.16",
3
+ "version": "3.7.17",
4
4
  "description": "Call processing to create a PBX",
5
5
  "main": "index.js",
6
6
  "scripts": {