diff --git a/lib/tasks/dial.js b/lib/tasks/dial.js index f9975e60..1d780709 100644 --- a/lib/tasks/dial.js +++ b/lib/tasks/dial.js @@ -100,6 +100,7 @@ class TaskDial extends Task { this.referHook = this.data.referHook; this.dtmfHook = this.data.dtmfHook; this.proxy = this.data.proxy; + this.tag = this.data.tag; if (this.dtmfHook) { const {parentDtmfCollector, childDtmfCollector} = parseDtmfOptions(logger, this.data.dtmfCapture || {}); diff --git a/lib/utils/place-outdial.js b/lib/utils/place-outdial.js index 54036a3c..b5d8ddbd 100644 --- a/lib/utils/place-outdial.js +++ b/lib/utils/place-outdial.js @@ -195,6 +195,10 @@ class SingleDialer extends Emitter { callSid: this.callSid, traceId: this.rootSpan.traceId }); + if (this.dialTask && this.dialTask.tag !== null && + typeof this.dialTask.tag === 'object' && !Array.isArray(this.dialTask.tag)) { + this.callInfo.customerData = this.dialTask.tag; + } this.logger = srf.locals.parentLogger.child({ callSid: this.callSid, parentCallSid: this.parentCallInfo.callSid,