@babblevoice/babble-drachtio-callmanager 2.3.16 → 2.3.18

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 +13 -8
  2. package/package.json +1 -1
package/lib/call.js CHANGED
@@ -1862,7 +1862,7 @@ class call {
1862
1862
  other.sdp.local = this_sdp
1863
1863
 
1864
1864
  /* reinvite will pick up on this */
1865
- const selectedcodec = this.selectedcodec
1865
+ const selectedcodec = other.selectedcodec
1866
1866
  other.selectedcodec = this.selectedcodec
1867
1867
  this.selectedcodec = selectedcodec
1868
1868
  return this
@@ -1874,14 +1874,19 @@ class call {
1874
1874
  */
1875
1875
  async reinvite() {
1876
1876
 
1877
- this.sdp.local
1878
- .clearcodecs()
1879
- .addcodecs( this.selectedcodec )
1880
- .select( this.selectedcodec )
1881
- .setaudiodirection( "sendrecv" )
1877
+ this.sdp.local = sdpgen.create().addcodecs( this.selectedcodec )
1878
+ this.sdp.local.setaudioport( this.channels.audio.local.port )
1879
+ .setconnectionaddress( this.channels.audio.local.address )
1882
1880
 
1883
- if( true === callmanager.options.rfc2833 ) {
1884
- this.sdp.local.addcodecs( "2833" )
1881
+ this.#checkandadd2833()
1882
+
1883
+ /* DTLS is only supported ( outbound ) on websocket connections */
1884
+ if( this._iswebrtc ) {
1885
+ this.sdp.local
1886
+ .addssrc( this.channels.audio.local.ssrc )
1887
+ .secure( this.channels.audio.local.dtls.fingerprint ,"passive" )
1888
+ .addicecandidates( this.channels.audio.local.address, this.channels.audio.local.port, this.channels.audio.local.icepwd )
1889
+ .rtcpmux()
1885
1890
  }
1886
1891
 
1887
1892
  const remotesdp = await this._dialog.modify( this.sdp.local.toString() )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babblevoice/babble-drachtio-callmanager",
3
- "version": "2.3.16",
3
+ "version": "2.3.18",
4
4
  "description": "Call processing to create a PBX",
5
5
  "main": "index.js",
6
6
  "scripts": {