mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 16:50:39 +00:00
Support sip_parent_callid for sbc-outbound (#939)
* include X-CID for dial outbound if the call-session is outbound * include X-CID for dial outbound if the call-session is outbound * include X-CID for dial outbound if the call-session is outbound * include X-CID for dial outbound if the call-session is outbound
This commit is contained in:
@@ -484,7 +484,7 @@ class TaskDial extends Task {
|
||||
}
|
||||
|
||||
async _attemptCalls(cs) {
|
||||
const {req, srf} = cs;
|
||||
const {req, callInfo, direction, srf} = cs;
|
||||
const {getSBC} = srf.locals;
|
||||
const {lookupTeamsByAccount, lookupAccountBySid} = srf.locals.dbHelpers;
|
||||
const {lookupCarrier, lookupCarrierByPhoneNumber} = dbUtils(this.logger, cs.srf);
|
||||
@@ -496,6 +496,7 @@ class TaskDial extends Task {
|
||||
this.headers = {
|
||||
'X-Account-Sid': cs.accountSid,
|
||||
...(req && req.has('X-CID') && {'X-CID': req.get('X-CID')}),
|
||||
...(direction === 'outbound' && callInfo.sbcCallid && {'X-CID': callInfo.sbcCallid}),
|
||||
...(req && req.has('P-Asserted-Identity') && !JAMBONZ_DISABLE_DIAL_PAI_HEADER &&
|
||||
{'P-Asserted-Identity': req.get('P-Asserted-Identity')}),
|
||||
...(req && req.has('X-Voip-Carrier-Sid') && {'X-Voip-Carrier-Sid': req.get('X-Voip-Carrier-Sid')}),
|
||||
|
||||
Reference in New Issue
Block a user