fix failing testcase

This commit is contained in:
Quan HL
2023-05-07 17:25:13 +07:00
parent 4f486b2c0a
commit 522469ca89
2 changed files with 6 additions and 5 deletions

View File

@@ -13,7 +13,6 @@ class CallInfo {
this.direction = opts.direction;
this.traceId = opts.traceId;
this.callTerminationBy = undefined;
this.metadata = opts.metadata;
if (opts.req) {
const u = opts.req.getParsedHeader('from');
const uri = parseUri(u.uri);
@@ -92,7 +91,7 @@ class CallInfo {
this.from = from || req.callingNumber;
this.to = to;
if (tag) this._customerData = tag;
if (this.metadata) this._customerData = {...this._customerData, ...this.metadata};
if (opts.metadata) this._customerData = {...this._customerData, ...opts.metadata};
}
this.localSipAddress = srf.locals.localSipAddress;