Gather DTMF from a call
Use this request to gather DTMF - digits entered by user. Gather command can be nested with a playback or a say.
POST
/workspaces/{workspaceId}/channels/{channelId}/calls/{callId}/gather
Gather DTMF from a channel call
请求载荷
maxNumKeys
integer
endKey
string
Possible values: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, *, #
timeout
integer
retries
integer
input
string
Possible values: dtmf, speech, dtmf speech
speechLocale
string
Possible values: de-DE, en-AU, en-GB, en-US, es-US, it-IT, ja-JP, ko-KR, pt-BR, th-TH, zh-CN
playback
object
显示子参数
playback.media
array of string
必填
playback.loop
integer
playback.timeout
integer
playback.pauseMilliseconds
integer
say
object
显示子参数
say.text
string
必填
say.locale
string
Curated set of BCP47 locale identifiers supported by AWS Polly text-to-speech in Bird voice products
Possible values: arb, ar-AE, bg-BG, bn-IN, ca-ES, cs-CZ, cy-GB, cmn-CN, da-DK, de-CH, de-DE, de-AT, el-GR, en-AU, en-GB, en-IN, en-NZ, en-ZA, en-US, en-GB-WLS, es-ES, es-MX, es-US, eu-ES, fi-FI, fil-PH, fr-FR, fr-BE, fr-CA, gl-ES, gu-IN, he-IL, hi-IN, hu-HU, id-ID, is-IS, it-IT, ja-JP, ko-KR, lt-LT, lv-LV, ms-MY, nl-BE, nl-NL, nb-NO, pa-IN, pl-PL, pt-BR, pt-PT, ro-RO, ru-RU, sk-SK, sr-RS, sv-SE, ta-IN, te-IN, tr-TR, th-TH, uk-UA, vi-VN, yue-CN
say.voice
string
say.loop
integer
say.timeout
integer
响应载荷
id
string
callId
string
callFlowId
string
status
string
command
string
conditions
array of object
显示子属性
conditions.variable
string
Possible values: keys, speech
conditions.operator
string
Possible values: eq, ne, ==, !=, contains
conditions.value
string
代码示例
curl -X POST 'https://api.bird.com/workspaces/{workspaceId}/channels/{channelId}/calls/{callId}/gather' \
-H 'Authorization: AccessKey YOUR_ACCESS_KEY'代码示例
curl -X POST "https://api.bird.com/workspaces/{workspaceId}/channels/{channelId}/calls/{callId}/gather" \
-H "Authorization: AccessKey YOUR_SECRET_TOKEN"
代码示例
{
"maxNumKeys": 0,
"endKey": "0",
"timeout": 0,
"retries": 0,
"input": "dtmf",
"playback": {
"media": [
"string"
],
"loop": 0,
"timeout": 0
},
"say": {
"text": "string",
"locale": [
"en-US"
],
"voice": "male",
"loop": 0,
"timeout": 0
}
}
代码示例
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"callId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"callFlowId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "string",
"command": "string"
}