mirror of
https://github.com/jambonz/verb-specifications.git
synced 2025-12-19 04:47:47 +00:00
support bot delay action (#26)
* support bot delay action * support bot delay action
This commit is contained in:
15
specs.json
15
specs.json
@@ -46,7 +46,8 @@
|
||||
"amd": "#amd",
|
||||
"notifyEvents": "boolean",
|
||||
"reset": "string|array",
|
||||
"onHoldMusic": "string"
|
||||
"onHoldMusic": "string",
|
||||
"actionHookDelayAction": "#actionHookDelayAction"
|
||||
},
|
||||
"required": []
|
||||
},
|
||||
@@ -174,7 +175,8 @@
|
||||
"timeout": "number",
|
||||
"recognizer": "#recognizer",
|
||||
"play": "#play",
|
||||
"say": "#say"
|
||||
"say": "#say",
|
||||
"actionHookDelayAction": "#actionHookDelayAction"
|
||||
},
|
||||
"required": [
|
||||
]
|
||||
@@ -840,5 +842,14 @@
|
||||
"toneTimeoutMs": "number",
|
||||
"greetingCompletionTimeoutMs": "number"
|
||||
}
|
||||
},
|
||||
"actionHookDelayAction" : {
|
||||
"properties": {
|
||||
"enabled": "boolean",
|
||||
"noResponseTimeout": "number",
|
||||
"noResponseGiveUpTimeout": "number",
|
||||
"retries": "number",
|
||||
"actions": "array"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -37,7 +37,30 @@ test("validate correct verbs", async (t) => {
|
||||
"input" : ["speech"],
|
||||
"actionHook": "/userInput"
|
||||
},
|
||||
"onHoldMusic": "http://server.com/hold"
|
||||
"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",
|
||||
@@ -174,6 +197,28 @@ test("validate correct verbs", async (t) => {
|
||||
"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",
|
||||
|
||||
Reference in New Issue
Block a user