@azure/communication-call-automation
Version:
Azure client library for Azure Communication Call Automation services
1,018 lines • 102 kB
TypeScript
import * as coreClient from "@azure/core-client";
export type MediaStreamingOptionsInternalUnion = MediaStreamingOptionsInternal | WebSocketMediaStreamingOptions;
export type TranscriptionOptionsInternalUnion = TranscriptionOptionsInternal | WebSocketTranscriptionOptions;
/** The request payload for creating the call. */
export interface CreateCallRequest {
/** The targets of the call. */
targets: CommunicationIdentifierModel[];
/** A phone number. */
sourceCallerIdNumber?: PhoneNumberIdentifierModel;
/** Display name of the call if dialing out to a pstn number */
sourceDisplayName?: string;
/** A user that got created with an Azure Communication Services resource. */
source?: CommunicationUserIdentifierModel;
/** A customer set value used to track the answering of a call. */
operationContext?: string;
/** The callback URI. */
callbackUri: string;
/** AI options for the call. */
callIntelligenceOptions?: CallIntelligenceOptionsInternal;
/** Options for media streaming. */
mediaStreamingOptions?: MediaStreamingOptionsInternalUnion;
/** Options for live transcription. */
transcriptionOptions?: TranscriptionOptionsInternalUnion;
/** A Microsoft Teams application. */
teamsAppSource?: MicrosoftTeamsAppIdentifierModel;
}
/** Identifies a participant in Azure Communication services. A participant is, for example, a phone number or an Azure communication user. This model is polymorphic: Apart from kind and rawId, at most one further property may be set which must match the kind enum value. */
export interface CommunicationIdentifierModel {
/** The identifier kind. Only required in responses. */
kind?: CommunicationIdentifierModelKind;
/** Raw Id of the identifier. Optional in requests, required in responses. */
rawId?: string;
/** The communication user. */
communicationUser?: CommunicationUserIdentifierModel;
/** The phone number. */
phoneNumber?: PhoneNumberIdentifierModel;
/** The Microsoft Teams user. */
microsoftTeamsUser?: MicrosoftTeamsUserIdentifierModel;
/** The Microsoft Teams application. */
microsoftTeamsApp?: MicrosoftTeamsAppIdentifierModel;
/** The Microsoft Teams Extension user. */
teamsExtensionUser?: TeamsExtensionUserIdentifierModel;
}
/** A user that got created with an Azure Communication Services resource. */
export interface CommunicationUserIdentifierModel {
/** The Id of the communication user. */
id: string;
}
/** A phone number. */
export interface PhoneNumberIdentifierModel {
/** The phone number, usually in E.164 format. */
value: string;
/** True if the phone number is anonymous. By default false if missing. If the phone number is anonymous, the value will be the string 'anonymous'. */
isAnonymous?: boolean;
/** The asserted Id of the phone number. An asserted Id gets generated when the same phone number joins the same call more than once. */
assertedId?: string;
}
/** A Microsoft Teams user. */
export interface MicrosoftTeamsUserIdentifierModel {
/** The Id of the Microsoft Teams user. If not anonymous, this is the Entra ID object Id of the user. */
userId: string;
/** True if the Microsoft Teams user is anonymous. By default false if missing. */
isAnonymous?: boolean;
/** The cloud that the Microsoft Teams user belongs to. By default 'public' if missing. */
cloud?: CommunicationCloudEnvironmentModel;
}
/** A Microsoft Teams application. */
export interface MicrosoftTeamsAppIdentifierModel {
/** The Id of the Microsoft Teams application. */
appId: string;
/** The cloud that the Microsoft Teams application belongs to. By default 'public' if missing. */
cloud?: CommunicationCloudEnvironmentModel;
}
/** A Microsoft Teams Phone user who is using a Communication Services resource to extend their Teams Phone set up. */
export interface TeamsExtensionUserIdentifierModel {
/** The Id of the Microsoft Teams Extension user, i.e. the Entra ID object Id of the user. */
userId: string;
/** The tenant Id of the Microsoft Teams Extension user. */
tenantId: string;
/** The Communication Services resource Id. */
resourceId: string;
/** The cloud that the Microsoft Teams Extension user belongs to. By default 'public' if missing. */
cloud?: CommunicationCloudEnvironmentModel;
}
/** AI options for the call. */
export interface CallIntelligenceOptionsInternal {
/** The identifier of the Cognitive Service resource assigned to this call. */
cognitiveServicesEndpoint?: string;
}
/** Options for media streaming. */
export interface MediaStreamingOptionsInternal {
/** Polymorphic discriminator, which specifies the different types this object can be */
transportType: "websocket";
/** The audio channel type to stream, e.g., unmixed audio, mixed audio. */
audioChannelType: MediaStreamingAudioChannelType;
}
/** Options for live transcription. */
export interface TranscriptionOptionsInternal {
/** Polymorphic discriminator, which specifies the different types this object can be */
transportType: "websocket";
/** Specifies the Locale used for transcription, e.g., en-CA or en-AU. */
locale: string;
}
/** Properties of a call connection */
export interface CallConnectionPropertiesInternal {
/** The call connection id. */
callConnectionId?: string;
/** The server call id. */
serverCallId?: string;
/** The targets of the call. */
targets?: CommunicationIdentifierModel[];
/** The states of a call connection. */
callConnectionState?: CallConnectionStateModel;
/** The callback URI. */
callbackUri?: string;
/** A phone number. */
sourceCallerIdNumber?: PhoneNumberIdentifierModel;
/** Display name of the call if dialing out to a pstn number. */
sourceDisplayName?: string;
/** Identifies a participant in Azure Communication services. A participant is, for example, a phone number or an Azure communication user. This model is polymorphic: Apart from kind and rawId, at most one further property may be set which must match the kind enum value. */
source?: CommunicationIdentifierModel;
/** The correlation ID. */
correlationId?: string;
/** A user that got created with an Azure Communication Services resource. */
answeredBy?: CommunicationUserIdentifierModel;
/** Media streaming Subscription Object. */
mediaStreamingSubscription?: MediaStreamingSubscription;
/** Transcription Subscription Object. */
transcriptionSubscription?: TranscriptionSubscription;
/** A phone number. */
answeredFor?: PhoneNumberIdentifierModel;
}
/** Media streaming Subscription Object. */
export interface MediaStreamingSubscription {
/** Subscription Id. */
id?: string;
/** Current state of media streaming session */
state?: MediaStreamingSubscriptionState;
/** Subscribed media streaming content types. */
subscribedContentTypes?: MediaStreamingContentType[];
}
/** Transcription Subscription Object. */
export interface TranscriptionSubscription {
/** Subscription Id. */
id?: string;
/** Current state of transcription session */
state?: TranscriptionSubscriptionState;
/** Subscribed transcription result types. */
subscribedResultStates?: TranscriptionResultState[];
/** Specifies the locale used for transcription, e.g., en-CA or en-AU. */
locale?: string;
}
/** The Communication Services error. */
export interface CommunicationErrorResponse {
/** The Communication Services error. */
error: CommunicationError;
}
/** The Communication Services error. */
export interface CommunicationError {
/** The error code. */
code: string;
/** The error message. */
message: string;
/**
* The error target.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly target?: string;
/**
* Further details about specific errors that led to this error.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly details?: CommunicationError[];
/**
* The inner error if any.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly innerError?: CommunicationError;
}
/** The request payload for answering the call. */
export interface AnswerCallRequest {
/** The context associated with the call. */
incomingCallContext: string;
/** The callback uri. */
callbackUri: string;
/** A customer set value used to track the answering of a call. */
operationContext?: string;
/** AI options for the call. */
callIntelligenceOptions?: CallIntelligenceOptionsInternal;
/** A user that got created with an Azure Communication Services resource. */
answeredBy?: CommunicationUserIdentifierModel;
/** Options for media streaming. */
mediaStreamingOptions?: MediaStreamingOptionsInternalUnion;
/** Options for live transcription. */
transcriptionOptions?: TranscriptionOptionsInternalUnion;
}
/** The request payload for redirecting the call. */
export interface RedirectCallRequest {
/** The context associated with the call. */
incomingCallContext: string;
/** Identifies a participant in Azure Communication services. A participant is, for example, a phone number or an Azure communication user. This model is polymorphic: Apart from kind and rawId, at most one further property may be set which must match the kind enum value. */
target: CommunicationIdentifierModel;
}
/** The request payload for rejecting the call. */
export interface RejectCallRequest {
/** The context associated with the call. */
incomingCallContext: string;
/** Reason of rejecting a call */
callRejectReason?: CallRejectReason;
}
/** The request payload for creating a connection to a CallLocator. */
export interface ConnectRequest {
/** The locator used for joining or taking action on a call */
callLocator: CallLocator;
/** The callback URI. */
callbackUri: string;
/** Used by customers to correlate the request to the response event. */
operationContext?: string;
/** AI options for the call. */
callIntelligenceOptions?: CallIntelligenceOptionsInternal;
/** Options for media streaming. */
mediaStreamingOptions?: MediaStreamingOptionsInternalUnion;
/** Options for live transcription. */
transcriptionOptions?: TranscriptionOptionsInternalUnion;
}
/** The locator used for joining or taking action on a call */
export interface CallLocator {
/** The group call id */
groupCallId?: string;
/** The server call id. */
serverCallId?: string;
/** The Acs room id. (Not supported for Start Recording) */
roomId?: string;
/** The call locator kind */
kind?: CallLocatorKind;
}
/** The request payload for transferring call to a participant. */
export interface TransferToParticipantRequest {
/** Identifies a participant in Azure Communication services. A participant is, for example, a phone number or an Azure communication user. This model is polymorphic: Apart from kind and rawId, at most one further property may be set which must match the kind enum value. */
targetParticipant: CommunicationIdentifierModel;
/** Used by customers when calling mid-call actions to correlate the request to the response event. */
operationContext?: string;
/** Identifies a participant in Azure Communication services. A participant is, for example, a phone number or an Azure communication user. This model is polymorphic: Apart from kind and rawId, at most one further property may be set which must match the kind enum value. */
transferee?: CommunicationIdentifierModel;
/**
* 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.
*/
operationCallbackUri?: string;
/** The custom calling context which will be sent to the target */
customCallingContext?: CustomCallingContextInternal;
/** A phone number. */
sourceCallerIdNumber?: PhoneNumberIdentifierModel;
}
/** The custom calling context which will be sent to the target */
export interface CustomCallingContextInternal {
/** Custom calling context VoiP headers */
voipHeaders?: {
[propertyName: string]: string;
};
/** Custom calling context SIP headers */
sipHeaders?: {
[propertyName: string]: string;
};
/** The call details which will be sent to the target */
teamsPhoneCallDetails?: TeamsPhoneCallDetailsInternal;
}
/** The call details which will be sent to the target */
export interface TeamsPhoneCallDetailsInternal {
/** Container for details relating to the original caller of the call */
teamsPhoneCallerDetails?: TeamsPhoneCallerDetailsInternal;
/** Container for details relating to the entity responsible for the creation of these call details */
teamsPhoneSourceDetails?: TeamsPhoneSourceDetailsInternal;
/** Id to exclusively identify this call session. IVR will use this for their telemetry/reporting. */
sessionId?: string;
/** The intent of the call */
intent?: string;
/** A very short description (max 48 chars) of the reason for the call. To be displayed in Teams CallNotification */
callTopic?: string;
/** A summary of the call thus far. It will be displayed on a side panel in the Teams UI */
callContext?: string;
/** Url for fetching the transcript of the call */
transcriptUrl?: string;
/** Sentiment of the call thus far */
callSentiment?: string;
/** Recommendations for resolving the issue based on the customer's intent and interaction history */
suggestedActions?: string;
}
/** Container for details relating to the original caller of the call */
export interface TeamsPhoneCallerDetailsInternal {
/** Identifies a participant in Azure Communication services. A participant is, for example, a phone number or an Azure communication user. This model is polymorphic: Apart from kind and rawId, at most one further property may be set which must match the kind enum value. */
caller: CommunicationIdentifierModel;
/** Caller's name */
name: string;
/** Caller's phone number */
phoneNumber: string;
/** Caller's record ID (ex in CRM) */
recordId?: string;
/** Caller's screen pop URL */
screenPopUrl?: string;
/** Flag indicating whether the caller was authenticated */
isAuthenticated?: boolean;
/** A set of key value pairs (max 10, any additional entries would be ignored) which a bot author wants to pass to the Teams Client for display to the agent */
additionalCallerInformation?: {
[propertyName: string]: string;
};
}
/** Container for details relating to the entity responsible for the creation of these call details */
export interface TeamsPhoneSourceDetailsInternal {
/** Identifies a participant in Azure Communication services. A participant is, for example, a phone number or an Azure communication user. This model is polymorphic: Apart from kind and rawId, at most one further property may be set which must match the kind enum value. */
source: CommunicationIdentifierModel;
/** Language of the source entity passing along the call details, passed in the ISO-639 standard */
language: string;
/** Status of the source entity passing along the call details */
status: string;
/** Intended targets of the source entity passing along the call details */
intendedTargets?: {
[propertyName: string]: CommunicationIdentifierModel;
};
}
/** The response payload for transferring the call. */
export interface TransferCallResponse {
/** The operation context provided by client. */
operationContext?: string;
}
export interface PlayRequest {
/** The source of the audio to be played. */
playSources: PlaySourceInternal[];
/**
* The list of call participants play provided audio to.
* Plays to everyone in the call when not provided.
*/
playTo?: CommunicationIdentifierModel[];
/** If set play can barge into other existing queued-up/currently-processing requests. */
interruptCallMediaOperation?: boolean;
playOptions?: PlayOptionsInternal;
/** The value to identify context of the operation. */
operationContext?: 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.
*/
operationCallbackUri?: string;
}
export interface PlaySourceInternal {
/** Defines the types of play source */
kind: PlaySourceType;
/** Defines the identifier to be used for caching related media */
playSourceCacheId?: string;
file?: FileSourceInternal;
text?: TextSourceInternal;
ssml?: SsmlSourceInternal;
}
export interface FileSourceInternal {
/** Uri for the audio file to be played */
uri: string;
}
export interface TextSourceInternal {
/** Text for the cognitive service to be played */
text: 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" />
*/
sourceLocale?: string;
/** Audio kind type */
voiceKind?: VoiceKind;
/**
* 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" />
*/
voiceName?: string;
/** Endpoint where the custom voice was deployed. */
customVoiceEndpointId?: string;
}
export interface SsmlSourceInternal {
/** Ssml string for the cognitive service to be played */
ssmlText: string;
/** Endpoint where the custom voice was deployed. */
customVoiceEndpointId?: string;
}
export interface PlayOptionsInternal {
/** The option to play the provided audio source in loop when set to true */
loop: boolean;
}
export interface StartTranscriptionRequest {
/** Specifies the Locale used for transcription, e.g., en-CA or en-AU. */
locale?: string;
/** The ID of the deployed custom model in GUID format. The GUID is generated by Azure Speech Studio, e.g., a259c255-1cdw-4ed7-a693-dd58563b6f6a. */
speechModelEndpointId?: string;
/** The value to identify context of the operation. */
operationContext?: 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.
*/
operationCallbackUri?: string;
}
export interface StopTranscriptionRequest {
/** The value to identify context of the operation. */
operationContext?: 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.
*/
operationCallbackUri?: string;
}
export interface UpdateTranscriptionRequest {
/** Specifies the Locale used for transcription, e.g., en-CA or en-AU. */
locale?: string;
/** The ID of the deployed custom model, in GUID format, e.g., a259c255-1cdw-4ed7-a693-dd58563b6f6a. */
speechModelEndpointId?: string;
/** The value to identify context of the operation. */
operationContext?: 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.
*/
operationCallbackUri?: string;
}
export interface RecognizeRequest {
/** Defines the type of the recognize input */
recognizeInputType: RecognizeInputType;
playPrompt?: PlaySourceInternal;
/** The source of the audio to be played for recognition. */
playPrompts?: PlaySourceInternal[];
/** If set recognize can barge into other existing queued-up/currently-processing requests. */
interruptCallMediaOperation?: boolean;
recognizeOptions: RecognizeOptions;
/** The value to identify context of the operation. */
operationContext?: 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.
*/
operationCallbackUri?: string;
}
export interface RecognizeOptions {
/** Determines if we interrupt the prompt and start recognizing. */
interruptPrompt?: boolean;
/** Time to wait for first input after prompt (if any). */
initialSilenceTimeoutInSeconds?: number;
/** Identifies a participant in Azure Communication services. A participant is, for example, a phone number or an Azure communication user. This model is polymorphic: Apart from kind and rawId, at most one further property may be set which must match the kind enum value. */
targetParticipant: CommunicationIdentifierModel;
/** Speech language to be recognized, If not set default is en-US */
speechLanguage?: string;
/** Endpoint where the custom model was deployed. */
speechRecognitionModelEndpointId?: string;
/** Options for DTMF recognition */
dtmfOptions?: DtmfOptions;
/** Defines Ivr choices for recognize. */
choices?: Choice[];
/** Options for continuous speech recognition */
speechOptions?: SpeechOptions;
}
/** Options for DTMF recognition */
export interface DtmfOptions {
/** Time to wait between DTMF inputs to stop recognizing. */
interToneTimeoutInSeconds?: number;
/** Maximum number of DTMF tones to be collected. */
maxTonesToCollect?: number;
/** List of tones that will stop recognizing. */
stopTones?: Tone[];
}
export interface Choice {
/** Identifier for a given choice */
label: string;
/** List of phrases to recognize */
phrases: string[];
/** List of valid stop tones */
tone?: Tone;
}
/** Options for continuous speech recognition */
export interface SpeechOptions {
/** The length of end silence when user stops speaking and cogservice send response. */
endSilenceTimeoutInMs?: number;
}
export interface ContinuousDtmfRecognitionRequest {
/** Identifies a participant in Azure Communication services. A participant is, for example, a phone number or an Azure communication user. This model is polymorphic: Apart from kind and rawId, at most one further property may be set which must match the kind enum value. */
targetParticipant: CommunicationIdentifierModel;
/** The value to identify context of the operation. */
operationContext?: 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.
*/
operationCallbackUri?: string;
}
export interface SendDtmfTonesRequest {
/** List of tones to be sent to target participant. */
tones: Tone[];
/** Identifies a participant in Azure Communication services. A participant is, for example, a phone number or an Azure communication user. This model is polymorphic: Apart from kind and rawId, at most one further property may be set which must match the kind enum value. */
targetParticipant: CommunicationIdentifierModel;
/** The value to identify context of the operation. */
operationContext?: 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.
*/
operationCallbackUri?: string;
}
export interface SendDtmfTonesResult {
/** The operation context provided by client. */
operationContext?: string;
}
/** The request payload for holding participant from the call. */
export interface HoldRequest {
/** Identifies a participant in Azure Communication services. A participant is, for example, a phone number or an Azure communication user. This model is polymorphic: Apart from kind and rawId, at most one further property may be set which must match the kind enum value. */
targetParticipant: CommunicationIdentifierModel;
playSourceInfo?: PlaySourceInternal;
/** Used by customers when calling mid-call actions to correlate the request to the response event. */
operationContext?: 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.
*/
operationCallbackUri?: string;
}
/** The request payload for holding participant from the call. */
export interface UnholdRequest {
/** Identifies a participant in Azure Communication services. A participant is, for example, a phone number or an Azure communication user. This model is polymorphic: Apart from kind and rawId, at most one further property may be set which must match the kind enum value. */
targetParticipant: CommunicationIdentifierModel;
/** Used by customers when calling mid-call actions to correlate the request to the response event. */
operationContext?: 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.
*/
operationCallbackUri?: string;
}
export interface StartMediaStreamingRequest {
/**
* 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.
*/
operationCallbackUri?: string;
/** The value to identify context of the operation. */
operationContext?: string;
}
export interface StopMediaStreamingRequest {
/**
* 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.
*/
operationCallbackUri?: string;
/** The value to identify context of the operation. */
operationContext?: string;
}
/** The response payload for getting participants of the call. */
export interface GetParticipantsResponse {
/** List of the current participants in the call. */
value: CallParticipantInternal[];
/** Continue of the list of participants */
nextLink?: string;
}
/** A call participant. */
export interface CallParticipantInternal {
/** Identifies a participant in Azure Communication services. A participant is, for example, a phone number or an Azure communication user. This model is polymorphic: Apart from kind and rawId, at most one further property may be set which must match the kind enum value. */
identifier?: CommunicationIdentifierModel;
/** Is participant muted */
isMuted?: boolean;
/** Is participant on hold. */
isOnHold?: boolean;
}
/** The request payload for adding participant to the call. */
export interface AddParticipantRequest {
/** A phone number. */
sourceCallerIdNumber?: PhoneNumberIdentifierModel;
/**
* (Optional) The display name of the source that is associated with this invite operation when
* adding a PSTN participant or teams user. Note: Will not update the display name in the roster.
*/
sourceDisplayName?: string;
/** Identifies a participant in Azure Communication services. A participant is, for example, a phone number or an Azure communication user. This model is polymorphic: Apart from kind and rawId, at most one further property may be set which must match the kind enum value. */
participantToAdd: CommunicationIdentifierModel;
/**
* Gets or sets the timeout to wait for the invited participant to pickup.
* The maximum value of this is 180 seconds
*/
invitationTimeoutInSeconds?: number;
/** Used by customers when calling mid-call actions to correlate the request to the response event. */
operationContext?: 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.
*/
operationCallbackUri?: string;
/** The custom calling context which will be sent to the target */
customCallingContext?: CustomCallingContextInternal;
}
/** The response payload for adding participants to the call. */
export interface AddParticipantResponse {
/** A call participant. */
participant?: CallParticipantInternal;
/** The operation context provided by client. */
operationContext?: string;
/** Invitation ID used to add a participant. */
invitationId?: string;
}
/** The remove participant by identifier request. */
export interface RemoveParticipantRequest {
/** Identifies a participant in Azure Communication services. A participant is, for example, a phone number or an Azure communication user. This model is polymorphic: Apart from kind and rawId, at most one further property may be set which must match the kind enum value. */
participantToRemove: CommunicationIdentifierModel;
/** Used by customers when calling mid-call actions to correlate the request to the response event. */
operationContext?: 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.
*/
operationCallbackUri?: string;
}
/** The response payload for removing participants of the call. */
export interface RemoveParticipantResponse {
/** The operation context provided by client. */
operationContext?: string;
}
/** The request payload for muting participants from the call. */
export interface MuteParticipantsRequest {
/**
* Participants to be muted from the call.
* Only ACS Users are supported.
*/
targetParticipants: CommunicationIdentifierModel[];
/** Used by customers when calling mid-call actions to correlate the request to the response event. */
operationContext?: string;
}
/** The result payload for muting participants from the call. */
export interface MuteParticipantsResult {
/** The operation context provided by client. */
operationContext?: string;
}
/** Request payload for cancelling add participant request. */
export interface CancelAddParticipantRequest {
/** Invitation ID used to add a participant. */
invitationId: string;
/** Used by customers when calling mid-call actions to correlate the request to the response event. */
operationContext?: 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.
*/
operationCallbackUri?: string;
}
/** Response payload for cancel add participant request. */
export interface CancelAddParticipantResponse {
/** Invitation ID used to cancel the add participant action. */
invitationId?: string;
/** The operation context provided by client. */
operationContext?: string;
}
/** The request payload for moving participant to the call. */
export interface MoveParticipantsRequest {
/** The participant to Move. */
targetParticipants: CommunicationIdentifierModel[];
/** Used by customers when calling mid-call actions to correlate the request to the response event. */
operationContext?: 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.
*/
operationCallbackUri?: string;
/** The CallConnectionId for the call you want to move the participant from */
fromCall: string;
}
/** The response payload for moving participants to the call. */
export interface MoveParticipantsResponse {
/** List of current participants in the call. */
participants?: CallParticipantInternal[];
/** The operation context provided by client. */
operationContext?: string;
/** The CallConnectionId for the call you want to move the participant from */
fromCall?: string;
}
/** The request payload start for call recording operation with call locator. */
export interface StartCallRecordingRequest {
/** The locator used for joining or taking action on a call */
callLocator?: CallLocator;
/** The call connection Id. (Only one of callLocator or callConnectionId to be used) */
callConnectionId?: string;
/** The uri to send notifications to. */
recordingStateCallbackUri?: string;
/** The content type of call recording. */
recordingContentType?: RecordingContentType;
/** Defines the channel type of call recording. */
recordingChannelType?: RecordingChannelType;
/** Defines the format type of call recording. */
recordingFormatType?: RecordingFormatType;
/**
* The sequential order in which audio channels are assigned to participants in the unmixed recording.
* When 'recordingChannelType' is set to 'unmixed' and `audioChannelParticipantOrdering is not specified,
* the audio channel to participant mapping will be automatically assigned based on the order in which participant
* first audio was detected. Channel to participant mapping details can be found in the metadata of the recording.
*/
audioChannelParticipantOrdering?: CommunicationIdentifierModel[];
/**
* The channel affinity of call recording
* When 'recordingChannelType' is set to 'unmixed', if channelAffinity is not specified, 'channel' will be automatically assigned.
* Channel-Participant mapping details can be found in the metadata of the recording.
* ///
*/
channelAffinity?: ChannelAffinity[];
/** When set to true will start recording in Pause mode, which can be resumed. */
pauseOnStart?: boolean;
recordingStorage?: RecordingStorage;
}
/** Channel affinity for a participant */
export interface ChannelAffinity {
/** Channel number to which bitstream from a particular participant will be written. */
channel?: number;
/** Identifies a participant in Azure Communication services. A participant is, for example, a phone number or an Azure communication user. This model is polymorphic: Apart from kind and rawId, at most one further property may be set which must match the kind enum value. */
participant: CommunicationIdentifierModel;
}
export interface RecordingStorage {
/** Defines the kind of external storage */
recordingStorageKind: RecordingStorageKind;
/** Uri of a container or a location within a container */
recordingDestinationContainerUrl?: string;
}
export interface RecordingStateResponse {
recordingId?: string;
recordingState?: RecordingState;
recordingKind?: RecordingKind;
}
/** The failed to add participants event. */
export interface AddParticipantFailed {
/** Call connection ID. */
callConnectionId?: string;
/** Server call ID. */
serverCallId?: string;
/** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */
correlationId?: string;
/** Used by customers when calling mid-call actions to correlate the request to the response event. */
operationContext?: string;
resultInformation?: ResultInformation;
/** Identifies a participant in Azure Communication services. A participant is, for example, a phone number or an Azure communication user. This model is polymorphic: Apart from kind and rawId, at most one further property may be set which must match the kind enum value. */
participant?: CommunicationIdentifierModel;
}
export interface ResultInformation {
/** Code of the current result. This can be helpful to Call Automation team to troubleshoot the issue if this result was unexpected. */
code?: number;
/** Subcode of the current result. This can be helpful to Call Automation team to troubleshoot the issue if this result was unexpected. */
subCode?: number;
/** Detail message that describes the current result. */
message?: string;
sipDetails?: SipDiagnosticInfo;
q850Details?: SipDiagnosticInfo;
}
export interface SipDiagnosticInfo {
/** Represents the diagnostic code returned by the SIP service, used for identifying specific issues or statuses. */
code?: number;
/** Message associated with the code for diagnosing. */
message?: string;
}
/** The participants successfully added event. */
export interface AddParticipantSucceeded {
/** Call connection ID. */
callConnectionId?: string;
/** Server call ID. */
serverCallId?: string;
/** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */
correlationId?: string;
/** Used by customers when calling mid-call actions to correlate the request to the response event. */
operationContext?: string;
resultInformation?: ResultInformation;
/** Identifies a participant in Azure Communication services. A participant is, for example, a phone number or an Azure communication user. This model is polymorphic: Apart from kind and rawId, at most one further property may be set which must match the kind enum value. */
participant?: CommunicationIdentifierModel;
}
/** The failed to answer call event. */
export interface AnswerFailed {
/** Call connection ID. */
callConnectionId?: string;
/** Server call ID. */
serverCallId?: string;
/** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */
correlationId?: string;
/** Used by customers when calling mid-call actions to correlate the request to the response event. */
operationContext?: string;
resultInformation?: ResultInformation;
}
/** The call connected event. */
export interface CallConnected {
/** Call connection ID. */
callConnectionId?: string;
/** Server call ID. */
serverCallId?: string;
/** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */
correlationId?: string;
/** Used by customers when calling mid-call actions to correlate the request to the response event. */
operationContext?: string;
resultInformation?: ResultInformation;
}
/** The call disconnected event. */
export interface CallDisconnected {
/** Call connection ID. */
callConnectionId?: string;
/** Server call ID. */
serverCallId?: string;
/** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */
correlationId?: string;
/** Used by customers when calling mid-call actions to correlate the request to the response event. */
operationContext?: string;
resultInformation?: ResultInformation;
}
/** The call transfer accepted event. */
export interface CallTransferAccepted {
/** Call connection ID. */
callConnectionId?: string;
/** Server call ID. */
serverCallId?: string;
/** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */
correlationId?: string;
/** Used by customers when calling mid-call actions to correlate the request to the response event. */
operationContext?: string;
resultInformation?: ResultInformation;
/** Identifies a participant in Azure Communication services. A participant is, for example, a phone number or an Azure communication user. This model is polymorphic: Apart from kind and rawId, at most one further property may be set which must match the kind enum value. */
transferTarget?: CommunicationIdentifierModel;
/** Identifies a participant in Azure Communication services. A participant is, for example, a phone number or an Azure communication user. This model is polymorphic: Apart from kind and rawId, at most one further property may be set which must match the kind enum value. */
transferee?: CommunicationIdentifierModel;
}
/** The call transfer failed event. */
export interface CallTransferFailed {
/** Call connection ID. */
callConnectionId?: string;
/** Server call ID. */
serverCallId?: string;
/** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */
correlationId?: string;
/** Used by customers when calling mid-call actions to correlate the request to the response event. */
operationContext?: string;
resultInformation?: ResultInformation;
}
/** Failed cancel add participant event. */
export interface CancelAddParticipantFailed {
/** Call connection ID. */
callConnectionId?: string;
/** Server call ID. */
serverCallId?: string;
/** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */
correlationId?: string;
/** Used by customers when calling mid-call actions to correlate the request to the response event. */
operationContext?: string;
/** Invitation ID used to cancel the request. */
invitationId?: string;
resultInformation?: ResultInformation;
}
/** Successful cancel add participant event. */
export interface CancelAddParticipantSucceeded {
/** Call connection ID. */
callConnectionId?: string;
/** Server call ID. */
serverCallId?: string;
/** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */
correlationId?: string;
/** Used by customers when calling mid-call actions to correlate the request to the response event. */
operationContext?: string;
/** Invitation ID used to cancel the request. */
invitationId?: string;
resultInformation?: ResultInformation;
}
export interface ChoiceResult {
/** Label is the primary identifier for the choice detected */
label?: string;
/**
* Phrases are set to the value if choice is selected via phrase detection.
* If Dtmf input is recognized, then Label will be the identifier for the choice detected and phrases will be set to null
*/
recognizedPhrase?: string;
/** The confidence level of the recognized speech, if available, ranges from 0.0 to 1.0 */
confidence?: number;
}
/** The ConnectFailed event. */
export interface ConnectFailed {
/** Call connection ID. */
callConnectionId?: string;
/** Server call ID. */
serverCallId?: string;
/** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */
correlationId?: string;
/** Used by customers when calling mid-call actions to correlate the request to the response event. */
operationContext?: string;
resultInformation?: ResultInformation;
}
export interface ContinuousDtmfRecognitionStopped {
/** Call connection ID. */
callConnectionId?: string;
/** Server call ID. */
serverCallId?: string;
/** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */
correlationId?: string;
/** Used by customers when calling mid-call actions to correlate the request to the response event. */
operationContext?: string;
resultInformation?: ResultInformation;
}
export interface ContinuousDtmfRecognitionToneFailed {
/** Call connection ID. */
callConnectionId?: string;
/** Server call ID. */
serverCallId?: string;
/** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */
correlationId?: string;
resultInformation?: ResultInformation;
/** Used by customers when calling mid-call actions to correlate the request to the response event. */
operationContext?: string;
}
export interface ContinuousDtmfRecognitionToneReceived {
/**
* The sequence id which can be used to determine if the same tone was played multiple times or if any tones were missed.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly sequenceId?: number;
/** List of valid stop tones */
tone?: Tone;
/** Call connection ID. */
callConnectionId?: string;
/** Server call ID. */
serverCallId?: string;
/** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */
correlationId?: string;
/** Used by customers when calling mid-call actions to correlate the request to the response event. */
operationContext?: string;
resultInformation?: ResultInformation;
}
/** The create call failed event. */
export interface CreateCallFailed {
/** Call connection ID. */
callConnectionId?: string;
/** Server call ID. */
serverCallId?: string;
/** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */
correlationId?: string;
/** Used by customers when calling mid-call actions to correlate the request to the response event. */
operationContext?: string;
resultInformation?: ResultInformation;
}
export interface DtmfResult {
/** NOTE: This property will not be serialized. It can only be populated by the server. */
readonly tones?: Tone[];
}
export interface HoldFailed {
/** Call connection ID. */
callConnectionId?: string;
/** Server call ID. */
serverCallId?: string;
/** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */
correlationId?: string;
/** Used by customers when calling mid-call actions to correlate the request to the response event. */
operationContext?: string;
resultInformation?: ResultInformation;
}
export interface MediaStreamingFailed {
mediaStreamingUpdate?: MediaStreamingUpdate;
/** Call connection ID. */
callConnectionId?: string;
/** Server call ID. */
serverCallId?: string;
/** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */
correlationId?: string;
/** Used by customers when calling mid-call actions to correlate the request to the response event. */
operationContext?: string;
resultInformation?: ResultInformation;
}
export interface MediaStreamingUpdate {
contentType?: string;
mediaStreamingStatus?: MediaStreamingStatus;
mediaStreamingStatusDetails?: MediaStreamingStatusDetails;
}
export interface MediaStreamingStarted {
mediaStreamingUpdate?: MediaStreamingUpdate;
/** Call connection ID. */
callConnectionId?: string;
/** Server call ID. */
serverCallId?: string;
/** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */
correlationId?: string;
/** Used by customers when calling mid-call actions to correlate the request to the response event. */
operationContext?: string;
resultInformation?: ResultInformation;
}
export interface MediaStreamingStopped {
mediaStreamingUpdate?: MediaStreamingUpdate;
/** Call connection ID. */
callConnectionId?: string;
/** Server call ID. */
serverCallId?: string;
/** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */
correlationId?: string;
/** Used by customers when calling mid-call actions to correlate the request to the response event. */
operationContext?: string;
resultInformation?: ResultInformation;
}
/** Moving the participant failed event. */
export interface MoveParticipantFailed {
/** Call connection ID. */
callConnectionId?: string;
/** Server call ID. */
serverCallId?: string;
/** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */
correlationId?: string;
/** Used by customers when calling mid-call actions to correlate the request to the response event. */
operationContext?: string;
resultInformation?: ResultInformation;
/** Identifies a participant in Azure Communication services. A participant is, for example, a phone number or an Azure communication user. This model is polymorphic: Apart from kind and rawId, at most one further property may be set which must match the kind enum value. */
participant?: CommunicationIdentifierModel;
/** The CallConnectionId for the call you want to move the participant from */
fromCall?: string;
}
/** Moving the participant successfully event. */
export interface MoveParticipantSucceeded {
/** Call connection ID. */
callConnectionId?: string;
/** Server call ID. */
serverCallId?: string;
/** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */
correlationId?: string;
/** Used by customers when calling mid-call actions to correlate the request to the response event. */
operationContext?: string;
resultInformation?: ResultInformation;
/** Identifies a participant i