@babblevoice/babble-drachtio-callmanager 1.6.5 → 1.6.6
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 +6 -1
- package/lib/callmanager.js +4 -2
- package/package.json +1 -1
package/lib/call.js
CHANGED
|
@@ -1181,9 +1181,13 @@ class call {
|
|
|
1181
1181
|
let authorization = this._auth.parseauthheaders( this._req )
|
|
1182
1182
|
|
|
1183
1183
|
if( undefined === callmanager.options.userlookup ) {
|
|
1184
|
-
|
|
1184
|
+
console.trace( "no userlookup function provided" )
|
|
1185
|
+
this._promises.reject.auth()
|
|
1185
1186
|
this._promises.resolve.auth = false
|
|
1186
1187
|
this._promises.reject.auth = false
|
|
1188
|
+
if( this._timers.auth ) clearTimeout( this._timers.auth )
|
|
1189
|
+
this._timers.auth = false
|
|
1190
|
+
|
|
1187
1191
|
return
|
|
1188
1192
|
}
|
|
1189
1193
|
|
|
@@ -1922,6 +1926,7 @@ class call {
|
|
|
1922
1926
|
|
|
1923
1927
|
this.detach()
|
|
1924
1928
|
if( this.channels.audio ) this.channels.audio.unmix()
|
|
1929
|
+
if( othercall.channels.audio ) othercall.channels.audio.unmix()
|
|
1925
1930
|
if( othercall.channels.audio && this.moh ) othercall.channels.audio.play( this.moh )
|
|
1926
1931
|
|
|
1927
1932
|
res.send( 202 )
|
package/lib/callmanager.js
CHANGED
|
@@ -69,13 +69,15 @@ class callmanager {
|
|
|
69
69
|
|
|
70
70
|
/**
|
|
71
71
|
Register callback to handle newcall events.
|
|
72
|
-
@param {string} event - the event type - only "call" supported
|
|
72
|
+
@param {string} event - the event type - only "call.in" supported
|
|
73
73
|
@param {oncallCallback} cb
|
|
74
74
|
*/
|
|
75
75
|
on( event, cb ) {
|
|
76
|
-
if( "call" === event ) {
|
|
76
|
+
if( "call" === event || "call.in" === event /* prefered - more descriptive */ ) {
|
|
77
77
|
this.onnewcall = cb
|
|
78
|
+
return
|
|
78
79
|
}
|
|
80
|
+
this.options.em.on( event, cb )
|
|
79
81
|
}
|
|
80
82
|
|
|
81
83
|
/**
|