@babblevoice/babble-drachtio-callmanager 3.7.27 → 3.7.28

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/README.md CHANGED
@@ -167,7 +167,7 @@ If you want to test then projectrtp needs to be able to build locally, this uses
167
167
  ```bash
168
168
  docker run --rm -it \
169
169
  -e HOME=/usr/src/app \
170
- -v "$(pwd)":/usr/src/app \
170
+ -v "$(pwd)":/usr/src/app:Z \
171
171
  -w /usr/src/app \
172
172
  tinpotnick/projectrtp \
173
173
  npm test
@@ -179,10 +179,10 @@ or for a specific test
179
179
  ```bash
180
180
  docker run --rm -it \
181
181
  -e HOME=/usr/src/app \
182
- -v "$(pwd)":/usr/src/app \
182
+ -v "$(pwd)":/usr/src/app:Z \
183
183
  -w /usr/src/app \
184
184
  tinpotnick/projectrtp \
185
- ./node_modules/mocha/bin/mocha --recursive --check-leaks --grep 'Create call and send 183 - early - SAVPF'
185
+ ./node_modules/mocha/bin/_mocha --recursive --check-leaks --grep 'Create call and send 183 - early - SAVPF'
186
186
 
187
187
  ```
188
188
 
package/lib/call.js CHANGED
@@ -1567,6 +1567,7 @@ class call {
1567
1567
  .secure( ch.local.dtls.fingerprint, this.#getsrtpsetup( this.channels.secure.audio ) )
1568
1568
  .addicecandidates( ch.local.address, ch.local.port, ch.local.icepwd )
1569
1569
  .rtcpmux()
1570
+ .icelite()
1570
1571
  }
1571
1572
 
1572
1573
  try {
@@ -1925,6 +1926,7 @@ class call {
1925
1926
  .secure( this.channels.audio.local.dtls.fingerprint, this.#getsrtpsetup( this.channels.secure.audio ) )
1926
1927
  .addicecandidates( this.channels.audio.local.address, this.channels.audio.local.port, this.channels.audio.local.icepwd )
1927
1928
  .rtcpmux()
1929
+ .icelite()
1928
1930
  }
1929
1931
  }
1930
1932
  }
@@ -3773,6 +3775,7 @@ class call {
3773
3775
  .secure( this.channels.audio.local.dtls.fingerprint, this.#getsrtpsetup( this.channels.secure.audio ) )
3774
3776
  .addicecandidates( this.channels.audio.local.address, this.channels.audio.local.port, this.channels.audio.local.icepwd )
3775
3777
  .rtcpmux()
3778
+ .icelite()
3776
3779
  }
3777
3780
  }
3778
3781
 
package/lib/sdp.js CHANGED
@@ -583,6 +583,12 @@ class sdp {
583
583
  return this
584
584
  }
585
585
 
586
+ icelite() {
587
+ // @ts-ignore
588
+ this.sdp.icelite = "ice-lite"
589
+ return this
590
+ }
591
+
586
592
  clearcodecs() {
587
593
 
588
594
  this.sdp.media.forEach( m => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babblevoice/babble-drachtio-callmanager",
3
- "version": "3.7.27",
3
+ "version": "3.7.28",
4
4
  "description": "Call processing to create a PBX",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -297,6 +297,29 @@ a=ssrc:2706351154 label:83ac3abd-cc86-427a-9cb7-ebac0c73964a`.replace(/(\r\n|\n|
297
297
 
298
298
  expect( clean ).to.match( /^a=group:BUNDLE 0/m )
299
299
  expect( clean ).to.match( /^a=mid:0/m )
300
+ expect( clean ).to.not.match( /^a=ice-lite/m )
301
+
302
+ } )
303
+
304
+ it( "sdp webrtc generate with ice-lite", async function() {
305
+
306
+ const oursdp = sdp.create()
307
+ .addcodecs( "pcma" )
308
+ .setconnectionaddress( "127.0.0.1" )
309
+ .setaudioport( 4 )
310
+ .addssrc( 44 )
311
+ .secure( "ourfingerprint", "active" )
312
+ .addicecandidates( "127.0.0.1", 4 )
313
+ .rtcpmux()
314
+ .icelite()
315
+
316
+ expect( oursdp.sdp.icelite ).to.equal( "ice-lite" )
317
+
318
+ const oursdpstr = oursdp.toString()
319
+ const clean = oursdpstr.trim().replace( /\r/g, "" )
320
+
321
+ expect( clean ).to.match( /^a=ice-lite/m )
322
+ expect( clean ).to.match( /^a=group:BUNDLE 0/m )
300
323
 
301
324
  } )
302
325