我希望允许呼叫者在 Twilio Autopilot 的 Say Action 期间插入。那可能吗?在通话开始时,我读了一份可能要对机器人说的话的列表 - 但该列表正在不断增长,并且希望用户能够中断阅读并进行适当的操作,而无需等待结束。
这里是 Twilio 开发者布道者。
文档尚未更新,但支持插入。默认情况下,客户可以中断Say正在Collect使用的语音。如果您想禁用barge,可以false在下面的listen或collect属性中将其设置speech。
该 JSON 可能类似于:
{
"actions": [
{
"say": "Hi, how can I help you today?"
},
{
"listen": {
"barge": true
}
}
]
}
Run Code Online (Sandbox Code Playgroud)
或者更复杂say:
{
"actions": [
{
"say": {
"speech": "Hello! how can I help you. Say or press 1 for sales, 2 for support."
}
},
{
"listen": {
"voice_digits": {
"redirects": {
"1": "task://sales",
"2": "task://support"
}
},
"barge": false
}
}
]
}
Run Code Online (Sandbox Code Playgroud)
或者Collect可能看起来像这样:
{
"actions":[
{
"collect":{
"name":"collect_custom",
"questions":[
{
"question":"What office are you based out of? Press 1 for San Francisco. 2 for Mountain View. 3 for Remote",
"name":"twilio_office",
"type":"twilio_office",
"voice_digits":{
"mapping":{
"1":"San Francisco",
"2":"Mountain View",
"3":"Remote"
}
},
"barge":false
}
],
"on_complete":{
"redirect":{
"uri":"https://example.com/collect",
"method":"POST"
}
}
}
}
]
}
Run Code Online (Sandbox Code Playgroud)
让我知道这是否有帮助!
| 归档时间: |
|
| 查看次数: |
372 次 |
| 最近记录: |