@babblevoice/babble-drachtio-callmanager 3.7.29 → 3.7.31
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/lib/call.js +8 -5
- package/package.json +1 -1
package/lib/call.js
CHANGED
|
@@ -3049,6 +3049,11 @@ class call {
|
|
|
3049
3049
|
} )
|
|
3050
3050
|
}
|
|
3051
3051
|
|
|
3052
|
+
/* ICE Lite: prefer srflx/relay over host candidates as host
|
|
3053
|
+
candidates may be unreachable RFC1918 addresses behind NAT */
|
|
3054
|
+
const nonhost = candidates.filter( ( c ) => "host" !== c.type )
|
|
3055
|
+
if( 0 < nonhost.length ) candidates = nonhost
|
|
3056
|
+
|
|
3052
3057
|
candidates.sort( ( l, r ) => { return r.priority - l.priority } )
|
|
3053
3058
|
target.port = candidates[ 0 ].port
|
|
3054
3059
|
|
|
@@ -3793,19 +3798,17 @@ class call {
|
|
|
3793
3798
|
return this
|
|
3794
3799
|
}
|
|
3795
3800
|
|
|
3796
|
-
const hangups = []
|
|
3797
3801
|
if( this.parent ) {
|
|
3802
|
+
const hangups = []
|
|
3798
3803
|
for( const child of this.parent.children ) {
|
|
3799
3804
|
if( child !== this ) {
|
|
3800
3805
|
child.detach()
|
|
3801
|
-
/* do not await - we do not want to delay the winner in
|
|
3802
|
-
connecting by waiting for the completion of the hangups */
|
|
3803
3806
|
hangups.push( child.hangup( hangupcodes.LOSE_RACE ) )
|
|
3804
3807
|
}
|
|
3805
3808
|
}
|
|
3809
|
+
/* do not block the winner - race losers complete in background */
|
|
3810
|
+
Promise.all( hangups ).catch( ( e ) => console.error( e ) )
|
|
3806
3811
|
}
|
|
3807
|
-
|
|
3808
|
-
await Promise.all( hangups )
|
|
3809
3812
|
callstore.set( this )
|
|
3810
3813
|
|
|
3811
3814
|
if ( this._dialog.sip )
|