你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Call Media - Hold

使用标识符从呼叫中保留参与者。

POST {endpoint}/calling/callConnections/{callConnectionId}:hold?api-version=2024-06-15-preview

URI 参数

名称 必需 类型 说明
callConnectionId
path True

string

调用连接 ID。

endpoint
path True

string (url)

Azure 通信资源的终结点。

api-version
query True

string

要调用的 API 版本。

请求头

名称 必需 类型 说明
Authorization True

string

Azure 通信服务用户访问令牌。

请求正文

名称 必需 类型 说明
targetParticipant True

CommunicationIdentifierModel

operationCallbackUri

string

设置一个回调 URI,用于替代 CreateCall/AnswerCall 为此操作设置的默认回调 URI。 此设置按操作。 如果未设置,将使用 CreateCall/AnswerCall 设置的默认回调 URI。

operationContext

string

客户在调用中调用操作时使用,以将请求与响应事件相关联。

playSourceInfo

PlaySource

提示在按住时播放。

响应

名称 类型 说明
200 OK

返回保留参与者响应

Other Status Codes

CommunicationErrorResponse

错误

安全性

Authorization

Azure 通信服务用户访问令牌。

类型: apiKey
在: header

示例

CallMedia_Hold

示例请求

POST https://contoso.communications.azure.com/calling/callConnections/18dea47f-b081-4107-9a5c-4300819d2c6c:hold?api-version=2024-06-15-preview

{
  "targetParticipant": {
    "kind": "communicationUser",
    "communicationUser": {
      "id": "8:acs:b9614373-fd0b-480c-8fd2-cb58b70eab9f_0f50d091-5bd3-448b-884d-44be7037d9b9"
    }
  },
  "playSourceInfo": {
    "kind": "file",
    "file": {
      "uri": "https://some.file.azure.com/sample.wav"
    }
  }
}

示例响应

定义

名称 说明
FileSource
HoldRequest

用于从呼叫中保存参与者的请求有效负载。

PlaySource
PlaySourceType

定义播放源的类型

SsmlSource
TextSource
VoiceKind

语音类型

FileSource

名称 类型 说明
uri

string

要播放的音频文件的 URI

HoldRequest

用于从呼叫中保存参与者的请求有效负载。

名称 类型 说明
operationCallbackUri

string

设置一个回调 URI,用于替代 CreateCall/AnswerCall 为此操作设置的默认回调 URI。 此设置按操作。 如果未设置,将使用 CreateCall/AnswerCall 设置的默认回调 URI。

operationContext

string

客户在调用中调用操作时使用,以将请求与响应事件相关联。

playSourceInfo

PlaySource

提示在按住时播放。

targetParticipant

CommunicationIdentifierModel

PlaySource

名称 类型 说明
file

FileSource

定义要用于播放的文件源信息

kind

PlaySourceType

定义播放源的类型

playSourceCacheId

string

定义用于缓存相关媒体的标识符

ssml

SsmlSource

定义要用于播放的 ssml(语音合成标记语言)源信息

text

TextSource

定义要用于播放的文本源信息

PlaySourceType

定义播放源的类型

说明
file
text
ssml

SsmlSource

名称 类型 说明
customVoiceEndpointId

string

部署自定义语音的终结点。

ssmlText

string

要播放的认知服务的 Ssml 字符串

TextSource

名称 类型 说明
customVoiceEndpointId

string

部署自定义语音的终结点。

sourceLocale

string

要播放的源语言区域设置请参阅此处的可用区域设置:

text

string

要播放的认知服务的文本

voiceKind

VoiceKind

语音类型

voiceName

string

要播放的语音名称请参阅此处的可用文本转语音:

VoiceKind

语音类型

说明
male
female