mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-22 01:27:55 +00:00
change refer to implementation
This commit is contained in:
@@ -198,9 +198,9 @@ class Cognigy extends Task {
|
|||||||
return say;
|
return say;
|
||||||
}
|
}
|
||||||
|
|
||||||
_makeReferTask(number) {
|
_makeReferTask(referTo) {
|
||||||
const refer = makeTask(this.logger, {'sip:refer': {
|
const refer = makeTask(this.logger, {'sip:refer': {
|
||||||
referTo: number,
|
referTo,
|
||||||
referredBy: 'cognigy'
|
referredBy: 'cognigy'
|
||||||
}});
|
}});
|
||||||
return refer;
|
return refer;
|
||||||
@@ -282,7 +282,7 @@ class Cognigy extends Task {
|
|||||||
this._enqueueTask(async() => {
|
this._enqueueTask(async() => {
|
||||||
this.performAction({cognigyResult: 'hangup Succeeded'});
|
this.performAction({cognigyResult: 'hangup Succeeded'});
|
||||||
this.reportedFinalAction = true;
|
this.reportedFinalAction = true;
|
||||||
cs.replaceApplication([this._makeReferTask(evt.data.reason)]);
|
cs.replaceApplication([this._makeHangupTask(evt.data.reason)]);
|
||||||
cs.replaceApplication([{hangup: {
|
cs.replaceApplication([{hangup: {
|
||||||
headers: {
|
headers: {
|
||||||
'X-Reason': evt.data.reason
|
'X-Reason': evt.data.reason
|
||||||
@@ -296,7 +296,7 @@ class Cognigy extends Task {
|
|||||||
this._enqueueTask(async() => {
|
this._enqueueTask(async() => {
|
||||||
this.performAction({cognigyResult: 'refer succeeded'});
|
this.performAction({cognigyResult: 'refer succeeded'});
|
||||||
this.reportedFinalAction = true;
|
this.reportedFinalAction = true;
|
||||||
cs.replaceApplication([this._makeReferTask(evt.data.number)]);
|
cs.replaceApplication([this._makeReferTask(evt.data.referTo)]);
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
default:
|
default:
|
||||||
|
|||||||
Reference in New Issue
Block a user