mirror of
https://github.com/jambonz/verb-specifications.git
synced 2026-03-26 13:59:02 +00:00
Compare commits
48 Commits
feat/advan
...
v0.0.41
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 |
@@ -58,7 +58,8 @@ function validateVerb(name, data, logger) {
|
||||
const dSpec = specData.properties[dKey];
|
||||
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`);
|
||||
}
|
||||
else if (typeof dSpec === 'string' && dSpec.includes('|')) {
|
||||
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@jambonz/verb-specifications",
|
||||
"version": "0.0.22",
|
||||
"version": "0.0.41",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@jambonz/verb-specifications",
|
||||
"version": "0.0.22",
|
||||
"version": "0.0.41",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"debug": "^4.3.4",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@jambonz/verb-specifications",
|
||||
"version": "0.0.22",
|
||||
"version": "0.0.41",
|
||||
"description": "Jambonz Verb Specification Utilities",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
60
specs.json
60
specs.json
@@ -45,7 +45,10 @@
|
||||
"listen": "#listenOptions",
|
||||
"amd": "#amd",
|
||||
"notifyEvents": "boolean",
|
||||
"reset": "string|array"
|
||||
"reset": "string|array",
|
||||
"onHoldMusic": "string",
|
||||
"actionHookDelayAction": "#actionHookDelayAction",
|
||||
"sipRequestWithinDialogHook": "object|string"
|
||||
},
|
||||
"required": []
|
||||
},
|
||||
@@ -59,7 +62,12 @@
|
||||
"type": "string",
|
||||
"enum": ["mono", "stereo", "mixed"]
|
||||
},
|
||||
"metadata": "object"
|
||||
"metadata": "object",
|
||||
"maxLength": "number",
|
||||
"passDtmf": "boolean",
|
||||
"playBeep": "boolean",
|
||||
"disableBidirectionalAudio": "boolean",
|
||||
"timeout": "number"
|
||||
},
|
||||
"required": [
|
||||
"enable"
|
||||
@@ -168,7 +176,8 @@
|
||||
"timeout": "number",
|
||||
"recognizer": "#recognizer",
|
||||
"play": "#play",
|
||||
"say": "#say"
|
||||
"say": "#say",
|
||||
"actionHookDelayAction": "#actionHookDelayAction"
|
||||
},
|
||||
"required": [
|
||||
]
|
||||
@@ -180,6 +189,7 @@
|
||||
"beep": "boolean",
|
||||
"startConferenceOnEnter": "boolean",
|
||||
"endConferenceOnExit": "boolean",
|
||||
"endConferenceDuration": "number",
|
||||
"maxParticipants": "number",
|
||||
"joinMuted": "boolean",
|
||||
"actionHook": "object|string",
|
||||
@@ -197,6 +207,7 @@
|
||||
"properties": {
|
||||
"id": "string",
|
||||
"actionHook": "object|string",
|
||||
"onHoldHook": "object|string",
|
||||
"answerOnBridge": "boolean",
|
||||
"callerId": "string",
|
||||
"callerName": "string",
|
||||
@@ -364,7 +375,8 @@
|
||||
"enum": ["startCallRecording", "stopCallRecording", "pauseCallRecording", "resumeCallRecording"]
|
||||
},
|
||||
"recordingID": "string",
|
||||
"siprecServerURL": "string"
|
||||
"siprecServerURL": "string|array",
|
||||
"headers": "object"
|
||||
},
|
||||
"required": [
|
||||
"action"
|
||||
@@ -398,7 +410,8 @@
|
||||
"to": "#target",
|
||||
"headers": "object",
|
||||
"timeout": "number",
|
||||
"amd": "#amd"
|
||||
"amd": "#amd",
|
||||
"dual_streams" : "boolean"
|
||||
},
|
||||
"required": [
|
||||
"call_hook",
|
||||
@@ -423,7 +436,7 @@
|
||||
"earlyMedia": "boolean"
|
||||
},
|
||||
"required": [
|
||||
"recognizer"
|
||||
"transcriptionHook"
|
||||
]
|
||||
},
|
||||
"target": {
|
||||
@@ -473,8 +486,13 @@
|
||||
"synthesizer": {
|
||||
"properties": {
|
||||
"vendor": "string",
|
||||
"label": "string",
|
||||
"language": "string",
|
||||
"voice": "string",
|
||||
"fallbackVendor": "string",
|
||||
"fallbackLabel": "string",
|
||||
"fallbackLanguage": "string",
|
||||
"fallbackVoice": "string",
|
||||
"engine": {
|
||||
"type": "string",
|
||||
"enum": ["standard", "neural"]
|
||||
@@ -492,7 +510,11 @@
|
||||
"recognizer": {
|
||||
"properties": {
|
||||
"vendor": "string",
|
||||
"label": "string",
|
||||
"language": "string",
|
||||
"fallbackVendor": "string",
|
||||
"fallbackLabel": "string",
|
||||
"fallbackLanguage": "string",
|
||||
"vad": "#vad",
|
||||
"hints": "array",
|
||||
"hintsBoost": "number",
|
||||
@@ -555,11 +577,13 @@
|
||||
"azureSttEndpointId": "string",
|
||||
"asrDtmfTerminationDigit": "string",
|
||||
"asrTimeout": "number",
|
||||
"fastRecognitionTimeout": "number",
|
||||
"nuanceOptions": "#nuanceOptions",
|
||||
"deepgramOptions": "#deepgramOptions",
|
||||
"ibmOptions": "#ibmOptions",
|
||||
"nvidiaOptions": "#nvidiaOptions",
|
||||
"sonioxOptions": "#sonioxOptions",
|
||||
"cobaltOptions": "#cobaltOptions",
|
||||
"customOptions": "#customOptions"
|
||||
},
|
||||
"required": [
|
||||
@@ -575,6 +599,18 @@
|
||||
"required": [
|
||||
]
|
||||
},
|
||||
"cobaltOptions": {
|
||||
"properties": {
|
||||
"serverUri": "string",
|
||||
"enableConfusionNetwork": "boolean",
|
||||
"metadata": "string",
|
||||
"compiledContextData": "string",
|
||||
"wordTimeOffsets": "boolean",
|
||||
"contextToken": "string"
|
||||
},
|
||||
"required": [
|
||||
]
|
||||
},
|
||||
"nvidiaOptions": {
|
||||
"properties": {
|
||||
"rivaUri": "string",
|
||||
@@ -613,6 +649,7 @@
|
||||
"customModel": "string",
|
||||
"version": "string",
|
||||
"punctuate": "boolean",
|
||||
"smartFormatting": "boolean",
|
||||
"profanityFilter": "boolean",
|
||||
"redact": {
|
||||
"type": "string",
|
||||
@@ -633,6 +670,8 @@
|
||||
"replace": "array",
|
||||
"keywords": "array",
|
||||
"endpointing": "boolean | number",
|
||||
"utteranceEndMs": "number",
|
||||
"shortUtterance": "boolean",
|
||||
"vadTurnoff": "number",
|
||||
"tag": "string"
|
||||
}
|
||||
@@ -807,5 +846,14 @@
|
||||
"toneTimeoutMs": "number",
|
||||
"greetingCompletionTimeoutMs": "number"
|
||||
}
|
||||
},
|
||||
"actionHookDelayAction" : {
|
||||
"properties": {
|
||||
"enabled": "boolean",
|
||||
"noResponseTimeout": "number",
|
||||
"noResponseGiveUpTimeout": "number",
|
||||
"retries": "number",
|
||||
"actions": "array"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -24,16 +24,64 @@ test("validate correct verbs", async (t) => {
|
||||
"verb": "config",
|
||||
"synthesizer": {
|
||||
"voice": "Jenny",
|
||||
"vendor": "google"
|
||||
"vendor": "google",
|
||||
"label": "label1"
|
||||
},
|
||||
"recognizer": {
|
||||
"vendor": "google",
|
||||
"language": "de-DE"
|
||||
"language": "de-DE",
|
||||
"label": "label1"
|
||||
},
|
||||
"bargeIn": {
|
||||
"enable": true,
|
||||
"input" : ["speech"],
|
||||
"actionHook": "/userInput"
|
||||
},
|
||||
"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",
|
||||
"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"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -46,6 +94,7 @@ test("validate correct verbs", async (t) => {
|
||||
{
|
||||
"verb": "dial",
|
||||
"actionHook": "/outdial",
|
||||
"onHoldHook": "/onHoldHook",
|
||||
"callerId": "+16173331212",
|
||||
"callerName": "Tom",
|
||||
"answerOnBridge": true,
|
||||
@@ -113,6 +162,7 @@ test("validate correct verbs", async (t) => {
|
||||
"language": "en-US",
|
||||
"hints": ["sales", "support"],
|
||||
"hintsBoost": 10,
|
||||
"fastRecognitionTimeout": 2000,
|
||||
"deepgramOptions": {
|
||||
"endpointing": 500
|
||||
}
|
||||
@@ -121,7 +171,12 @@ test("validate correct verbs", async (t) => {
|
||||
"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"
|
||||
"language": "en-US",
|
||||
"label": "label1",
|
||||
"fallbackVendor": "google",
|
||||
"fallbackLanguage": "en-US",
|
||||
"fallbackLabel": "label1",
|
||||
"fallbackVoice": "voice"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -137,12 +192,37 @@ test("validate correct verbs", async (t) => {
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"verb": "hangup",
|
||||
@@ -282,7 +362,8 @@ test("validate correct verbs", async (t) => {
|
||||
"amd": {
|
||||
"actionHook": "/answeringMachineDetection",
|
||||
|
||||
}
|
||||
},
|
||||
"dual_streams": true
|
||||
}
|
||||
];
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user