@babblevoice/babble-drachtio-callmanager 3.5.0 → 3.5.2
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 -2
- package/package.json +1 -1
package/lib/call.js
CHANGED
|
@@ -343,6 +343,7 @@ class call {
|
|
|
343
343
|
* @private
|
|
344
344
|
*/
|
|
345
345
|
this._em = new events.EventEmitter()
|
|
346
|
+
this._em.setMaxListeners( 0 )
|
|
346
347
|
|
|
347
348
|
/**
|
|
348
349
|
* copy default
|
|
@@ -1191,6 +1192,7 @@ class call {
|
|
|
1191
1192
|
/**
|
|
1192
1193
|
Called from newuac when we receive a 183
|
|
1193
1194
|
@private
|
|
1195
|
+
@returns { Promise }
|
|
1194
1196
|
*/
|
|
1195
1197
|
async _onearly() {
|
|
1196
1198
|
|
|
@@ -3369,7 +3371,7 @@ class call {
|
|
|
3369
3371
|
newcall.#confignetwork( options )
|
|
3370
3372
|
await newcall.#openchannelsfornewuac()
|
|
3371
3373
|
|
|
3372
|
-
let newdialog
|
|
3374
|
+
let newdialog, earlypromise
|
|
3373
3375
|
try {
|
|
3374
3376
|
newdialog = await callmanager.options.srf.createUAC(
|
|
3375
3377
|
options.contact + newcall.options.contactparams,
|
|
@@ -3420,7 +3422,7 @@ class call {
|
|
|
3420
3422
|
if( 180 === res.status ) {
|
|
3421
3423
|
newcall._onring()
|
|
3422
3424
|
} else if( 183 === res.status ) {
|
|
3423
|
-
|
|
3425
|
+
earlypromise = newcall._onearly()
|
|
3424
3426
|
}
|
|
3425
3427
|
|
|
3426
3428
|
if( newcall.canceled ) {
|
|
@@ -3432,6 +3434,8 @@ class call {
|
|
|
3432
3434
|
newcall.#onnewuaccatch( err )
|
|
3433
3435
|
}
|
|
3434
3436
|
|
|
3437
|
+
if( earlypromise ) await earlypromise
|
|
3438
|
+
|
|
3435
3439
|
if( !newdialog ) {
|
|
3436
3440
|
if( callbacks.fail ) callbacks.fail( newcall )
|
|
3437
3441
|
return newcall
|