@babblevoice/babble-drachtio-callmanager 1.3.4 → 1.3.5
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 -2
- package/package.json +1 -1
package/lib/call.js
CHANGED
|
@@ -2295,7 +2295,6 @@ class call {
|
|
|
2295
2295
|
headers: { ...options.headers }
|
|
2296
2296
|
}
|
|
2297
2297
|
|
|
2298
|
-
let remoteidheader = "P-Preferred-Identity"
|
|
2299
2298
|
let name = ""
|
|
2300
2299
|
let user = "0000000000"
|
|
2301
2300
|
let realm = "localhost.localdomain"
|
|
@@ -2311,7 +2310,8 @@ class call {
|
|
|
2311
2310
|
|
|
2312
2311
|
let callerid = `"${name}" <sip:${user}@${realm}>`
|
|
2313
2312
|
|
|
2314
|
-
newcall.options.headers[
|
|
2313
|
+
newcall.options.headers[ "Remote-Party-ID" ] = callerid
|
|
2314
|
+
newcall.options.headers[ "From" ] = callerid
|
|
2315
2315
|
|
|
2316
2316
|
if( options.entity ) {
|
|
2317
2317
|
newcall._entity = options.entity
|
|
@@ -2330,7 +2330,10 @@ class call {
|
|
|
2330
2330
|
// Alert-Info: <http://www.babblevoice.com>;info=ringer2
|
|
2331
2331
|
|
|
2332
2332
|
|
|
2333
|
+
// spread is not recursive
|
|
2334
|
+
const tmpheaders = { ...callmanager.options.headers, ...newcall.options.headers, ...options.headers }
|
|
2333
2335
|
newcall.options = { ...callmanager.options, ...newcall.options, ...options }
|
|
2336
|
+
newcall.options.headers = tmpheaders
|
|
2334
2337
|
|
|
2335
2338
|
newcall._timers.newuac = setTimeout( () => {
|
|
2336
2339
|
newcall.hangup( hangupcodes.REQUEST_TIMEOUT )
|