@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.
Files changed (2) hide show
  1. package/lib/call.js +5 -2
  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[ remoteidheader ] = callerid
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 )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babblevoice/babble-drachtio-callmanager",
3
- "version": "1.3.4",
3
+ "version": "1.3.5",
4
4
  "description": "Call processing to create a PBX",
5
5
  "main": "index.js",
6
6
  "scripts": {