mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 16:50:39 +00:00
generate trace id before outdial so we can include it in custom header (#418)
* generate trace id before outdial so we can include it in custom header * logging * logging * fix #420 race condition on rest outdial when ws is used * revert unnecessary logging change
This commit is contained in:
@@ -63,6 +63,7 @@ class TaskRestDial extends Task {
|
||||
this.canCancel = false;
|
||||
const cs = this.callSession;
|
||||
cs.setDialog(dlg);
|
||||
this.logger.debug('TaskRestDial:_onConnect - call connected');
|
||||
|
||||
try {
|
||||
const b3 = this.getTracingPropagation();
|
||||
@@ -90,8 +91,10 @@ class TaskRestDial extends Task {
|
||||
}
|
||||
let tasks;
|
||||
if (this.app_json) {
|
||||
this.logger.debug('TaskRestDial: using app_json from task data');
|
||||
tasks = JSON.parse(this.app_json);
|
||||
} else {
|
||||
this.logger.debug({call_hook: this.call_hook}, 'TaskRestDial: retrieving application');
|
||||
tasks = await cs.requestor.request('session:new', this.call_hook, params, httpHeaders);
|
||||
}
|
||||
if (tasks && Array.isArray(tasks)) {
|
||||
|
||||
Reference in New Issue
Block a user