@babblevoice/babble-drachtio-callmanager 3.7.12 → 3.7.14
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/index.js +1 -1
- package/lib/call.js +15 -9
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -7,7 +7,7 @@ const projectrtp = require( "@babblevoice/projectrtp" ).projectrtp
|
|
|
7
7
|
const default_options = {
|
|
8
8
|
"preferedcodecs": "g722 ilbc pcmu pcma",
|
|
9
9
|
//"transcode": true, - this never made it into the software - TODO
|
|
10
|
-
"uactimeout":
|
|
10
|
+
"uactimeout": 32000, /* timeout when calling a client: Default: 64 × T1 = 32 seconds */
|
|
11
11
|
"seexpire": 1800*1000, /* session expires timeout mS recomended in RFC 4028 - 30 minutes */
|
|
12
12
|
"rfc2833": true, /* Enable RFC 2833 - DTMF */
|
|
13
13
|
"late": false, /* Late negotiation */
|
package/lib/call.js
CHANGED
|
@@ -1553,7 +1553,7 @@ class call {
|
|
|
1553
1553
|
return
|
|
1554
1554
|
}
|
|
1555
1555
|
|
|
1556
|
-
const authtimeoutms =
|
|
1556
|
+
const authtimeoutms = 5000
|
|
1557
1557
|
this._timers.auth = setTimeout( () => {
|
|
1558
1558
|
/* something has overtaken events and cleaned us up already */
|
|
1559
1559
|
if( !this._promises.reject ) return
|
|
@@ -4041,14 +4041,20 @@ class call {
|
|
|
4041
4041
|
if ( 301 == err.status || 302 == err.status && options.parent ) {
|
|
4042
4042
|
const calltorefer = options.parent
|
|
4043
4043
|
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4044
|
+
const mf = parseInt( newcall.options.headers[ "max-forwards" ] )
|
|
4045
|
+
/* a phone should never forward if we indicate this - but to be sure */
|
|
4046
|
+
if( 0 !== mf ) {
|
|
4047
|
+
calltorefer.state.refered = true
|
|
4048
|
+
// @ts-ignore
|
|
4049
|
+
calltorefer.referingtouri = parseuri( err.res.getParsedHeader( "contact" )[ 0 ].uri )
|
|
4050
|
+
// @ts-ignore
|
|
4051
|
+
calltorefer.referedby = newcall
|
|
4049
4052
|
|
|
4050
|
-
|
|
4051
|
-
|
|
4053
|
+
newcall.detach()
|
|
4054
|
+
|
|
4055
|
+
calltorefer._em.emit( "call.referred", calltorefer )
|
|
4056
|
+
callmanager.options.em.emit( "call.referred", calltorefer )
|
|
4057
|
+
}
|
|
4052
4058
|
}
|
|
4053
4059
|
} catch( e ) { console.error( e ) }
|
|
4054
4060
|
}
|
|
@@ -4081,7 +4087,7 @@ class call {
|
|
|
4081
4087
|
*/
|
|
4082
4088
|
#setdialog( d ) {
|
|
4083
4089
|
clearTimeout( this._timers.newuac )
|
|
4084
|
-
this._timers.newuac
|
|
4090
|
+
delete this._timers.newuac
|
|
4085
4091
|
|
|
4086
4092
|
if( this.destroyedcancelledorhungup ) return
|
|
4087
4093
|
|