Call Media - Hold
Hold participant from the call using identifier.
POST {endpoint}/calling/callConnections/{callConnectionId}:hold?api-version=2024-06-15-preview
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
call
|
path | True |
string |
The call connection id. |
endpoint
|
path | True |
string (url) |
The endpoint of the Azure Communication resource. |
api-version
|
query | True |
string |
Version of API to invoke. |
Request Header
Name | Required | Type | Description |
---|---|---|---|
Authorization | True |
string |
An Azure Communication Services user access token. |
Request Body
Name | Required | Type | Description |
---|---|---|---|
targetParticipant | True |
Communication |
|
operationCallbackUri |
string |
Set a callback URI that overrides the default callback URI set by CreateCall/AnswerCall for this operation. This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used. |
|
operationContext |
string |
Used by customers when calling mid-call actions to correlate the request to the response event. |
|
playSourceInfo |
Prompt to play while in hold. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Returns the hold participant response |
|
Other Status Codes |
Communication |
Error |
Security
Authorization
An Azure Communication Services user access token.
Type:
apiKey
In:
header
Examples
CallMedia_Hold
Sample request
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"
}
}
}
Sample response
Definitions
Name | Description |
---|---|
File |
|
Hold |
The request payload for holding participant from the call. |
Play |
|
Play |
Defines the type of the play source |
Ssml |
|
Text |
|
Voice |
Voice kind type |
FileSource
Name | Type | Description |
---|---|---|
uri |
string |
Uri for the audio file to be played |
HoldRequest
The request payload for holding participant from the call.
Name | Type | Description |
---|---|---|
operationCallbackUri |
string |
Set a callback URI that overrides the default callback URI set by CreateCall/AnswerCall for this operation. This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used. |
operationContext |
string |
Used by customers when calling mid-call actions to correlate the request to the response event. |
playSourceInfo |
Prompt to play while in hold. |
|
targetParticipant |
Communication |
PlaySource
Name | Type | Description |
---|---|---|
file |
Defines the file source info to be used for play |
|
kind |
Defines the type of the play source |
|
playSourceCacheId |
string |
Defines the identifier to be used for caching related media |
ssml |
Defines the ssml(Speech Synthesis Markup Language) source info to be used for play |
|
text |
Defines the text source info to be used for play |
PlaySourceType
Defines the type of the play source
Value | Description |
---|---|
file | |
text | |
ssml |
SsmlSource
Name | Type | Description |
---|---|---|
customVoiceEndpointId |
string |
Endpoint where the custom voice was deployed. |
ssmlText |
string |
Ssml string for the cognitive service to be played |
TextSource
Name | Type | Description |
---|---|---|
customVoiceEndpointId |
string |
Endpoint where the custom voice was deployed. |
sourceLocale |
string |
Source language locale to be played Refer to available locales here: <seealso href="https://learn.microsoft.com/en-us/azure/cognitive-services/speech-service/language-support?tabs=stt-tts" /> |
text |
string |
Text for the cognitive service to be played |
voiceKind |
Voice kind type |
|
voiceName |
string |
Voice name to be played Refer to available Text-to-speech voices here: <seealso href="https://learn.microsoft.com/en-us/azure/cognitive-services/speech-service/language-support?tabs=stt-tts" /> |
VoiceKind
Voice kind type
Value | Description |
---|---|
male | |
female |