mirror of
https://github.com/jambonz/verb-specifications.git
synced 2026-03-27 18:38:21 +00:00
Compare commits
268 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fe095be5c8 | ||
|
|
71caf6bb53 | ||
|
|
887320fd5d | ||
|
|
f0ffdee9c6 | ||
|
|
1013db46d3 | ||
|
|
8771e3f22f | ||
|
|
ff757d3177 | ||
|
|
5745cc9a29 | ||
|
|
2b81fe20f0 | ||
|
|
60a33e11eb | ||
|
|
9717ce6d58 | ||
|
|
49ffe5f526 | ||
|
|
61590b66cc | ||
|
|
d8cf684bf6 | ||
|
|
e039261eb5 | ||
|
|
23e726ed3f | ||
|
|
e1bc5adc55 | ||
|
|
76e2486535 | ||
|
|
dfcf1de210 | ||
|
|
7d19707dec | ||
|
|
b4856e9d05 | ||
|
|
577191ed0d | ||
|
|
ee2ffff20d | ||
|
|
4c5b795498 | ||
|
|
7ecd46393c | ||
|
|
8fffe39195 | ||
|
|
23cb499244 | ||
|
|
fb94dc94cb | ||
|
|
30677b6cd1 | ||
|
|
4ea9cda0f8 | ||
|
|
a0b9f963c2 | ||
|
|
841a471faa | ||
|
|
44112f67b3 | ||
|
|
1f7c98c0ce | ||
|
|
276a55e672 | ||
|
|
840db61042 | ||
|
|
85e1b64ee4 | ||
|
|
8ed54e2d51 | ||
|
|
c24fb7996c | ||
|
|
6c24ad1145 | ||
|
|
af3955cb35 | ||
|
|
1ee29749c3 | ||
|
|
dea57e0910 | ||
|
|
f444a57bcd | ||
|
|
a9a2339821 | ||
|
|
95f3a06625 | ||
|
|
985476e8b1 | ||
|
|
1782db362e | ||
|
|
e654ee9e10 | ||
|
|
38d1d04c4a | ||
|
|
5cbd3886d1 | ||
|
|
de8dfc9202 | ||
|
|
637431468d | ||
|
|
4a817c97b2 | ||
|
|
ce44bf41d4 | ||
|
|
ab84583eff | ||
|
|
13901713b8 | ||
|
|
85fd68af16 | ||
|
|
5a5a397a68 | ||
|
|
b85c7ac743 | ||
|
|
82c6952f70 | ||
|
|
fc95fa3d02 | ||
|
|
6b3ee83d08 | ||
|
|
3700ba6607 | ||
|
|
09a76f44cb | ||
|
|
aa445c1edb | ||
|
|
57887a660c | ||
|
|
e9dace6495 | ||
|
|
762a9639bd | ||
|
|
2740eb9848 | ||
|
|
1a525e7a3e | ||
|
|
f16b49cc23 | ||
|
|
1cc7dae926 | ||
|
|
8c50bf8764 | ||
|
|
e2bffbe0a8 | ||
|
|
4b79b1408b | ||
|
|
900d517b8a | ||
|
|
104ca00a3d | ||
|
|
7b3dd92c18 | ||
|
|
43a2805ea8 | ||
|
|
f9e6755d8d | ||
|
|
264640bbc7 | ||
|
|
71d31952d6 | ||
|
|
6a80506a81 | ||
|
|
85b1c3a2f9 | ||
|
|
f59137ebad | ||
|
|
7b80ba6fd5 | ||
|
|
216e6954af | ||
|
|
027cce284d | ||
|
|
9a8194b360 | ||
|
|
0bcfa783b7 | ||
|
|
9a3fb68fe7 | ||
|
|
f2ea3f3913 | ||
|
|
6a75a8b98a | ||
|
|
2af0fd4415 | ||
|
|
46688934bc | ||
|
|
afce20a206 | ||
|
|
e80679fd07 | ||
|
|
aa86d0b3e6 | ||
|
|
60f4bcd97a | ||
|
|
cb8b51da4a | ||
|
|
d9fd63850b | ||
|
|
e57c81aeed | ||
|
|
610b14736a | ||
|
|
4a8517cab5 | ||
|
|
21bb3c2b73 | ||
|
|
e044621bbc | ||
|
|
6d8ffc9d80 | ||
|
|
941ba6aa8c | ||
|
|
1d8cf321a7 | ||
|
|
0d8b9de099 | ||
|
|
08e01efa7f | ||
|
|
1fdda56c39 | ||
|
|
8db0a91521 | ||
|
|
6432d9e64b | ||
|
|
c029a18c3e | ||
|
|
27b1a06944 | ||
|
|
0f9c096988 | ||
|
|
569b994356 | ||
|
|
9b639a9591 | ||
|
|
6242514b6e | ||
|
|
6f5884f7be | ||
|
|
d5bc910907 | ||
|
|
2f6696bbf8 | ||
|
|
2c19b34922 | ||
|
|
c5d977da50 | ||
|
|
a6f64710c1 | ||
|
|
3463528127 | ||
|
|
030eb5f847 | ||
|
|
f8d07d340a | ||
|
|
8a96b05f23 | ||
|
|
a6a942c1c6 | ||
|
|
85fa4714fb | ||
|
|
d047892fff | ||
|
|
11bb83f703 | ||
|
|
c5a263ee68 | ||
|
|
47f8a593f5 | ||
|
|
c9d2c9aa4d | ||
|
|
1ce577c8c9 | ||
|
|
dc0abfad02 | ||
|
|
1e9285b9d9 | ||
|
|
f3f048d94f | ||
|
|
a737d8bcbb | ||
|
|
c3d69e614e | ||
|
|
9277e053a6 | ||
|
|
954f9479c9 | ||
|
|
58385e791b | ||
|
|
85aaab5856 | ||
|
|
d70324485b | ||
|
|
2cf2c15586 | ||
|
|
f6ad050a32 | ||
|
|
ba02161f74 | ||
|
|
fabf9255ea | ||
|
|
3f1e7cbd3b | ||
|
|
ff6bea3168 | ||
|
|
4ea66245d4 | ||
|
|
faa99cdce3 | ||
|
|
d017e739b1 | ||
|
|
764383cf43 | ||
|
|
3f19ce4a24 | ||
|
|
1e6b24181c | ||
|
|
63aa94a9ec | ||
|
|
d4614c2ad1 | ||
|
|
7da6165b93 | ||
|
|
ad76081fa7 | ||
|
|
ce94e943d2 | ||
|
|
436fb557dc | ||
|
|
203b8600a8 | ||
|
|
b877ca52d0 | ||
|
|
cdb671d25d | ||
|
|
6ae0aff8b1 | ||
|
|
9a2a22dd88 | ||
|
|
369583d536 | ||
|
|
77d203ca80 | ||
|
|
9cb550f49e | ||
|
|
de88976293 | ||
|
|
60efb4b9af | ||
|
|
49ac048477 | ||
|
|
e653a62c49 | ||
|
|
f41aae81c6 | ||
|
|
5707f7d4d4 | ||
|
|
f75871dc46 | ||
|
|
98fa56bd3d | ||
|
|
e1b9abef9e | ||
|
|
22b118534b | ||
|
|
733a4760fe | ||
|
|
3deb8759db | ||
|
|
79cdfc73d4 | ||
|
|
9b7358d6b4 | ||
|
|
4bb25941bf | ||
|
|
42ff6170b6 | ||
|
|
873d8dc0c8 | ||
|
|
992a5fe897 | ||
|
|
6803a3e49d | ||
|
|
2d2145917e | ||
|
|
4fa8d46fd8 | ||
|
|
9690e14f64 | ||
|
|
49752d16ea | ||
|
|
9e141cba6a | ||
|
|
82e2bc5239 | ||
|
|
3a5b053248 | ||
|
|
d74364b1c2 | ||
|
|
213d7596d2 | ||
|
|
3d4df422e1 | ||
|
|
3531711991 | ||
|
|
f860074a24 | ||
|
|
65de44012a | ||
|
|
067a49bd2c | ||
|
|
4967efa745 | ||
|
|
61669e5574 | ||
|
|
e25ef7349e | ||
|
|
26f5609996 | ||
|
|
1a1436b612 | ||
|
|
ba9a9f9b60 | ||
|
|
93c368e894 | ||
|
|
185e4df06e | ||
|
|
c22e8c9cf0 | ||
|
|
1c3d86c807 | ||
|
|
7e986acc17 | ||
|
|
d5c535c02c | ||
|
|
6e819279d1 | ||
|
|
24e73a4dc6 | ||
|
|
cfd367f185 | ||
|
|
f472de9638 | ||
|
|
45a2a039cd | ||
|
|
4a345633a3 | ||
|
|
f14ff2e319 | ||
|
|
c85cb7e67e | ||
|
|
8ccb13f962 | ||
|
|
044ce2d4bb | ||
|
|
b483e04611 | ||
|
|
c1032638b2 | ||
|
|
72225385ae | ||
|
|
6ad9d2bce0 | ||
|
|
045df8a9fe | ||
|
|
f3ede17b80 | ||
|
|
2551dbe18e | ||
|
|
f4a887a67a | ||
|
|
874abac5e3 | ||
|
|
827ddcebf0 | ||
|
|
98043693be | ||
|
|
436c8e1861 | ||
|
|
21214eb2ce | ||
|
|
017b8cd0c3 | ||
|
|
8ae7419b7a | ||
|
|
11c34aa6fc | ||
|
|
5548a67412 | ||
|
|
8f89bac676 | ||
|
|
146f691890 | ||
|
|
283512e765 | ||
|
|
d7219b990b | ||
|
|
68b3c7de01 | ||
|
|
dff94d3ac5 | ||
|
|
70f7c5ab96 | ||
|
|
403766cd4d | ||
|
|
10c7f60bad | ||
|
|
32f63759db | ||
|
|
825130348b | ||
|
|
f99b94a405 | ||
|
|
6c40dda566 | ||
|
|
899f55a272 | ||
|
|
22a6b30aa3 | ||
|
|
430a702752 | ||
|
|
8dbbe13c5f | ||
|
|
35e140f69e | ||
|
|
0a85aae84f | ||
|
|
590db8aafa | ||
|
|
c996a67dc2 |
2
LICENSE
2
LICENSE
@@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2023 jambonz
|
Copyright (c) 2023 Drachtio Communications Services, LLC.
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# verb-specificiations
|
# verb-specifications
|
||||||
Jambonz Verb Specification Utilities
|
Jambonz Verb Specification Utilities
|
||||||
|
|
||||||
#### Running the test suite
|
#### Running the test suite
|
||||||
|
|||||||
4
index.js
4
index.js
@@ -0,0 +1,4 @@
|
|||||||
|
module.exports = {
|
||||||
|
...require('./jambonz-app-json-validation'),
|
||||||
|
specs: require('./specs')
|
||||||
|
};
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
const assert = require('assert');
|
const assert = require('assert');
|
||||||
|
const debug = require('debug')('jambonz:app-json-validation');
|
||||||
const _specData = require('./specs');
|
const _specData = require('./specs');
|
||||||
const specs = new Map();
|
const specs = new Map();
|
||||||
for (const key in _specData) { specs.set(key, _specData[key]); }
|
for (const key in _specData) { specs.set(key, _specData[key]); }
|
||||||
@@ -30,7 +31,7 @@ function normalizeJambones(logger, obj) {
|
|||||||
throw new Error('malformed jambonz payload: missing verb property');
|
throw new Error('malformed jambonz payload: missing verb property');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
logger.debug({ document }, `normalizeJambones: returning document with ${document.length} tasks`);
|
debug({ document }, `normalizeJambones: returning document with ${document.length} tasks`);
|
||||||
return document;
|
return document;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -44,7 +45,7 @@ function validate(logger, obj) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function validateVerb(name, data, logger) {
|
function validateVerb(name, data, logger) {
|
||||||
logger.debug(`validating ${name} with data ${JSON.stringify(data)}`);
|
debug(`validating ${name} with data ${JSON.stringify(data)}`);
|
||||||
// validate the instruction is supported
|
// validate the instruction is supported
|
||||||
if (!specs.has(name)) throw new Error(`invalid instruction: ${name}`);
|
if (!specs.has(name)) throw new Error(`invalid instruction: ${name}`);
|
||||||
|
|
||||||
@@ -55,9 +56,10 @@ function validateVerb(name, data, logger) {
|
|||||||
if (dKey in specData.properties) {
|
if (dKey in specData.properties) {
|
||||||
const dVal = data[dKey];
|
const dVal = data[dKey];
|
||||||
const dSpec = specData.properties[dKey];
|
const dSpec = specData.properties[dKey];
|
||||||
logger.debug(`Task:validate validating property ${dKey} with value ${JSON.stringify(dVal)}`);
|
debug(`Task:validate validating property ${dKey} with value ${JSON.stringify(dVal)}`);
|
||||||
|
|
||||||
if (typeof dSpec === 'string' && dSpec === 'array') {
|
if (typeof dVal === 'undefined') continue;
|
||||||
|
else if (typeof dSpec === 'string' && dSpec === 'array') {
|
||||||
if (!Array.isArray(dVal)) throw new Error(`${name}: property ${dKey} is not an array`);
|
if (!Array.isArray(dVal)) throw new Error(`${name}: property ${dKey} is not an array`);
|
||||||
}
|
}
|
||||||
else if (typeof dSpec === 'string' && dSpec.includes('|')) {
|
else if (typeof dSpec === 'string' && dSpec.includes('|')) {
|
||||||
@@ -110,4 +112,4 @@ function validateVerb(name, data, logger) {
|
|||||||
if (required.length > 0) throw new Error(`${name}: missing value for ${required}`);
|
if (required.length > 0) throw new Error(`${name}: missing value for ${required}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = { normalizeJambones, validate };
|
module.exports = { normalizeJambones, validate, validateVerb };
|
||||||
|
|||||||
2633
package-lock.json
generated
2633
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,12 +1,11 @@
|
|||||||
{
|
{
|
||||||
"name": "verb-specifications",
|
"name": "@jambonz/verb-specifications",
|
||||||
"version": "0.0.1",
|
"version": "0.0.126",
|
||||||
"description": "Jambonz Verb Specification Utilities",
|
"description": "Jambonz Verb Specification Utilities",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "node test/",
|
"test": "node test/",
|
||||||
"jslint": "eslint index.js"
|
"jslint": "eslint index.js"
|
||||||
|
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@@ -21,9 +20,10 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint": "^7.32.0",
|
"eslint": "^7.32.0",
|
||||||
"eslint-plugin-promise": "^4.3.1",
|
"eslint-plugin-promise": "^4.3.1",
|
||||||
"tape": "^5.6.1"
|
"tape": "^5.7.5"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"debug": "^4.3.4",
|
||||||
"pino": "^8.8.0"
|
"pino": "^8.8.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
737
specs.json
737
specs.json
@@ -1,4 +1,20 @@
|
|||||||
{
|
{
|
||||||
|
"alert" : {
|
||||||
|
"properties": {
|
||||||
|
"id": "string",
|
||||||
|
"message": "string"
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"message"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"answer": {
|
||||||
|
"properties": {
|
||||||
|
"id": "string"
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
]
|
||||||
|
},
|
||||||
"sip:decline": {
|
"sip:decline": {
|
||||||
"properties": {
|
"properties": {
|
||||||
"id": "string",
|
"id": "string",
|
||||||
@@ -27,6 +43,7 @@
|
|||||||
"id": "string",
|
"id": "string",
|
||||||
"referTo": "string",
|
"referTo": "string",
|
||||||
"referredBy": "string",
|
"referredBy": "string",
|
||||||
|
"referredByDisplayName": "string",
|
||||||
"headers": "object",
|
"headers": "object",
|
||||||
"actionHook": "object|string",
|
"actionHook": "object|string",
|
||||||
"eventHook": "object|string"
|
"eventHook": "object|string"
|
||||||
@@ -41,13 +58,38 @@
|
|||||||
"synthesizer": "#synthesizer",
|
"synthesizer": "#synthesizer",
|
||||||
"recognizer": "#recognizer",
|
"recognizer": "#recognizer",
|
||||||
"bargeIn": "#bargeIn",
|
"bargeIn": "#bargeIn",
|
||||||
|
"ttsStream": "#ttsStream",
|
||||||
"record": "#recordOptions",
|
"record": "#recordOptions",
|
||||||
"listen": "#listenOptions",
|
"listen": "#listenOptions",
|
||||||
|
"stream": "#listenOptions",
|
||||||
|
"transcribe": "#transcribeOptions",
|
||||||
"amd": "#amd",
|
"amd": "#amd",
|
||||||
"notifyEvents": "boolean"
|
"fillerNoise": "#fillerNoise",
|
||||||
|
"notifyEvents": "boolean",
|
||||||
|
"notifySttLatency": "boolean",
|
||||||
|
"reset": "string|array",
|
||||||
|
"onHoldMusic": "string",
|
||||||
|
"actionHookDelayAction": "#actionHookDelayAction",
|
||||||
|
"sipRequestWithinDialogHook": "object|string",
|
||||||
|
"boostAudioSignal": "number|string",
|
||||||
|
"vad":"#vad",
|
||||||
|
"referHook": "object|string",
|
||||||
|
"earlyMedia": "boolean",
|
||||||
|
"autoStreamTts": "boolean",
|
||||||
|
"disableTtsCache": "boolean"
|
||||||
},
|
},
|
||||||
"required": []
|
"required": []
|
||||||
},
|
},
|
||||||
|
"fillerNoise": {
|
||||||
|
"properties": {
|
||||||
|
"enable": "boolean",
|
||||||
|
"url": "string",
|
||||||
|
"startDelaySecs": "number"
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"enable"
|
||||||
|
]
|
||||||
|
},
|
||||||
"listenOptions": {
|
"listenOptions": {
|
||||||
"properties": {
|
"properties": {
|
||||||
"enable": "boolean",
|
"enable": "boolean",
|
||||||
@@ -58,7 +100,22 @@
|
|||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": ["mono", "stereo", "mixed"]
|
"enum": ["mono", "stereo", "mixed"]
|
||||||
},
|
},
|
||||||
"metadata": "object"
|
"metadata": "object",
|
||||||
|
"maxLength": "number",
|
||||||
|
"passDtmf": "boolean",
|
||||||
|
"playBeep": "boolean",
|
||||||
|
"disableBidirectionalAudio": "boolean",
|
||||||
|
"bidirectionalAudio": "#bidirectionalAudio",
|
||||||
|
"timeout": "number"
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"enable"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"ttsStream": {
|
||||||
|
"properties": {
|
||||||
|
"enable": "boolean",
|
||||||
|
"synthesizer": "#synthesizer"
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
"enable"
|
"enable"
|
||||||
@@ -69,6 +126,7 @@
|
|||||||
"enable": "boolean",
|
"enable": "boolean",
|
||||||
"sticky": "boolean",
|
"sticky": "boolean",
|
||||||
"actionHook": "object|string",
|
"actionHook": "object|string",
|
||||||
|
"partialResultHook": "object|string",
|
||||||
"input": "array",
|
"input": "array",
|
||||||
"finishOnKey": "string",
|
"finishOnKey": "string",
|
||||||
"numDigits": "number",
|
"numDigits": "number",
|
||||||
@@ -82,13 +140,42 @@
|
|||||||
"enable"
|
"enable"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"transcribeOptions": {
|
||||||
|
"properties": {
|
||||||
|
"enable": "boolean",
|
||||||
|
"transcriptionHook": "string",
|
||||||
|
"recognizer": "#recognizer"
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"enable"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"dub": {
|
||||||
|
"properties": {
|
||||||
|
"id": "string",
|
||||||
|
"action": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["addTrack", "removeTrack", "silenceTrack", "playOnTrack", "sayOnTrack"]
|
||||||
|
},
|
||||||
|
"track": "string",
|
||||||
|
"play": "string",
|
||||||
|
"say": "string|object",
|
||||||
|
"loop": "boolean",
|
||||||
|
"gain": "number|string"
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"action",
|
||||||
|
"track"
|
||||||
|
]
|
||||||
|
},
|
||||||
"dequeue": {
|
"dequeue": {
|
||||||
"properties": {
|
"properties": {
|
||||||
"id": "string",
|
"id": "string",
|
||||||
"name": "string",
|
"name": "string",
|
||||||
"actionHook": "object|string",
|
"actionHook": "object|string",
|
||||||
"timeout": "number",
|
"timeout": "number",
|
||||||
"beep": "boolean"
|
"beep": "boolean",
|
||||||
|
"callSid": "string"
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
"name"
|
"name"
|
||||||
@@ -100,6 +187,7 @@
|
|||||||
"name": "string",
|
"name": "string",
|
||||||
"actionHook": "object|string",
|
"actionHook": "object|string",
|
||||||
"waitHook": "object|string",
|
"waitHook": "object|string",
|
||||||
|
"priority": "number",
|
||||||
"_": "object"
|
"_": "object"
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
@@ -137,13 +225,15 @@
|
|||||||
"properties": {
|
"properties": {
|
||||||
"id": "string",
|
"id": "string",
|
||||||
"text": "string|array",
|
"text": "string|array",
|
||||||
|
"instructions": "string",
|
||||||
|
"stream": "boolean",
|
||||||
"loop": "number|string",
|
"loop": "number|string",
|
||||||
"synthesizer": "#synthesizer",
|
"synthesizer": "#synthesizer",
|
||||||
"earlyMedia": "boolean",
|
"earlyMedia": "boolean",
|
||||||
"disableTtsCache": "boolean"
|
"disableTtsCache": "boolean",
|
||||||
|
"closeStreamOnEmpty": "boolean"
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
"text"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"gather": {
|
"gather": {
|
||||||
@@ -165,7 +255,9 @@
|
|||||||
"timeout": "number",
|
"timeout": "number",
|
||||||
"recognizer": "#recognizer",
|
"recognizer": "#recognizer",
|
||||||
"play": "#play",
|
"play": "#play",
|
||||||
"say": "#say"
|
"say": "#say",
|
||||||
|
"fillerNoise": "#fillerNoise",
|
||||||
|
"actionHookDelayAction": "#actionHookDelayAction"
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
]
|
]
|
||||||
@@ -175,8 +267,11 @@
|
|||||||
"id": "string",
|
"id": "string",
|
||||||
"name": "string",
|
"name": "string",
|
||||||
"beep": "boolean",
|
"beep": "boolean",
|
||||||
|
"memberTag": "string",
|
||||||
|
"speakOnlyTo": "string",
|
||||||
"startConferenceOnEnter": "boolean",
|
"startConferenceOnEnter": "boolean",
|
||||||
"endConferenceOnExit": "boolean",
|
"endConferenceOnExit": "boolean",
|
||||||
|
"endConferenceDuration": "number",
|
||||||
"maxParticipants": "number",
|
"maxParticipants": "number",
|
||||||
"joinMuted": "boolean",
|
"joinMuted": "boolean",
|
||||||
"actionHook": "object|string",
|
"actionHook": "object|string",
|
||||||
@@ -184,7 +279,9 @@
|
|||||||
"statusEvents": "array",
|
"statusEvents": "array",
|
||||||
"statusHook": "object|string",
|
"statusHook": "object|string",
|
||||||
"enterHook": "object|string",
|
"enterHook": "object|string",
|
||||||
"record": "#record"
|
"record": "#record",
|
||||||
|
"listen": "#listen",
|
||||||
|
"distributeDtmf": "boolean"
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
"name"
|
"name"
|
||||||
@@ -194,21 +291,30 @@
|
|||||||
"properties": {
|
"properties": {
|
||||||
"id": "string",
|
"id": "string",
|
||||||
"actionHook": "object|string",
|
"actionHook": "object|string",
|
||||||
|
"onHoldHook": "object|string",
|
||||||
"answerOnBridge": "boolean",
|
"answerOnBridge": "boolean",
|
||||||
"callerId": "string",
|
"callerId": "string",
|
||||||
|
"callerName": "string",
|
||||||
"confirmHook": "object|string",
|
"confirmHook": "object|string",
|
||||||
"referHook": "object|string",
|
"referHook": "object|string",
|
||||||
"dialMusic": "string",
|
"dialMusic": "string",
|
||||||
"dtmfCapture": "object",
|
"dtmfCapture": "object",
|
||||||
"dtmfHook": "object|string",
|
"dtmfHook": "object|string",
|
||||||
"headers": "object",
|
"headers": "object",
|
||||||
|
"anchorMedia": "boolean",
|
||||||
|
"exitMediaPath": "boolean",
|
||||||
|
"boostAudioSignal": "number|string",
|
||||||
"listen": "#listen",
|
"listen": "#listen",
|
||||||
|
"stream": "#listen",
|
||||||
"target": ["#target"],
|
"target": ["#target"],
|
||||||
"timeLimit": "number",
|
"timeLimit": "number",
|
||||||
"timeout": "number",
|
"timeout": "number",
|
||||||
"proxy": "string",
|
"proxy": "string",
|
||||||
"transcribe": "#transcribe",
|
"transcribe": "#transcribe",
|
||||||
"amd": "#amd"
|
"amd": "#amd",
|
||||||
|
"dub": ["#dub"],
|
||||||
|
"tag": "object",
|
||||||
|
"forwardPAI": "boolean"
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
"target"
|
"target"
|
||||||
@@ -219,15 +325,17 @@
|
|||||||
"id": "string",
|
"id": "string",
|
||||||
"credentials": "object|string",
|
"credentials": "object|string",
|
||||||
"project": "string",
|
"project": "string",
|
||||||
|
"agent": "string",
|
||||||
"environment": "string",
|
"environment": "string",
|
||||||
"region": {
|
"region": "string",
|
||||||
|
"model": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": ["europe-west1", "europe-west2", "australia-southeast1", "asia-northeast1"]
|
"enum": ["es", "cx"]
|
||||||
},
|
},
|
||||||
"lang": "string",
|
"lang": "string",
|
||||||
"actionHook": "object|string",
|
"actionHook": "object|string",
|
||||||
"eventHook": "object|string",
|
"eventHook": "object|string",
|
||||||
"events": "[string]",
|
"events": "array",
|
||||||
"welcomeEvent": "string",
|
"welcomeEvent": "string",
|
||||||
"welcomeEventParams": "object",
|
"welcomeEventParams": "object",
|
||||||
"noInputTimeout": "number",
|
"noInputTimeout": "number",
|
||||||
@@ -235,7 +343,8 @@
|
|||||||
"passDtmfAsTextInput": "boolean",
|
"passDtmfAsTextInput": "boolean",
|
||||||
"thinkingMusic": "string",
|
"thinkingMusic": "string",
|
||||||
"tts": "#synthesizer",
|
"tts": "#synthesizer",
|
||||||
"bargein": "boolean"
|
"bargein": "boolean",
|
||||||
|
"queryInput": "#queryInput"
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
"project",
|
"project",
|
||||||
@@ -243,6 +352,16 @@
|
|||||||
"lang"
|
"lang"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"queryInput": {
|
||||||
|
"properties": {
|
||||||
|
"text": "string",
|
||||||
|
"intent": "string",
|
||||||
|
"event": "string",
|
||||||
|
"dtmf": "string"
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
]
|
||||||
|
},
|
||||||
"dtmf": {
|
"dtmf": {
|
||||||
"properties": {
|
"properties": {
|
||||||
"id": "string",
|
"id": "string",
|
||||||
@@ -293,6 +412,35 @@
|
|||||||
"passDtmf": "boolean",
|
"passDtmf": "boolean",
|
||||||
"playBeep": "boolean",
|
"playBeep": "boolean",
|
||||||
"disableBidirectionalAudio": "boolean",
|
"disableBidirectionalAudio": "boolean",
|
||||||
|
"bidirectionalAudio": "#bidirectionalAudio",
|
||||||
|
"sampleRate": "number",
|
||||||
|
"timeout": "number",
|
||||||
|
"transcribe": "#transcribe",
|
||||||
|
"url": "string",
|
||||||
|
"wsAuth": "#auth",
|
||||||
|
"earlyMedia": "boolean",
|
||||||
|
"channel": "number"
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"url"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"stream": {
|
||||||
|
"properties": {
|
||||||
|
"id": "string",
|
||||||
|
"actionHook": "object|string",
|
||||||
|
"auth": "#auth",
|
||||||
|
"finishOnKey": "string",
|
||||||
|
"maxLength": "number",
|
||||||
|
"metadata": "object",
|
||||||
|
"mixType": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["mono", "stereo", "mixed"]
|
||||||
|
},
|
||||||
|
"passDtmf": "boolean",
|
||||||
|
"playBeep": "boolean",
|
||||||
|
"disableBidirectionalAudio": "boolean",
|
||||||
|
"bidirectionalAudio": "#bidirectionalAudio",
|
||||||
"sampleRate": "number",
|
"sampleRate": "number",
|
||||||
"timeout": "number",
|
"timeout": "number",
|
||||||
"transcribe": "#transcribe",
|
"transcribe": "#transcribe",
|
||||||
@@ -304,6 +452,35 @@
|
|||||||
"url"
|
"url"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"llm": {
|
||||||
|
"properties": {
|
||||||
|
"id": "string",
|
||||||
|
"vendor": "string",
|
||||||
|
"model": "string",
|
||||||
|
"auth": "object",
|
||||||
|
"connectOptions": "object",
|
||||||
|
"mcpServers": ["#mcpServer"],
|
||||||
|
"actionHook": "object|string",
|
||||||
|
"eventHook": "object|string",
|
||||||
|
"toolHook": "object|string",
|
||||||
|
"events": "array",
|
||||||
|
"llmOptions": "object"
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"vendor",
|
||||||
|
"llmOptions"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"mcpServer": {
|
||||||
|
"properties": {
|
||||||
|
"url": "string",
|
||||||
|
"auth": "object",
|
||||||
|
"roots": ["#root"]
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"url"
|
||||||
|
]
|
||||||
|
},
|
||||||
"message": {
|
"message": {
|
||||||
"properties": {
|
"properties": {
|
||||||
"id": "string",
|
"id": "string",
|
||||||
@@ -358,8 +535,14 @@
|
|||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": ["startCallRecording", "stopCallRecording", "pauseCallRecording", "resumeCallRecording"]
|
"enum": ["startCallRecording", "stopCallRecording", "pauseCallRecording", "resumeCallRecording"]
|
||||||
},
|
},
|
||||||
|
"type" : {
|
||||||
|
"type" : "string",
|
||||||
|
"enum" : ["cloud", "siprec"]
|
||||||
|
|
||||||
|
},
|
||||||
"recordingID": "string",
|
"recordingID": "string",
|
||||||
"siprecServerURL": "string"
|
"siprecServerURL": "string|array",
|
||||||
|
"headers": "object"
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
"action"
|
"action"
|
||||||
@@ -368,7 +551,8 @@
|
|||||||
"redirect": {
|
"redirect": {
|
||||||
"properties": {
|
"properties": {
|
||||||
"id": "string",
|
"id": "string",
|
||||||
"actionHook": "object|string"
|
"actionHook": "object|string",
|
||||||
|
"statusHook": "object|string"
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
"actionHook"
|
"actionHook"
|
||||||
@@ -382,6 +566,7 @@
|
|||||||
"call_hook": "object|string",
|
"call_hook": "object|string",
|
||||||
"call_status_hook": "object|string",
|
"call_status_hook": "object|string",
|
||||||
"from": "string",
|
"from": "string",
|
||||||
|
"callerName": "string",
|
||||||
"fromHost": "string",
|
"fromHost": "string",
|
||||||
"speech_synthesis_vendor": "string",
|
"speech_synthesis_vendor": "string",
|
||||||
"speech_synthesis_voice": "string",
|
"speech_synthesis_voice": "string",
|
||||||
@@ -391,7 +576,12 @@
|
|||||||
"tag": "object",
|
"tag": "object",
|
||||||
"to": "#target",
|
"to": "#target",
|
||||||
"headers": "object",
|
"headers": "object",
|
||||||
"timeout": "number"
|
"timeout": "number",
|
||||||
|
"amd": "#amd",
|
||||||
|
"dual_streams": "boolean",
|
||||||
|
"sipRequestWithinDialogHook": "string",
|
||||||
|
"referHook": "object|string",
|
||||||
|
"timeLimit": "number"
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
"call_hook",
|
"call_hook",
|
||||||
@@ -412,11 +602,12 @@
|
|||||||
"properties": {
|
"properties": {
|
||||||
"id": "string",
|
"id": "string",
|
||||||
"transcriptionHook": "string",
|
"transcriptionHook": "string",
|
||||||
|
"translationHook": "string",
|
||||||
"recognizer": "#recognizer",
|
"recognizer": "#recognizer",
|
||||||
"earlyMedia": "boolean"
|
"earlyMedia": "boolean",
|
||||||
|
"channel": "number"
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
"recognizer"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"target": {
|
"target": {
|
||||||
@@ -439,7 +630,8 @@
|
|||||||
"vmail": "boolean",
|
"vmail": "boolean",
|
||||||
"tenant": "string",
|
"tenant": "string",
|
||||||
"trunk": "string",
|
"trunk": "string",
|
||||||
"overrideTo": "string"
|
"overrideTo": "string",
|
||||||
|
"proxy": "string"
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
"type"
|
"type"
|
||||||
@@ -465,20 +657,23 @@
|
|||||||
},
|
},
|
||||||
"synthesizer": {
|
"synthesizer": {
|
||||||
"properties": {
|
"properties": {
|
||||||
"vendor": {
|
"vendor": "string",
|
||||||
"type": "string",
|
"label": "string",
|
||||||
"enum": ["google", "aws", "polly", "microsoft", "nuance", "ibm", "default"]
|
|
||||||
},
|
|
||||||
"language": "string",
|
"language": "string",
|
||||||
"voice": "string",
|
"voice": "string|object",
|
||||||
|
"fallbackVendor": "string",
|
||||||
|
"fallbackLabel": "string",
|
||||||
|
"fallbackLanguage": "string",
|
||||||
|
"fallbackVoice": "string|object",
|
||||||
"engine": {
|
"engine": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": ["standard", "neural"]
|
"enum": ["standard", "neural", "generative", "long-form"]
|
||||||
},
|
},
|
||||||
"gender": {
|
"gender": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": ["MALE", "FEMALE", "NEUTRAL"]
|
"enum": ["MALE", "FEMALE", "NEUTRAL"]
|
||||||
}
|
},
|
||||||
|
"options": "object"
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
"vendor"
|
"vendor"
|
||||||
@@ -486,11 +681,12 @@
|
|||||||
},
|
},
|
||||||
"recognizer": {
|
"recognizer": {
|
||||||
"properties": {
|
"properties": {
|
||||||
"vendor": {
|
"vendor": "string",
|
||||||
"type": "string",
|
"label": "string",
|
||||||
"enum": ["google", "aws", "microsoft", "nuance", "deepgram", "ibm", "default"]
|
|
||||||
},
|
|
||||||
"language": "string",
|
"language": "string",
|
||||||
|
"fallbackVendor": "string",
|
||||||
|
"fallbackLabel": "string",
|
||||||
|
"fallbackLanguage": "string",
|
||||||
"vad": "#vad",
|
"vad": "#vad",
|
||||||
"hints": "array",
|
"hints": "array",
|
||||||
"hintsBoost": "number",
|
"hintsBoost": "number",
|
||||||
@@ -553,14 +749,183 @@
|
|||||||
"azureSttEndpointId": "string",
|
"azureSttEndpointId": "string",
|
||||||
"asrDtmfTerminationDigit": "string",
|
"asrDtmfTerminationDigit": "string",
|
||||||
"asrTimeout": "number",
|
"asrTimeout": "number",
|
||||||
|
"fastRecognitionTimeout": "number",
|
||||||
|
"minConfidence": "number",
|
||||||
"nuanceOptions": "#nuanceOptions",
|
"nuanceOptions": "#nuanceOptions",
|
||||||
"deepgramOptions": "#deepgramOptions",
|
"deepgramOptions": "#deepgramOptions",
|
||||||
"ibmOptions": "#ibmOptions"
|
"ibmOptions": "#ibmOptions",
|
||||||
|
"nvidiaOptions": "#nvidiaOptions",
|
||||||
|
"sonioxOptions": "#sonioxOptions",
|
||||||
|
"cobaltOptions": "#cobaltOptions",
|
||||||
|
"awsOptions": "#awsOptions",
|
||||||
|
"azureOptions": "#azureOptions",
|
||||||
|
"assemblyAiOptions": "#assemblyAiOptions",
|
||||||
|
"googleOptions": "#googleOptions",
|
||||||
|
"customOptions": "#customOptions",
|
||||||
|
"verbioOptions": "#verbioOptions",
|
||||||
|
"speechmaticsOptions": "#speechmaticsOptions",
|
||||||
|
"openaiOptions": "#openaiOptions",
|
||||||
|
"houndifyOptions": "#houndifyOptions",
|
||||||
|
"gladiaOptions": "object",
|
||||||
|
"elevenlabsOptions": "#elevenlabsOptions"
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
"vendor"
|
"vendor"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"customOptions": {
|
||||||
|
"properties": {
|
||||||
|
"authToken": "string",
|
||||||
|
"uri": "string",
|
||||||
|
"sampleRate": "number",
|
||||||
|
"options": "object"
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"awsOptions": {
|
||||||
|
"properties": {
|
||||||
|
"accessKey": "string",
|
||||||
|
"secretKey": "string",
|
||||||
|
"securityToken": "string",
|
||||||
|
"region": "string",
|
||||||
|
"vocabularyName": "string",
|
||||||
|
"vocabularyFilterName": "string",
|
||||||
|
"vocabularyFilterMethod": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"remove",
|
||||||
|
"mask",
|
||||||
|
"tag"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"languageModelName": "string",
|
||||||
|
"piiEntityTypes": "array",
|
||||||
|
"piiIdentifyEntities": "boolean"
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"azureOptions": {
|
||||||
|
"properties": {
|
||||||
|
"speechSegmentationSilenceTimeoutMs": "number",
|
||||||
|
"postProcessing" : "string",
|
||||||
|
"audioLogging" : "boolean",
|
||||||
|
"languageIdMode": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"AtStart",
|
||||||
|
"Continuous"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"speechRecognitionMode": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"CONVERSATION",
|
||||||
|
"DICTATION",
|
||||||
|
"INTERACTIVE"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"googleOptions" : {
|
||||||
|
"properties": {
|
||||||
|
"serviceVersion": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"v1",
|
||||||
|
"v2"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"recognizerId": "string",
|
||||||
|
"speechStartTimeoutMs": "number",
|
||||||
|
"speechEndTimeoutMs": "number",
|
||||||
|
"enableVoiceActivityEvents": "boolean",
|
||||||
|
"transcriptNormalization": "array"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"houndifyOptions": {
|
||||||
|
"properties": {
|
||||||
|
"requestInfo": "object",
|
||||||
|
"sampleRate": "number",
|
||||||
|
"latitude": "number",
|
||||||
|
"longitude": "number",
|
||||||
|
"city": "string",
|
||||||
|
"state": "string",
|
||||||
|
"country": "string",
|
||||||
|
"timeZone": "string",
|
||||||
|
"domain": "string",
|
||||||
|
"audioEndpoint": "string",
|
||||||
|
"maxSilenceSeconds": "number",
|
||||||
|
"maxSilenceAfterFullQuerySeconds": "number",
|
||||||
|
"maxSilenceAfterPartialQuerySeconds": "number",
|
||||||
|
"vadSensitivity": "number",
|
||||||
|
"vadTimeout": "number",
|
||||||
|
"vadMode": "string",
|
||||||
|
"vadVoiceMs": "number",
|
||||||
|
"vadSilenceMs": "number",
|
||||||
|
"vadDebug": "boolean",
|
||||||
|
"audioFormat": "string",
|
||||||
|
"enableNoiseReduction": "boolean",
|
||||||
|
"enableProfanityFilter": "boolean",
|
||||||
|
"enablePunctuation": "boolean",
|
||||||
|
"enableCapitalization": "boolean",
|
||||||
|
"confidenceThreshold": "number",
|
||||||
|
"enableDisfluencyFilter": "boolean",
|
||||||
|
"maxResults": "number",
|
||||||
|
"enableWordTimestamps": "boolean",
|
||||||
|
"maxAlternatives": "number",
|
||||||
|
"partialTranscriptInterval": "number",
|
||||||
|
"sessionTimeout": "number",
|
||||||
|
"connectionTimeout": "number",
|
||||||
|
"customVocabulary": "array",
|
||||||
|
"languageModel": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"elevenlabsOptions": {
|
||||||
|
"properties": {
|
||||||
|
"includeTimestamps": "boolean",
|
||||||
|
"commitStrategy": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"manual",
|
||||||
|
"vad"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"vadSilenceThresholdSecs": "number",
|
||||||
|
"vadThreshold": "number",
|
||||||
|
"minSpeechDurationMs": "number",
|
||||||
|
"minSilenceDurationMs": "number",
|
||||||
|
"enableLogging": "boolean"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"cobaltOptions": {
|
||||||
|
"properties": {
|
||||||
|
"serverUri": "string",
|
||||||
|
"enableConfusionNetwork": "boolean",
|
||||||
|
"metadata": "string",
|
||||||
|
"compiledContextData": "string",
|
||||||
|
"wordTimeOffsets": "boolean",
|
||||||
|
"contextToken": "string"
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"nvidiaOptions": {
|
||||||
|
"properties": {
|
||||||
|
"rivaUri": "string",
|
||||||
|
"maxAlternatives": "number",
|
||||||
|
"profanityFilter": "boolean",
|
||||||
|
"punctuation": "boolean",
|
||||||
|
"wordTimeOffsets": "boolean",
|
||||||
|
"verbatimTranscripts": "boolean",
|
||||||
|
"customConfiguration": "object"
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
]
|
||||||
|
},
|
||||||
"ibmOptions": {
|
"ibmOptions": {
|
||||||
"properties": {
|
"properties": {
|
||||||
"sttApiKey": "string",
|
"sttApiKey": "string",
|
||||||
@@ -580,30 +945,16 @@
|
|||||||
},
|
},
|
||||||
"deepgramOptions": {
|
"deepgramOptions": {
|
||||||
"properties": {
|
"properties": {
|
||||||
|
"deepgramSttUri": "string",
|
||||||
|
"deepgramSttUseTls": "boolean",
|
||||||
"apiKey": "string",
|
"apiKey": "string",
|
||||||
"tier": {
|
"tier": "string",
|
||||||
"type": "string",
|
"model": "string",
|
||||||
"enum": [
|
|
||||||
"enhanced",
|
|
||||||
"base"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"model": {
|
|
||||||
"type": "string",
|
|
||||||
"enum": [
|
|
||||||
"general",
|
|
||||||
"meeting",
|
|
||||||
"phonecall",
|
|
||||||
"voicemail",
|
|
||||||
"finance",
|
|
||||||
"conversationalai",
|
|
||||||
"video",
|
|
||||||
"custom"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"customModel": "string",
|
"customModel": "string",
|
||||||
"version": "string",
|
"version": "string",
|
||||||
"punctuate": "boolean",
|
"punctuate": "boolean",
|
||||||
|
"smartFormatting": "boolean",
|
||||||
|
"noDelay": "boolean",
|
||||||
"profanityFilter": "boolean",
|
"profanityFilter": "boolean",
|
||||||
"redact": {
|
"redact": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@@ -623,11 +974,212 @@
|
|||||||
"search": "array",
|
"search": "array",
|
||||||
"replace": "array",
|
"replace": "array",
|
||||||
"keywords": "array",
|
"keywords": "array",
|
||||||
"endpointing": "boolean",
|
"keyterms": "array",
|
||||||
|
"endpointing": "boolean | number",
|
||||||
|
"utteranceEndMs": "number",
|
||||||
|
"shortUtterance": "boolean",
|
||||||
"vadTurnoff": "number",
|
"vadTurnoff": "number",
|
||||||
"tag": "string"
|
"tag": "string",
|
||||||
|
"fillerWords" : "boolean",
|
||||||
|
"eotThreshold": "number",
|
||||||
|
"eotTimeoutMs": "number",
|
||||||
|
"mipOptOut": "boolean",
|
||||||
|
"entityPrompt": "string",
|
||||||
|
"eagerEotThreshold":"number"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"sonioxOptions": {
|
||||||
|
"properties": {
|
||||||
|
"apiKey": "string",
|
||||||
|
"model": "string",
|
||||||
|
"endpointDetection": "boolean",
|
||||||
|
"profanityFilter": "boolean",
|
||||||
|
"speechContext": "string",
|
||||||
|
"clientRequestReference": "string",
|
||||||
|
"storage": "#sonioxStorage"
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"verbioOptions": {
|
||||||
|
"properties": {
|
||||||
|
"enable_formatting": "boolean",
|
||||||
|
"enable_diarization": "boolean",
|
||||||
|
"topic": "number",
|
||||||
|
"inline_grammar": "string",
|
||||||
|
"grammar_uri": "string",
|
||||||
|
"label": "string",
|
||||||
|
"recognition_timeout": "number",
|
||||||
|
"speech_complete_timeout": "number",
|
||||||
|
"speech_incomplete_timeout": "number"
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"openaiOptions": {
|
||||||
|
"properties": {
|
||||||
|
"apiKey": "string",
|
||||||
|
"model": "string",
|
||||||
|
"prompt": "string",
|
||||||
|
"promptTemplates": "#promptTemplates",
|
||||||
|
"language": "string",
|
||||||
|
"input_audio_noise_reduction": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"near_field",
|
||||||
|
"far_field"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"turn_detection": "#turnDetection"
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"promptTemplates": {
|
||||||
|
"properties": {
|
||||||
|
"hintsTemplate": "string",
|
||||||
|
"conversationHistoryTemplate": "string"
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"turnDetection": {
|
||||||
|
"properties": {
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"none",
|
||||||
|
"server_vad",
|
||||||
|
"semantic_vad"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"eagerness": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"low",
|
||||||
|
"medium",
|
||||||
|
"high",
|
||||||
|
"auto"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"threshold": "number",
|
||||||
|
"prefix_padding_ms": "number",
|
||||||
|
"silence_duration_ms": "number"
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"type"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"speechmaticsOptions": {
|
||||||
|
"properties": {
|
||||||
|
"transcription_config": "#sm_transcriptionConfig",
|
||||||
|
"translation_config": "#sm_translationConfig",
|
||||||
|
"audio_events_config_config": "#sm_audioEventsConfig"
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"sm_transcriptionConfig": {
|
||||||
|
"properties": {
|
||||||
|
"language": "string",
|
||||||
|
"domain": "string",
|
||||||
|
"additional_vocab": "array",
|
||||||
|
"diarization": "string",
|
||||||
|
"speaker_diarization_config": "#sm_speakerDiarizationConfig",
|
||||||
|
"conversation_config": "#sm_conversationConfig",
|
||||||
|
"enable_partials": "boolean",
|
||||||
|
"max_delay": "number",
|
||||||
|
"max_delay_mode": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"fixed",
|
||||||
|
"flexible"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"output_locale": "string",
|
||||||
|
"punctuation_overrides": "#sm_puctuationOverrides",
|
||||||
|
"operating_point": "string",
|
||||||
|
"enable_entities": "boolean",
|
||||||
|
"audio_filtering_config": "#sm_audioFilteringConfig",
|
||||||
|
"transcript_filtering_config": "#sm_transcriptFilteringConfig"
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"sm_speakerDiarizationConfig": {
|
||||||
|
"properties": {
|
||||||
|
"speaker_sensitivity": "number",
|
||||||
|
"max_speakers": "number"
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"sm_conversationConfig": {
|
||||||
|
"properties": {
|
||||||
|
"end_of_utterance_silence_trigger": "number"
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"sm_puctuationOverrides": {
|
||||||
|
"properties": {
|
||||||
|
"permitted_marks": "array",
|
||||||
|
"sensitivity": "number"
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"sm_audioFilteringConfig": {
|
||||||
|
"properties": {
|
||||||
|
"volume_threshold": "number"
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"volume_threshold"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"sm_transcriptFilteringConfig": {
|
||||||
|
"properties": {
|
||||||
|
"remove_disfluencies": "boolean"
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"remove_disfluencies"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"sm_translationConfig": {
|
||||||
|
"properties": {
|
||||||
|
"target_languages": "array",
|
||||||
|
"enable_partials": "boolean"
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"target_languages"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"sm_audioEventsConfig": {
|
||||||
|
"properties": {
|
||||||
|
"types": {
|
||||||
|
"type": "array",
|
||||||
|
"enum": [
|
||||||
|
"applause",
|
||||||
|
"music",
|
||||||
|
"laughter"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"sonioxStorage": {
|
||||||
|
"properties": {
|
||||||
|
"id": "string",
|
||||||
|
"title": "string",
|
||||||
|
"disableStoreAudio": "boolean",
|
||||||
|
"disableStoreTranscript": "boolean",
|
||||||
|
"disableSearch": "boolean",
|
||||||
|
"metadata": "object"
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
]
|
||||||
|
},
|
||||||
"nuanceOptions": {
|
"nuanceOptions": {
|
||||||
"properties": {
|
"properties": {
|
||||||
"clientId": "string",
|
"clientId": "string",
|
||||||
@@ -673,13 +1225,29 @@
|
|||||||
"required": [
|
"required": [
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"assemblyAiOptions": {
|
||||||
|
"properties": {
|
||||||
|
"apiKey": "string",
|
||||||
|
"serviceVersion": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"v2",
|
||||||
|
"v3"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"formatTurns": "boolean",
|
||||||
|
"endOfTurnConfidenceThreshold": "number",
|
||||||
|
"minEndOfTurnSilenceWhenConfident": "number",
|
||||||
|
"maxTurnSilence": "number"
|
||||||
|
}
|
||||||
|
},
|
||||||
"resource": {
|
"resource": {
|
||||||
"properties": {
|
"properties": {
|
||||||
"externalReference": "#resourceReference",
|
"externalReference": "#resourceReference",
|
||||||
"inlineWordset": "string",
|
"inlineWordset": "string",
|
||||||
"builtin": "string",
|
"builtin": "string",
|
||||||
"inlineGrammar": "string",
|
"inlineGrammar": "string",
|
||||||
"wakeupWord": "[string]",
|
"wakeupWord": "array",
|
||||||
"weightName": {
|
"weightName": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": [
|
"enum": [
|
||||||
@@ -749,16 +1317,27 @@
|
|||||||
"properties": {
|
"properties": {
|
||||||
"enable": "boolean",
|
"enable": "boolean",
|
||||||
"voiceMs": "number",
|
"voiceMs": "number",
|
||||||
"mode": "number"
|
"silenceMs": "number",
|
||||||
|
"strategy": "string",
|
||||||
|
"mode": "number",
|
||||||
|
"vendor": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"webrtc",
|
||||||
|
"silero"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"threshold": "number",
|
||||||
|
"speechPadMs": "number"
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
"enable"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"amd": {
|
"amd": {
|
||||||
"properties": {
|
"properties": {
|
||||||
"actionHook": "object|string",
|
"actionHook": "object|string",
|
||||||
"thresholdWordCount": "number",
|
"thresholdWordCount": "number",
|
||||||
|
"digitCount": "number",
|
||||||
"timers": "#amdTimers",
|
"timers": "#amdTimers",
|
||||||
"recognizer": "#recognizer"
|
"recognizer": "#recognizer"
|
||||||
},
|
},
|
||||||
@@ -773,5 +1352,53 @@
|
|||||||
"toneTimeoutMs": "number",
|
"toneTimeoutMs": "number",
|
||||||
"greetingCompletionTimeoutMs": "number"
|
"greetingCompletionTimeoutMs": "number"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"actionHookDelayAction" : {
|
||||||
|
"properties": {
|
||||||
|
"enabled": "boolean",
|
||||||
|
"noResponseTimeout": "number",
|
||||||
|
"noResponseGiveUpTimeout": "number",
|
||||||
|
"retries": "number",
|
||||||
|
"actions": "array",
|
||||||
|
"giveUpActions": "array"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"bidirectionalAudio" : {
|
||||||
|
"properties": {
|
||||||
|
"enabled": "boolean",
|
||||||
|
"streaming": "boolean",
|
||||||
|
"sampleRate": "number"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pipeline": {
|
||||||
|
"properties": {
|
||||||
|
"id": "string",
|
||||||
|
"stt": "#recognizer",
|
||||||
|
"tts": "#synthesizer",
|
||||||
|
"vad": "#vad",
|
||||||
|
"turnDetection": "#turnDetectionPipeline",
|
||||||
|
"llm": "#llm",
|
||||||
|
"preflightLlm": "boolean",
|
||||||
|
"actionHook": "object|string",
|
||||||
|
"eventHook": "object|string"
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"stt",
|
||||||
|
"llm",
|
||||||
|
"tts"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"turnDetectionPipeline": {
|
||||||
|
"properties": {
|
||||||
|
"vendor": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["krisp"]
|
||||||
|
},
|
||||||
|
"threshold": "number",
|
||||||
|
"eagerEotThreshold": "number"
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"vendor"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
const test = require('tape');
|
const test = require('tape');
|
||||||
const logger = require('pino')({level: process.env.JAMBONES_LOGLEVEL || 'error'});
|
const logger = require('pino')({level: process.env.JAMBONES_LOGLEVEL || 'error'});
|
||||||
const { validate } = require('../jambonz-app-json-validation');
|
const { validate } = require('..');
|
||||||
|
|
||||||
test("validate correct verbs", async (t) => {
|
test("validate correct verbs", async (t) => {
|
||||||
|
|
||||||
@@ -24,30 +24,128 @@ test("validate correct verbs", async (t) => {
|
|||||||
"verb": "config",
|
"verb": "config",
|
||||||
"synthesizer": {
|
"synthesizer": {
|
||||||
"voice": "Jenny",
|
"voice": "Jenny",
|
||||||
"vendor": "google"
|
"vendor": "google",
|
||||||
|
"label": "label1"
|
||||||
},
|
},
|
||||||
"recognizer": {
|
"recognizer": {
|
||||||
"vendor": "google",
|
"vendor": "google",
|
||||||
"language": "de-DE"
|
"language": "de-DE",
|
||||||
|
"label": "label1"
|
||||||
},
|
},
|
||||||
"bargeIn": {
|
"bargeIn": {
|
||||||
"enable": true,
|
"enable": true,
|
||||||
"input" : ["speech"],
|
"input" : ["speech"],
|
||||||
"actionHook": "/userInput"
|
"actionHook": "/userInput"
|
||||||
|
},
|
||||||
|
"transcribe": {
|
||||||
|
"enable": true,
|
||||||
|
"transcriptionHook": "http://server.com/hook",
|
||||||
|
"recognizer": {
|
||||||
|
"vendor": "google",
|
||||||
|
"language": "de-DE",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"onHoldMusic": "http://server.com/hold",
|
||||||
|
"actionHookDelayAction": {
|
||||||
|
"enabled": true,
|
||||||
|
"noResponseTimeout": 5,
|
||||||
|
"noResponseGiveUpTimeout": 10,
|
||||||
|
"retries": 3,
|
||||||
|
"actions": [
|
||||||
|
{
|
||||||
|
"verb": "say",
|
||||||
|
"text": "To speak to Sales press 1 or say Sales. To speak to customer support press 2 or say Support",
|
||||||
|
"synthesizer": {
|
||||||
|
"vendor": "google",
|
||||||
|
"language": "en-US"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"verb": "play",
|
||||||
|
"url": "https://example.com/example.mp3",
|
||||||
|
"timeoutSecs": 10,
|
||||||
|
"seekOffset": 8000,
|
||||||
|
"actionHook": "/play/action"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"verb": "config",
|
||||||
|
"notifySttLatency": true,
|
||||||
|
"recognizer": {
|
||||||
|
"vendor": "google",
|
||||||
|
"language": "de-DE",
|
||||||
|
"label": "label1",
|
||||||
|
"assemblyAiOptions": {
|
||||||
|
"apiKey": "apikey",
|
||||||
|
"serviceVersion": "v3",
|
||||||
|
"formatTurns": true,
|
||||||
|
"endOfTurnConfidenceThreshold": 0.5,
|
||||||
|
"minEndOfTurnSilenceWhenConfident": 500,
|
||||||
|
"maxTurnSilence": 2000
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"verb": "config",
|
||||||
|
"referHook": "https://referhook.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"verb": "config",
|
||||||
|
"referHook": {
|
||||||
|
"url": "https://referhook.com"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"verb": "config",
|
||||||
|
"recognizer": {
|
||||||
|
"vendor": "google",
|
||||||
|
"language": "de-DE",
|
||||||
|
"label": "label1",
|
||||||
|
"azureOptions": {
|
||||||
|
"languageIdMode": "Continuous"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"verb": "config",
|
||||||
|
"record": {
|
||||||
|
"action": "startCallRecording",
|
||||||
|
"siprecServerURL": ["sip:srs@recording.example.com","sip:srs@recording.example.com"],
|
||||||
|
"headers" : {
|
||||||
|
"X-Header1": "Value1",
|
||||||
|
"X-Header2": "Value2"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"verb": "config",
|
||||||
|
"sipRequestWithinDialogHook": "https://jambonz.or/sipIndialogActionHook"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"verb": "config",
|
||||||
|
"record": {
|
||||||
|
"action": "startCallRecording",
|
||||||
|
"siprecServerURL": "sip:srs@recording.example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"verb": "dequeue",
|
"verb": "dequeue",
|
||||||
"name": "support",
|
"name": "support",
|
||||||
"beep": true,
|
"beep": true,
|
||||||
"timeout": 60
|
"timeout": 60,
|
||||||
|
"callSid": "call_sid1234"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"verb": "dial",
|
"verb": "dial",
|
||||||
"actionHook": "/outdial",
|
"actionHook": "/outdial",
|
||||||
|
"onHoldHook": "/onHoldHook",
|
||||||
"callerId": "+16173331212",
|
"callerId": "+16173331212",
|
||||||
|
"callerName": "Tom",
|
||||||
"answerOnBridge": true,
|
"answerOnBridge": true,
|
||||||
"dtmfCapture": ["*2", "*3"],
|
"dtmfCapture": ["*2", "*3"],
|
||||||
|
"timeLimit": 10,
|
||||||
"dtmfHook": {
|
"dtmfHook": {
|
||||||
"url": "/dtmf",
|
"url": "/dtmf",
|
||||||
"method": "GET"
|
"method": "GET"
|
||||||
@@ -94,7 +192,8 @@ test("validate correct verbs", async (t) => {
|
|||||||
"verb": "enqueue",
|
"verb": "enqueue",
|
||||||
"name": "support",
|
"name": "support",
|
||||||
"actionHook": "/queue-action",
|
"actionHook": "/queue-action",
|
||||||
"waitHook": "/queue-wait"
|
"waitHook": "/queue-wait",
|
||||||
|
"priority": 50
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"verb": "gather",
|
"verb": "gather",
|
||||||
@@ -109,14 +208,182 @@ test("validate correct verbs", async (t) => {
|
|||||||
"vendor": "google",
|
"vendor": "google",
|
||||||
"language": "en-US",
|
"language": "en-US",
|
||||||
"hints": ["sales", "support"],
|
"hints": ["sales", "support"],
|
||||||
"hintsBoost": 10
|
"hintsBoost": 10,
|
||||||
|
"fastRecognitionTimeout": 2000,
|
||||||
|
"deepgramOptions": {
|
||||||
|
"endpointing": 500,
|
||||||
|
"noDelay": true,
|
||||||
|
"eotThreshold": 500,
|
||||||
|
"eotTimeoutMs": 5000,
|
||||||
|
"eagerEotThreshold": 200,
|
||||||
|
"mipOptOut": true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"say": {
|
"say": {
|
||||||
"text": "To speak to Sales press 1 or say Sales. To speak to customer support press 2 or say Support",
|
"text": "To speak to Sales press 1 or say Sales. To speak to customer support press 2 or say Support",
|
||||||
"synthesizer": {
|
"synthesizer": {
|
||||||
"vendor": "google",
|
"vendor": "google",
|
||||||
"language": "en-US"
|
"language": "en-US",
|
||||||
|
"label": "label1",
|
||||||
|
"fallbackVendor": "google",
|
||||||
|
"fallbackLanguage": "en-US",
|
||||||
|
"fallbackLabel": "label1",
|
||||||
|
"fallbackVoice": "voice"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"say": {
|
||||||
|
"text": "To speak to Sales press 1 or say Sales. To speak to customer support press 2 or say Support",
|
||||||
|
"instructions": "Voice: High-energy, upbeat, and encouraging, projecting enthusiasm and motivation."
|
||||||
|
},
|
||||||
|
"say": {
|
||||||
|
"text": "To speak to Sales press 1 or say Sales. To speak to customer support press 2 or say Support",
|
||||||
|
"synthesizer": {
|
||||||
|
"vendor": "google",
|
||||||
|
"language": "en-US",
|
||||||
|
"voice": {
|
||||||
|
"reportedUsage":"REALTIME",
|
||||||
|
"model":"path/to/model",
|
||||||
|
},
|
||||||
|
"fallbackVendor": "google",
|
||||||
|
"fallbackLanguage": "en-US",
|
||||||
|
"fallbackLabel": "label1",
|
||||||
|
"fallbackVoice": {
|
||||||
|
"reportedUsage":"REALTIME",
|
||||||
|
"model":"path/to/model",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"verb": "gather",
|
||||||
|
"actionHook": "http://example.com/collect",
|
||||||
|
"input": ["digits", "speech"],
|
||||||
|
"bargein": true,
|
||||||
|
"dtmfBargein": true,
|
||||||
|
"finishOnKey": "#",
|
||||||
|
"numDigits": 5,
|
||||||
|
"timeout": 8,
|
||||||
|
"recognizer": {
|
||||||
|
"vendor": "verbio",
|
||||||
|
"language": "en-US",
|
||||||
|
"verbioOptions": {
|
||||||
|
"enable_formatting": true,
|
||||||
|
"enable_diarization": true,
|
||||||
|
"topic": 0,
|
||||||
|
"inline_grammar": "this is inline grammar",
|
||||||
|
"grammar_uri": "https://grammar_uri.com",
|
||||||
|
"label": "label",
|
||||||
|
"recognition_timeout": 500,
|
||||||
|
"speech_complete_timeout": 500,
|
||||||
|
"speech_incomplete_timeout": 500,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"verb": "gather",
|
||||||
|
"actionHook": "http://example.com/collect",
|
||||||
|
"input": ["digits", "speech"],
|
||||||
|
"bargein": true,
|
||||||
|
"dtmfBargein": true,
|
||||||
|
"finishOnKey": "#",
|
||||||
|
"numDigits": 5,
|
||||||
|
"timeout": 8,
|
||||||
|
"recognizer": {
|
||||||
|
"vendor": "houndify",
|
||||||
|
"language": "en-US",
|
||||||
|
"houndifyOptions": {
|
||||||
|
"requestInfo": {
|
||||||
|
"Latitude": 30.6,
|
||||||
|
"Longitude": 30.6,
|
||||||
|
"City": "Huston"
|
||||||
|
},
|
||||||
|
"sampleRate": 16000,
|
||||||
|
"latitude": 30.6,
|
||||||
|
"longitude": 30.6,
|
||||||
|
"city": "Huston",
|
||||||
|
"state": "CA",
|
||||||
|
"country": "US",
|
||||||
|
"timeZone": "GMT",
|
||||||
|
"domain": "Voice",
|
||||||
|
"audioEndpoint": "https://api.houndify.com/v1/audio",
|
||||||
|
"maxSilenceSeconds": 5,
|
||||||
|
"maxSilenceAfterFullQuerySeconds": 3,
|
||||||
|
"maxSilenceAfterPartialQuerySeconds": 2,
|
||||||
|
"vadSensitivity": 0.5,
|
||||||
|
"vadTimeout": 1000,
|
||||||
|
"vadMode": "auto",
|
||||||
|
"vadVoiceMs": 250,
|
||||||
|
"vadSilenceMs": 500,
|
||||||
|
"vadDebug": true,
|
||||||
|
"audioFormat": "PCM16",
|
||||||
|
"enableNoiseReduction": true,
|
||||||
|
"enableProfanityFilter": false,
|
||||||
|
"enablePunctuation": true,
|
||||||
|
"enableCapitalization": true,
|
||||||
|
"confidenceThreshold": 0.7,
|
||||||
|
"enableDisfluencyFilter": true,
|
||||||
|
"maxResults": 5,
|
||||||
|
"enableWordTimestamps": true,
|
||||||
|
"maxAlternatives": 3,
|
||||||
|
"partialTranscriptInterval": 100,
|
||||||
|
"sessionTimeout": 30000,
|
||||||
|
"connectionTimeout": 5000,
|
||||||
|
"customVocabulary": ["jambonz", "telephony", "voip"],
|
||||||
|
"languageModel": "enhanced"
|
||||||
|
},
|
||||||
|
"gladiaOptions": {
|
||||||
|
"post_processing": {
|
||||||
|
"summarization": false,
|
||||||
|
"summarization_config": {
|
||||||
|
"type": "general"
|
||||||
|
},
|
||||||
|
"chapterization": false
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"verb": "gather",
|
||||||
|
"actionHook": "http://example.com/collect",
|
||||||
|
"input": ["digits", "speech"],
|
||||||
|
"bargein": true,
|
||||||
|
"dtmfBargein": true,
|
||||||
|
"finishOnKey": "#",
|
||||||
|
"numDigits": 5,
|
||||||
|
"timeout": 8,
|
||||||
|
"recognizer": {
|
||||||
|
"vendor": "google",
|
||||||
|
"language": "en-US",
|
||||||
|
"fallbackVendor": "google",
|
||||||
|
"fallbackLanguage": "en-US",
|
||||||
|
"fallbackLabel": "label1",
|
||||||
|
"hints": ["sales", "support"],
|
||||||
|
"hintsBoost": 10,
|
||||||
|
"deepgramOptions": {
|
||||||
|
"endpointing": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"actionHookDelayAction": {
|
||||||
|
"noResponseTimeout": 5,
|
||||||
|
"noResponseGiveUpTimeout": 10,
|
||||||
|
"retries": 3,
|
||||||
|
"actions": [
|
||||||
|
{
|
||||||
|
"verb": "say",
|
||||||
|
"text": "To speak to Sales press 1 or say Sales. To speak to customer support press 2 or say Support",
|
||||||
|
"synthesizer": {
|
||||||
|
"vendor": "google",
|
||||||
|
"language": "en-US"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"verb": "play",
|
||||||
|
"url": "https://example.com/example.mp3",
|
||||||
|
"timeoutSecs": 10,
|
||||||
|
"seekOffset": 8000,
|
||||||
|
"actionHook": "/play/action"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -161,6 +428,46 @@ test("validate correct verbs", async (t) => {
|
|||||||
"url": "wss://myrecorder.example.com/calls",
|
"url": "wss://myrecorder.example.com/calls",
|
||||||
"mixType" : "stereo"
|
"mixType" : "stereo"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"verb": "listen",
|
||||||
|
"url": "wss://myrecorder.example.com/calls",
|
||||||
|
"mixType" : "stereo",
|
||||||
|
"bidirectionalAudio": {
|
||||||
|
enabled: true,
|
||||||
|
streaming: true,
|
||||||
|
sampleRate: 8000
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"verb": "config",
|
||||||
|
"listen": {
|
||||||
|
"enable": true,
|
||||||
|
"url": "wss://myrecorder.example.com/calls",
|
||||||
|
"mixType" : "stereo",
|
||||||
|
"bidirectionalAudio": {
|
||||||
|
enabled: true,
|
||||||
|
streaming: true,
|
||||||
|
sampleRate: 8000
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"verb": "config",
|
||||||
|
"autoStreamTts": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"verb": "config",
|
||||||
|
"vad": {
|
||||||
|
"enable": true,
|
||||||
|
"voiceMs": 250,
|
||||||
|
"silenceMs": 150,
|
||||||
|
"strategy": "one-shot",
|
||||||
|
"mode": 2,
|
||||||
|
"vendor": "webrtc",
|
||||||
|
"threshold": 0.5,
|
||||||
|
"speechPadMs": 1000
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"verb": "message",
|
"verb": "message",
|
||||||
"to": "15083084809",
|
"to": "15083084809",
|
||||||
@@ -219,6 +526,12 @@ test("validate correct verbs", async (t) => {
|
|||||||
"referTo": "+15083084809",
|
"referTo": "+15083084809",
|
||||||
"actionHook": "/action"
|
"actionHook": "/action"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"verb": "sip:refer",
|
||||||
|
"referTo": "+15083084809",
|
||||||
|
"referredByDisplayName": "Alice",
|
||||||
|
"actionHook": "/action"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"verb": "tag",
|
"verb": "tag",
|
||||||
"data": {
|
"data": {
|
||||||
@@ -231,10 +544,124 @@ test("validate correct verbs", async (t) => {
|
|||||||
"verb": "transcribe",
|
"verb": "transcribe",
|
||||||
"transcriptionHook": "http://example.com/transcribe",
|
"transcriptionHook": "http://example.com/transcribe",
|
||||||
"recognizer": {
|
"recognizer": {
|
||||||
"vendor": "google",
|
"vendor": "nvidia",
|
||||||
"language" : "en-US",
|
"language" : "en-US",
|
||||||
"interim": true
|
"interim": true
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"verb": "transcribe",
|
||||||
|
"transcriptionHook": "http://example.com/transcribe",
|
||||||
|
"recognizer": {
|
||||||
|
"vendor": "nvidia",
|
||||||
|
"language" : "en-US",
|
||||||
|
"interim": true,
|
||||||
|
"elevenlabsOptions": {
|
||||||
|
"includeTimestamps": true,
|
||||||
|
"commitStrategy": "vad",
|
||||||
|
"vadSilenceThresholdSecs": 0.8,
|
||||||
|
"vadThreshold": 0.5,
|
||||||
|
"minSpeechDurationMs": 300,
|
||||||
|
"minSilenceDurationMs": 500,
|
||||||
|
"enableLogging": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"verb": "transcribe",
|
||||||
|
"transcriptionHook": "http://example.com/transcribe",
|
||||||
|
"recognizer": {
|
||||||
|
"vendor": "nvidia",
|
||||||
|
"language" : "en-US",
|
||||||
|
"customOptions": {
|
||||||
|
"sampleRate": 16000
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"verb": "transcribe",
|
||||||
|
"transcriptionHook": "http://example.com/transcribe",
|
||||||
|
"recognizer": {
|
||||||
|
"vendor": "nvidia",
|
||||||
|
"language" : "en-US",
|
||||||
|
"interim": true,
|
||||||
|
"googleOptions": {
|
||||||
|
"serviceVersion": "v2",
|
||||||
|
"speechStartTimeoutMs": 500,
|
||||||
|
"speechEndTimeoutMs": 1000,
|
||||||
|
"enableVoiceActivityEvents": true,
|
||||||
|
"transcriptNormalization" : [
|
||||||
|
{
|
||||||
|
"search": "dog",
|
||||||
|
"replace": "cat",
|
||||||
|
"case_sensitive": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"verb": "rest:dial",
|
||||||
|
"account_sid": "1291964182631236912836123912",
|
||||||
|
"call_hook": {
|
||||||
|
"url": "http://127.0.0.1:3100/",
|
||||||
|
"method": "POST",
|
||||||
|
"username": "username",
|
||||||
|
"password": "password",
|
||||||
|
},
|
||||||
|
"from": "15583084810",
|
||||||
|
"to": {
|
||||||
|
"type": "phone",
|
||||||
|
"number": "15583084809",
|
||||||
|
},
|
||||||
|
"tag": {
|
||||||
|
"customer": "acme",
|
||||||
|
"referenceId": "deadbeef",
|
||||||
|
},
|
||||||
|
"amd": {
|
||||||
|
"actionHook": "/answeringMachineDetection",
|
||||||
|
|
||||||
|
},
|
||||||
|
"dual_streams": true,
|
||||||
|
"timeLimit" : 10
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"verb": "llm",
|
||||||
|
"vendor": 'ultravox',
|
||||||
|
"model": 'fixie-ai/ultravox',
|
||||||
|
"auth": {
|
||||||
|
"apiKey": "sk-1234567890abcdefg"
|
||||||
|
},
|
||||||
|
"llmOptions": {
|
||||||
|
"firstSpeaker": 'FIRST_SPEAKER_AGENT',
|
||||||
|
},
|
||||||
|
"mcpServers": [
|
||||||
|
{
|
||||||
|
"url": 'https://mcp.example.com',
|
||||||
|
"auth": {
|
||||||
|
"username": 'username',
|
||||||
|
"password": 'password'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"verb": "transcribe",
|
||||||
|
"transcriptionHook": "http://example.com/transcribe",
|
||||||
|
"recognizer": {
|
||||||
|
"vendor": "speechmatics",
|
||||||
|
"language": "en",
|
||||||
|
"speechmaticsOptions": {
|
||||||
|
"transcription_config": {
|
||||||
|
"language": "en",
|
||||||
|
"enable_partials": true,
|
||||||
|
"max_delay": 2,
|
||||||
|
"conversation_config": {
|
||||||
|
"end_of_utterance_silence_trigger": 0.5
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user