mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2026-02-13 01:39:26 +00:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
919dafb959 | ||
|
|
85bd21045d | ||
|
|
b598cd94ae | ||
|
|
db4d887efd | ||
|
|
ceb9a7a3bd | ||
|
|
ff5f9acaf8 | ||
|
|
96cdc2936b |
@@ -2028,7 +2028,7 @@ Duration=${duration} `
|
||||
return this._lccDub(opts.dub, callSid);
|
||||
}
|
||||
else if (opts.boostAudioSignal) {
|
||||
return this._lccBoostAudioSignal(opts, callSid);
|
||||
return this._lccBoostAudioSignal(opts.boostAudioSignal, callSid);
|
||||
}
|
||||
else if (opts.media_path) {
|
||||
return this._lccMediaPath(opts.media_path, callSid);
|
||||
|
||||
@@ -195,6 +195,9 @@ class TaskDial extends Task {
|
||||
async exec(cs) {
|
||||
await super.exec(cs);
|
||||
|
||||
/* capture whether A leg was already answered before this dial task started */
|
||||
this._aLegAlreadyAnswered = !!cs.dlg;
|
||||
|
||||
if (this.data.anchorMedia && this.data.exitMediaPath) {
|
||||
this.logger.info('Dial:exec - incompatible anchorMedia and exitMediaPath are both set, will obey anchorMedia');
|
||||
delete this.data.exitMediaPath;
|
||||
@@ -550,7 +553,7 @@ class TaskDial extends Task {
|
||||
let sbcAddress = this.proxy || getSBC();
|
||||
const teamsInfo = {};
|
||||
let fqdn;
|
||||
const forwardPAI = this.forwardPAI ?? JAMBONZ_DIAL_PAI_HEADER; // dial verb overides env var
|
||||
const forwardPAI = this.forwardPAI ?? !JAMBONZ_DIAL_PAI_HEADER; // dial verb overides env var
|
||||
this.logger.debug(forwardPAI, 'forwardPAI value');
|
||||
if (!sbcAddress) throw new Error('no SBC found for outbound call');
|
||||
this.headers = {
|
||||
@@ -872,8 +875,12 @@ class TaskDial extends Task {
|
||||
this.sd = sd;
|
||||
this.callSid = sd.callSid;
|
||||
if (this.earlyMedia) {
|
||||
debug('Dial:_selectSingleDial propagating answer supervision on A leg now that B is connected');
|
||||
await cs.propagateAnswer();
|
||||
if (this._aLegAlreadyAnswered) {
|
||||
debug('Dial:_selectSingleDial A leg was already answered, skipping propagateAnswer');
|
||||
} else {
|
||||
debug('Dial:_selectSingleDial propagating answer supervision on A leg now that B is connected');
|
||||
await cs.propagateAnswer();
|
||||
}
|
||||
}
|
||||
if (this.timeLimit) {
|
||||
this.timerMaxCallDuration = setTimeout(this._onMaxCallDuration.bind(this, cs), this.timeLimit * 1000);
|
||||
|
||||
@@ -152,9 +152,17 @@ class TaskListen extends Task {
|
||||
|
||||
async _startListening(cs, ep) {
|
||||
this._initListeners(ep);
|
||||
const ci = this.nested ? this.parentTask.sd.callInfo : cs.callInfo.toJSON();
|
||||
const tempci = this.nested ? this.parentTask.sd.callInfo : cs.callInfo.toJSON();
|
||||
const ci = structuredClone(tempci);
|
||||
if (this._ignoreCustomerData) {
|
||||
delete ci.customerData;
|
||||
} else {
|
||||
for (const key in ci.customerData) {
|
||||
if (ci.customerData.hasOwnProperty(key)) {
|
||||
const value = ci.customerData[key];
|
||||
ci.customerData[key] = typeof value === 'string' ? escapeString(value) : value;
|
||||
}
|
||||
}
|
||||
}
|
||||
const metadata = Object.assign(
|
||||
{sampleRate: this.sampleRate, mixType: this.mixType},
|
||||
|
||||
Reference in New Issue
Block a user