mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 08:40:38 +00:00
LCC: add conference hold and unhold actions
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
const Task = require('./task');
|
||||
const {TaskName, TaskPreconditions} = require('../utils/constants');
|
||||
const bent = require('bent');
|
||||
const { v4: uuidv4 } = require('uuid');
|
||||
|
||||
class TaskMessage extends Task {
|
||||
constructor(logger, opts) {
|
||||
@@ -8,13 +9,11 @@ class TaskMessage extends Task {
|
||||
this.preconditions = TaskPreconditions.None;
|
||||
|
||||
this.payload = {
|
||||
message_sid: this.data.message_sid,
|
||||
message_sid: this.data.message_sid || uuidv4(),
|
||||
provider: this.data.provider,
|
||||
to: this.data.to,
|
||||
from: this.data.from,
|
||||
cc: this.data.cc,
|
||||
text: this.data.text,
|
||||
media: this.data.media
|
||||
text: this.data.text
|
||||
};
|
||||
|
||||
}
|
||||
@@ -30,7 +29,7 @@ class TaskMessage extends Task {
|
||||
let payload = this.payload;
|
||||
await super.exec(cs);
|
||||
try {
|
||||
const {getSBC, getSmpp, dbHelpers} = srf.locals;
|
||||
const {getSmpp, dbHelpers} = srf.locals;
|
||||
const {lookupSmppGateways} = dbHelpers;
|
||||
|
||||
this.logger.info(`looking up gateways for account_sid: ${accountSid}`);
|
||||
@@ -50,13 +49,14 @@ class TaskMessage extends Task {
|
||||
};
|
||||
}
|
||||
else {
|
||||
//TMP: smpp only at the moment, need to add http back in
|
||||
/*
|
||||
this.logger.info({gw, accountSid, provider: this.payload.provider},
|
||||
'Message:exec - no smpp gateways found to send message');
|
||||
relativeUrl = 'v1/outboundSMS';
|
||||
const sbcAddress = getSBC();
|
||||
if (sbcAddress) url = `http://${sbcAddress}:3000/`;
|
||||
|
||||
//TMP: smpp only at the moment, need to add http back in
|
||||
*/
|
||||
return res.sendStatus(404);
|
||||
}
|
||||
if (url) {
|
||||
|
||||
Reference in New Issue
Block a user