@babblevoice/babble-drachtio-callmanager 3.7.17 → 3.7.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 +5 -0
- package/lib/callmanager.js +14 -5
- package/package.json +1 -1
package/lib/call.js
CHANGED
|
@@ -519,6 +519,11 @@ class call {
|
|
|
519
519
|
parsed = this._req.getParsedHeader( "remote-party-id" )
|
|
520
520
|
}
|
|
521
521
|
|
|
522
|
+
/*
|
|
523
|
+
bug in dratchio - this._req.has( "remote-party-id" ) returns
|
|
524
|
+
name actually quoted in the string.
|
|
525
|
+
*/
|
|
526
|
+
if( parsed.name ) parsed.name = parsed.name.replace( /^["']+|["']+$/g, '' )
|
|
522
527
|
return parsed
|
|
523
528
|
}
|
|
524
529
|
|
package/lib/callmanager.js
CHANGED
|
@@ -39,13 +39,21 @@ class callmanager {
|
|
|
39
39
|
async _oninvite( req, res, next ) {
|
|
40
40
|
if( "INVITE" !== req.msg.method ) return next()
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
"
|
|
42
|
+
let calldesc
|
|
43
|
+
|
|
44
|
+
try {
|
|
45
|
+
calldesc = {
|
|
46
|
+
"callid": req.getParsedHeader( "call-id" ),
|
|
47
|
+
"tags": {
|
|
48
|
+
"remote": req.getParsedHeader( "from" ).params.tag,
|
|
49
|
+
"local": ""
|
|
50
|
+
}
|
|
47
51
|
}
|
|
52
|
+
} catch( e ) {
|
|
53
|
+
console.error( e )
|
|
54
|
+
return
|
|
48
55
|
}
|
|
56
|
+
|
|
49
57
|
|
|
50
58
|
let c = await callstore.getbycallid( calldesc )
|
|
51
59
|
if( c ) return c._onauth( req, res )
|
|
@@ -54,6 +62,7 @@ class callmanager {
|
|
|
54
62
|
c = await call.frominvite( req, res )
|
|
55
63
|
} catch( e ) {
|
|
56
64
|
console.error( e )
|
|
65
|
+
return
|
|
57
66
|
}
|
|
58
67
|
|
|
59
68
|
if( this.onnewcall ) {
|