mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 08:40:38 +00:00
fixes for LCC dial where a relative url is given as actionhook (#1282)
* fixes for LCC dial where a relative url is given as actionhook * update to speech-utils 0.2.15 with configurable tmp folder location
This commit is contained in:
@@ -1426,6 +1426,14 @@ class CallSession extends Emitter {
|
||||
method: 'POST'
|
||||
};
|
||||
}
|
||||
|
||||
/* if given a relative url then send to same base url as current session */
|
||||
if (this.requestor._isRelativeUrl(opts.call_hook?.url)) {
|
||||
opts.call_hook.url = `${this.requestor.baseUrl}${opts.call_hook?.url}`;
|
||||
}
|
||||
if (this.requestor._isRelativeUrl(opts.call_status_hook?.url)) {
|
||||
opts.call_status_hook.url = `${this.requestor.baseUrl}${opts.call_status_hook?.url}`;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -27,10 +27,13 @@ class RestCallSession extends CallSession {
|
||||
}
|
||||
|
||||
this.on('callStatusChange', this._notifyCallStatusChange.bind(this));
|
||||
this._notifyCallStatusChange({
|
||||
callStatus: CallStatus.Trying,
|
||||
sipStatus: 100,
|
||||
sipReason: 'Trying'
|
||||
|
||||
setImmediate(() => {
|
||||
this._notifyCallStatusChange({
|
||||
callStatus: CallStatus.Trying,
|
||||
sipStatus: 100,
|
||||
sipReason: 'Trying'
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user