Call Connections - Add Participant
将参与者添加到呼叫。
POST {endpoint}/calling/callConnections/{callConnectionId}/participants:add?api-version=2022-04-07-preview
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
call
|
path | True |
string |
呼叫连接 ID |
|
endpoint
|
path | True |
string (url) |
Azure 通信资源的终结点。 |
|
api-version
|
query | True |
string |
要调用的 API 版本。 |
请求头
| 名称 | 必需 | 类型 | 说明 |
|---|---|---|---|
| Repeatability-Request-ID |
string (uuid) |
如果指定,客户端将指示请求可重复;也就是说,客户端可以使用相同的可重复性-Request-Id 多次发出请求并返回适当的响应,而无需服务器多次执行请求。 Repeatability-Request-Id 的值是表示请求的客户端生成的唯一标识符的不透明字符串。 它是版本 4 (随机) UUID。 |
|
| Repeatability-First-Sent |
string |
如果指定了 Repeatability-Request-ID 标头,则还必须指定 Repeatability-First-Sent 标头。 该值应为首次创建请求的日期和时间,使用 IMF 修复日期形式的 HTTP 日期表示。 示例:1994年11月6日 08:49:37 GMT。 |
请求正文
| 名称 | 必需 | 类型 | 说明 |
|---|---|---|---|
| participantsToAdd | True |
要邀请的参与者。 |
|
| invitationTimeoutInSeconds |
integer (int32) minimum: 0maximum: 180 |
获取或设置等待受邀参与者取件的超时。 此值的最大值为 180 秒 |
|
| operationContext |
string |
客户在调用中调用操作时使用,以将请求与响应事件相关联。 |
|
| sourceCallerId |
源呼叫者 ID(电话号码)会显示给受邀的 PSTN 参与者。 仅在邀请 PSTN 参与者时是必需的。 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 202 Accepted |
返回添加参与者响应。 |
|
| Other Status Codes |
错误 |
示例
Add participants to the call.
示例请求
POST https://contoso.communications.azure.com/calling/callConnections/18dea47f-b081-4107-9a5c-4300819d2c6c/participants:add?api-version=2022-04-07-preview
{
"participantsToAdd": [
{
"kind": "communicationUser",
"communicationUser": {
"id": "8:acs:b9614373-fd0b-480c-8fd2-cb58b70eab9f_ae9e3307-f56e-44be-8934-80a63f080538"
}
}
],
"operationContext": "adding participant",
"sourceCallerId": {
"value": "+18440123456"
}
}
示例响应
{
"operationContext": "adding participant",
"participants": [
{
"identifier": {
"kind": "communicationUser",
"communicationUser": {
"id": "8:acs:b9614373-fd0b-480c-8fd2-cb58b70eab9f_ae9e3307-f56e-44be-8934-80a63f080538"
}
},
"isMuted": false
}
]
}
定义
| 名称 | 说明 |
|---|---|
|
Acs |
ACS 呼叫参与者的合同模型 |
|
Add |
将参与者添加到呼叫的请求有效负载。 |
|
Add |
用于将参与者添加到呼叫的响应有效负载。 |
|
Communication |
|
|
Communication |
|
|
Communication |
通信服务错误响应 |
|
Communication |
|
|
Communication |
CommunicationIdentifierModel 的类型。 |
|
Communication |
|
|
Microsoft |
|
|
Phone |
AcsCallParticipant
ACS 呼叫参与者的合同模型
| 名称 | 类型 | 说明 |
|---|---|---|
| identifier |
参与者的通信标识符 |
|
| isMuted |
boolean |
参与者静音 |
AddParticipantsRequest
将参与者添加到呼叫的请求有效负载。
| 名称 | 类型 | 说明 |
|---|---|---|
| invitationTimeoutInSeconds |
integer (int32) minimum: 0maximum: 180 |
获取或设置等待受邀参与者取件的超时。 此值的最大值为 180 秒 |
| operationContext |
string |
客户在调用中调用操作时使用,以将请求与响应事件相关联。 |
| participantsToAdd |
要邀请的参与者。 |
|
| sourceCallerId |
源呼叫者 ID(电话号码)会显示给受邀的 PSTN 参与者。 仅在邀请 PSTN 参与者时是必需的。 |
AddParticipantsResponse
用于将参与者添加到呼叫的响应有效负载。
| 名称 | 类型 | 说明 |
|---|---|---|
| operationContext |
string |
客户端提供的操作上下文。 |
| participants |
通话中当前参与者的列表。 |
CommunicationCloudEnvironmentModel
| 值 | 说明 |
|---|---|
| public | |
| dod | |
| gcch |
CommunicationError
| 名称 | 类型 | 说明 |
|---|---|---|
| code |
string |
|
| details | ||
| innererror | ||
| message |
string |
|
| target |
string |
CommunicationErrorResponse
通信服务错误响应
| 名称 | 类型 | 说明 |
|---|---|---|
| error |
CommunicationIdentifierModel
| 名称 | 类型 | 说明 |
|---|---|---|
| communicationUser |
通信用户。 |
|
| kind |
CommunicationIdentifierModel 的类型。 |
|
| microsoftTeamsUser |
Microsoft Teams 用户。 |
|
| phoneNumber |
电话号码。 |
|
| rawId |
string |
标识符的完整 ID。 |
CommunicationIdentifierModelKind
CommunicationIdentifierModel 的类型。
| 值 | 说明 |
|---|---|
| unknown | |
| communicationUser | |
| phoneNumber | |
| microsoftTeamsUser |
CommunicationUserIdentifierModel
| 名称 | 类型 | 说明 |
|---|---|---|
| id |
string |
MicrosoftTeamsUserIdentifierModel
| 名称 | 类型 | 说明 |
|---|---|---|
| cloud | ||
| isAnonymous |
boolean |
|
| userId |
string |
PhoneNumberIdentifierModel
| 名称 | 类型 | 说明 |
|---|---|---|
| value |
string |