共用方式為


Call Connection - Add Participant

將參與者新增至通話。

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

URI 參數

名稱 位於 必要 類型 Description
callConnectionId
path True

string

呼叫連線標識碼

endpoint
path True

string

url

Azure 通訊資源的端點。

api-version
query True

string

要叫用的 API 版本。

要求標頭

名稱 必要 類型 Description
Authorization True

string

Azure 通訊服務用戶存取令牌。

Repeatability-Request-ID

string

uuid

如果指定,用戶端會指示要求可重複;也就是說,用戶端可以使用相同的可重複性-Request-Id 多次提出要求,並取得適當的回應,而不需要伺服器多次執行要求。 Repeatability-Request-Id 的值是不透明的字元串,代表要求客戶端產生的唯一標識符。 它是第 4 版 (隨機) UUID。

Repeatability-First-Sent

string

date-time-rfc1123

如果指定 Repeatability-Request-ID 標頭,則也必須指定 Repeatability-First-Sent 標頭。 此值應該是第一次建立要求的日期和時間,以IMF修正的 HTTP 日期形式表示。 範例:Sun, 1994 年 11 月 6 日 08:49:37 GMT。

要求本文

名稱 必要 類型 Description
participantToAdd True

CommunicationIdentifierModel

customCallingContext

CustomCallingContext

客戶用來將自定義通話內容傳送至目標

invitationTimeoutInSeconds

integer

取得或設定等候受邀參與者取貨的逾時。 此值的最大值為180秒

operationCallbackUri

string

設定回呼 URI,以覆寫此作業的 CreateCall/AnswerCall 所設定的預設回呼 URI。 此設定是個別動作。 如果未設定,則會使用 CreateCall/AnswerCall 所設定的預設回呼 URI。

operationContext

string

客戶在呼叫中呼叫動作時使用,以將要求與回應事件相互關聯。

sourceCallerIdNumber

PhoneNumberIdentifierModel

sourceDisplayName

string

(選擇性)新增 PSTN 參與者或小組使用者時,與這個邀請作業相關聯的來源顯示名稱。 注意:不會更新名冊中的顯示名稱。

回應

名稱 類型 Description
202 Accepted

AddParticipantResponse

服務已接受新增參與者要求,並開始處理它。 您會在指定的回呼 URI 收到 AddParticipantSucceeded 或 AddParticipantFailed 事件,以更新要求的狀態。

Other Status Codes

CommunicationErrorResponse

錯誤

安全性

Authorization

Azure 通訊服務用戶存取令牌。

類型: apiKey
位於: header

範例

CallConnection_AddParticipant

範例要求

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

{
  "participantToAdd": {
    "kind": "communicationUser",
    "communicationUser": {
      "id": "8:acs:b9614373-fd0b-480c-8fd2-cb58b70eab9f_ae9e3307-f56e-44be-8934-80a63f080538"
    }
  },
  "operationContext": "adding participant",
  "sourceCallerIdNumber": {
    "value": "+18440123456"
  },
  "operationCallbackUri": "https://app.contoso.com/callback"
}

範例回覆

{
  "operationContext": "adding participant",
  "participant": {
    "identifier": {
      "kind": "communicationUser",
      "communicationUser": {
        "id": "8:acs:b9614373-fd0b-480c-8fd2-cb58b70eab9f_ae9e3307-f56e-44be-8934-80a63f080538"
      }
    },
    "isMuted": false
  },
  "invitationId": "7b4244f8-d2ff-46d1-a629-4f9fb5f73d40"
}

定義

名稱 Description
AddParticipantRequest

將參與者新增至呼叫的要求承載。

AddParticipantResponse

將參與者新增至呼叫的響應承載。

CallParticipant

通話參與者。

CustomCallingContext

將傳送至目標的自定義呼叫內容

AddParticipantRequest

將參與者新增至呼叫的要求承載。

名稱 類型 Description
customCallingContext

CustomCallingContext

客戶用來將自定義通話內容傳送至目標

invitationTimeoutInSeconds

integer

取得或設定等候受邀參與者取貨的逾時。 此值的最大值為180秒

operationCallbackUri

string

設定回呼 URI,以覆寫此作業的 CreateCall/AnswerCall 所設定的預設回呼 URI。 此設定是個別動作。 如果未設定,則會使用 CreateCall/AnswerCall 所設定的預設回呼 URI。

operationContext

string

客戶在呼叫中呼叫動作時使用,以將要求與回應事件相互關聯。

participantToAdd

CommunicationIdentifierModel

sourceCallerIdNumber

PhoneNumberIdentifierModel

sourceDisplayName

string

(選擇性)新增 PSTN 參與者或小組使用者時,與這個邀請作業相關聯的來源顯示名稱。 注意:不會更新名冊中的顯示名稱。

AddParticipantResponse

將參與者新增至呼叫的響應承載。

名稱 類型 Description
invitationId

string

用來新增參與者的邀請標識碼。

operationContext

string

用戶端所提供的作業內容。

participant

CallParticipant

通話中目前參與者的清單。

CallParticipant

通話參與者。

名稱 類型 Description
identifier

CommunicationIdentifierModel

isMuted

boolean

參與者已靜音

isOnHold

boolean

為保留參與者。

CustomCallingContext

將傳送至目標的自定義呼叫內容

名稱 類型 Description
sipHeaders

object

自訂呼叫內容 SIP 標頭

voipHeaders

object

自定義呼叫內容 VoiP 標頭