@tiledesk/tiledesk-server 2.15.5 → 2.15.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
🚀 IN PRODUCTION 🚀
|
|
6
6
|
(https://www.npmjs.com/package/@tiledesk/tiledesk-server/v/2.3.77)
|
|
7
7
|
|
|
8
|
+
# 2.15.6
|
|
9
|
+
- Updated voice-twilio-connector to 0.3.2
|
|
10
|
+
- Updated vxml-connector to 0.1.91
|
|
11
|
+
|
|
8
12
|
# 2.15.5
|
|
9
13
|
- Fixed email flooding when smart assignment is active and there are no operators available
|
|
10
14
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tiledesk/tiledesk-server",
|
|
3
3
|
"description": "The Tiledesk server module",
|
|
4
|
-
"version": "2.15.
|
|
4
|
+
"version": "2.15.6",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"start": "node ./bin/www",
|
|
7
7
|
"pretest": "mongodb-runner start",
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"@tiledesk/tiledesk-sms-connector": "^0.1.13",
|
|
51
51
|
"@tiledesk/tiledesk-telegram-connector": "^0.1.14",
|
|
52
52
|
"@tiledesk/tiledesk-tybot-connector": "^2.0.44",
|
|
53
|
-
"@tiledesk/tiledesk-voice-twilio-connector": "^0.
|
|
54
|
-
"@tiledesk/tiledesk-vxml-connector": "^0.1.
|
|
53
|
+
"@tiledesk/tiledesk-voice-twilio-connector": "^0.3.2",
|
|
54
|
+
"@tiledesk/tiledesk-vxml-connector": "^0.1.91",
|
|
55
55
|
"@tiledesk/tiledesk-whatsapp-connector": "1.0.25",
|
|
56
56
|
"@tiledesk/tiledesk-whatsapp-jobworker": "^0.0.13",
|
|
57
57
|
"amqplib": "^0.5.5",
|
|
@@ -56,7 +56,7 @@ function getPooledEmailCache() {
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
/** TTL in seconds: do not send pooled email again for the same request within this window (avoids flooding when smart assignment retries) */
|
|
59
|
-
const POOLED_EMAIL_THROTTLE_TTL = Number(process.env.POOLED_EMAIL_THROTTLE_TTL) ||
|
|
59
|
+
const POOLED_EMAIL_THROTTLE_TTL = Number(process.env.POOLED_EMAIL_THROTTLE_TTL) || 259200;
|
|
60
60
|
|
|
61
61
|
class RequestNotification {
|
|
62
62
|
|
|
@@ -39,10 +39,17 @@ class Listener {
|
|
|
39
39
|
let log = process.env.VOICE_LOG || false
|
|
40
40
|
winston.debug("Voice log: "+ log);
|
|
41
41
|
|
|
42
|
+
const baseUrl = apiUrl + "/modules/voice";
|
|
43
|
+
winston.debug("Voice baseUrl: "+ baseUrl);
|
|
44
|
+
|
|
45
|
+
const relativeBaseUrl = process.env.API_ENDPOINT + "/modules/voice";
|
|
46
|
+
winston.debug("Voice relativeBaseUrl: "+ relativeBaseUrl);
|
|
47
|
+
|
|
42
48
|
voice.startApp({
|
|
43
49
|
MONGODB_URI: config.databaseUri,
|
|
44
50
|
dbconnection: dbConnection,
|
|
45
|
-
BASE_URL:
|
|
51
|
+
BASE_URL: baseUrl,
|
|
52
|
+
RELATIVE_BASE_URL: relativeBaseUrl,
|
|
46
53
|
REDIS_HOST: host,
|
|
47
54
|
REDIS_PORT: port,
|
|
48
55
|
REDIS_PASSWORD: password,
|
|
@@ -10,25 +10,21 @@ const dbConnection = mongoose.connection;
|
|
|
10
10
|
|
|
11
11
|
class Listener {
|
|
12
12
|
|
|
13
|
-
listen(config) {
|
|
14
|
-
|
|
13
|
+
async listen(config) {
|
|
15
14
|
winston.info("TwilioVoice Listener listen");
|
|
16
|
-
if (config.databaseUri) {
|
|
17
|
-
winston.debug("TwilioVoice config databaseUri: " + config.databaseUri);
|
|
18
|
-
}
|
|
19
15
|
|
|
20
16
|
var port = process.env.CACHE_REDIS_PORT || 6379;
|
|
21
|
-
winston.debug("Redis port: "+ port);
|
|
17
|
+
winston.debug("Redis port: " + port);
|
|
22
18
|
|
|
23
|
-
var host = process.env.CACHE_REDIS_HOST || "127.0.0.1"
|
|
24
|
-
winston.debug("Redis host: "+ host);
|
|
19
|
+
var host = process.env.CACHE_REDIS_HOST || "127.0.0.1";
|
|
20
|
+
winston.debug("Redis host: " + host);
|
|
25
21
|
|
|
26
22
|
var password = process.env.CACHE_REDIS_PASSWORD;
|
|
27
|
-
winston.debug("Redis password: "+ password);
|
|
23
|
+
winston.debug("Redis password: " + password);
|
|
28
24
|
|
|
29
25
|
let brand_name = null;
|
|
30
26
|
if (process.env.BRAND_NAME) {
|
|
31
|
-
brand_name = process.env.BRAND_NAME
|
|
27
|
+
brand_name = process.env.BRAND_NAME;
|
|
32
28
|
}
|
|
33
29
|
|
|
34
30
|
let openai_endpoint = process.env.OPENAI_ENDPOINT;
|
|
@@ -36,31 +32,46 @@ class Listener {
|
|
|
36
32
|
|
|
37
33
|
let gpt_key = process.env.GPTKEY;
|
|
38
34
|
|
|
39
|
-
let
|
|
35
|
+
let elevenlabs_endpoint = process.env.ELEVENLABS_ENDPOINT || "https://api.elevenlabs.io";
|
|
36
|
+
winston.debug("ElevenLabs Endpoint: ", elevenlabs_endpoint);
|
|
37
|
+
|
|
38
|
+
const baseUrl = apiUrl + "/modules/voice-twilio";
|
|
39
|
+
winston.debug("Voice baseUrl: "+ baseUrl);
|
|
40
|
+
|
|
41
|
+
const relativeBaseUrl = process.env.API_ENDPOINT + "/modules/voice-twilio";
|
|
42
|
+
winston.debug("Voice relativeBaseUrl: "+ relativeBaseUrl);
|
|
43
|
+
|
|
44
|
+
let log = process.env.VOICE_TWILIO_LOG || 'error'
|
|
40
45
|
winston.debug("Voice log: "+ log);
|
|
41
46
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
47
|
+
try {
|
|
48
|
+
// startServer is async and returns a Promise (no callback)
|
|
49
|
+
await voice_twilio.init({
|
|
50
|
+
MONGODB_URI: config.databaseUri,
|
|
51
|
+
dbconnection: dbConnection,
|
|
52
|
+
BASE_URL: baseUrl,
|
|
53
|
+
RELATIVE_BASE_URL: relativeBaseUrl,
|
|
54
|
+
BASE_FILE_URL: apiUrl,
|
|
55
|
+
REDIS_HOST: host,
|
|
56
|
+
REDIS_PORT: port,
|
|
57
|
+
REDIS_PASSWORD: password,
|
|
58
|
+
BRAND_NAME: brand_name,
|
|
59
|
+
OPENAI_ENDPOINT: openai_endpoint,
|
|
60
|
+
GPT_KEY: gpt_key,
|
|
61
|
+
ELEVENLABS_ENDPOINT: elevenlabs_endpoint,
|
|
62
|
+
VOICE_TWILIO_LOG: log
|
|
63
|
+
})
|
|
64
|
+
|
|
65
|
+
winston.info("Tiledesk Twilio Voice Connector proxy server successfully started.");
|
|
66
|
+
|
|
67
|
+
} catch (err) {
|
|
68
|
+
winston.error("Unable to start Tiledesk Twilio Voice Connector. " + err);
|
|
69
|
+
throw err; // Re-throw if you want to handle the error upstream
|
|
70
|
+
}
|
|
71
|
+
|
|
61
72
|
}
|
|
62
73
|
}
|
|
63
74
|
|
|
64
75
|
let listener = new Listener();
|
|
65
76
|
|
|
66
|
-
module.exports = listener;
|
|
77
|
+
module.exports = listener;
|