@babblevoice/babble-drachtio-callmanager 3.6.17 → 3.6.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.
- package/lib/call.js +14 -6
- package/package.json +1 -1
package/lib/call.js
CHANGED
|
@@ -1437,12 +1437,20 @@ class call {
|
|
|
1437
1437
|
/* we have been requested to auth - so set our state to unauthed */
|
|
1438
1438
|
this.state.authed = false
|
|
1439
1439
|
|
|
1440
|
-
/*
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1440
|
+
/* if we are supplied with an auth header that means it is getting the auth nonce elsewhere - our registrar. */
|
|
1441
|
+
if( this._auth.has( this._req ) ) {
|
|
1442
|
+
/* if the client has supplied the header */
|
|
1443
|
+
if( callmanager.options.registrar && !this._auth.equal( sipauth.parseauthheaders( this._req ) ) ) {
|
|
1444
|
+
const auth = callmanager.options.registrar.getauth( this._req )
|
|
1445
|
+
if( auth ) {
|
|
1446
|
+
this._auth = auth
|
|
1447
|
+
}
|
|
1448
|
+
}
|
|
1449
|
+
|
|
1450
|
+
/* whatever the outcome above, we must immediatly check */
|
|
1451
|
+
await this._onauth( this._req, this._res )
|
|
1452
|
+
return
|
|
1453
|
+
}
|
|
1446
1454
|
|
|
1447
1455
|
this._timers.auth = setTimeout( () => {
|
|
1448
1456
|
this._promises.reject.auth( new SipError( hangupcodes.REQUEST_TIMEOUT, "Auth timed out" ) )
|