@azure/communication-call-automation
Version:
Azure client library for Azure Communication Call Automation services
1,132 lines • 93.4 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[];
/**
* The source caller Id, a phone number, that's shown to the PSTN participant being invited.
* Required only when calling a PSTN callee.
*/
sourceCallerIdNumber?: PhoneNumberIdentifierModel;
/** Display name of the call if dialing out to a pstn number */
sourceDisplayName?: string;
/** The identifier of the source of the call */
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;
/** Media Streaming Options. */
mediaStreamingOptions?: MediaStreamingOptionsInternalUnion;
/** Transcription Options. */
transcriptionOptions?: TranscriptionOptionsInternalUnion;
}
/** 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;
}
/** 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 in E.164 format. */
value: string;
}
/** A Microsoft Teams user. */
export interface MicrosoftTeamsUserIdentifierModel {
/** The Id of the Microsoft Teams user. If not anonymous, this is the AAD 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;
}
/** 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 state of the call connection. */
callConnectionState?: CallConnectionStateModel;
/** The callback URI. */
callbackUri?: string;
/**
* The source caller Id, a phone number, that's shown to the PSTN participant being invited.
* Required only when calling a PSTN callee.
*/
sourceCallerIdNumber?: PhoneNumberIdentifierModel;
/** Display name of the call if dialing out to a pstn number. */
sourceDisplayName?: string;
/** Source identity. */
source?: CommunicationIdentifierModel;
/** The correlation ID. */
correlationId?: string;
/** Identity of the answering entity. Only populated when identity is provided in the request. */
answeredBy?: CommunicationUserIdentifierModel;
/** The state of media streaming subscription for the call */
mediaStreamingSubscription?: MediaStreamingSubscription;
/** Transcription Subscription. */
transcriptionSubscription?: TranscriptionSubscription;
/** Identity of the original Pstn target of an incoming Call. Only populated when the original target is a Pstn number. */
answeredFor?: PhoneNumberIdentifierModel;
}
/** Media streaming Subscription Object. */
export interface MediaStreamingSubscription {
/** Subscription Id. */
id?: string;
/** Media streaming subscription state. */
state?: MediaStreamingSubscriptionState;
/** Subscribed media streaming content types. */
subscribedContentTypes?: MediaStreamingContentType[];
}
/** Transcription Subscription Object. */
export interface TranscriptionSubscription {
/** Subscription Id. */
id?: string;
/** Transcription subscription state. */
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;
/** The identifier of the call automation entity which answers the call */
answeredBy?: CommunicationUserIdentifierModel;
/** Media Streaming Options. */
mediaStreamingOptions?: MediaStreamingOptionsInternalUnion;
/** Transcription Options. */
transcriptionOptions?: TranscriptionOptionsInternalUnion;
}
/** The request payload for redirecting the call. */
export interface RedirectCallRequest {
/** The context associated with the call. */
incomingCallContext: string;
/** The target identity to redirect the call to. */
target: CommunicationIdentifierModel;
}
/** The request payload for rejecting the call. */
export interface RejectCallRequest {
/** The context associated with the call. */
incomingCallContext: string;
/** The rejection reason. */
callRejectReason?: CallRejectReason;
}
/** The request payload for creating a connection to a CallLocator. */
export interface ConnectRequest {
/** The call locator. */
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;
/** Media Streaming Options. */
mediaStreamingOptions?: MediaStreamingOptionsInternalUnion;
/** Transcription Options. */
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 {
/** The identity of the target where call should be transferred to. */
targetParticipant: CommunicationIdentifierModel;
/** Used by customers when calling mid-call actions to correlate the request to the response event. */
operationContext?: string;
/** Transferee is the participant who is transferred away. */
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;
/** Used by customer to send custom calling context to targets */
customCallingContext?: CustomCallingContextInternal;
/** The source caller Id, a phone number, that will be used as the transferor's caller Id when transferring a call to a Pstn target. */
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 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;
/** Defines options for playing the audio. */
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 type of the play source */
kind: PlaySourceType;
/** Defines the identifier to be used for caching related media */
playSourceCacheId?: string;
/** Defines the file source info to be used for play */
file?: FileSourceInternal;
/** Defines the text source info to be used for play */
text?: TextSourceInternal;
/** Defines the ssml(Speech Synthesis Markup Language) source info to be used for play */
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;
/** Voice 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 {
/** Determines the type of the recognition. */
recognizeInputType: RecognizeInputType;
/** The source of the audio to be played for recognition. */
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;
/** Defines options for recognition. */
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;
/** Target participant of DTMF tone recognition. */
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;
/** Defines configurations for DTMF. */
dtmfOptions?: DtmfOptions;
/** Defines Ivr choices for recognize. */
choices?: Choice[];
/** Defines continuous speech recognition option. */
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[];
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 {
/** Defines options for recognition. */
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[];
/** Target participant of send Dtmf tones. */
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 {
/** Participant to be held from the call. */
targetParticipant: CommunicationIdentifierModel;
/** Prompt to play while in hold. */
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 {
/**
* Participants to be hold from the call.
* Only ACS Users are supported.
*/
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 {
/** Communication identifier of the participant */
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 {
/**
* The source caller Id, a phone number, that's shown to the PSTN participant being invited.
* Required only when inviting a PSTN participant.
*/
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;
/** The participant to invite. */
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;
/** Used by customer to send custom calling context to targets */
customCallingContext?: CustomCallingContextInternal;
}
/** The response payload for adding participants to the call. */
export interface AddParticipantResponse {
/** List of current participants in the call. */
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 {
/** The participants to be removed from the call. */
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 start for call recording operation with call locator. */
export interface StartCallRecordingRequest {
/** The call locator. */
callLocator: CallLocator;
/** The uri to send notifications to. */
recordingStateCallbackUri?: string;
/** The content type of call recording. */
recordingContentType?: RecordingContentType;
/** The channel type of call recording. */
recordingChannelType?: RecordingChannelType;
/** 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;
/** Optional property to specify location where recording will be stored */
recordingStorage?: RecordingStorage;
}
/** Channel affinity for a participant */
export interface ChannelAffinity {
/** Channel number to which bitstream from a particular participant will be written. */
channel?: number;
/**
* The identifier for the participant whose bitstream will be written to the channel
* represented by the channel number.
*/
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;
/** Contains the resulting SIP code, sub-code and message. */
resultInformation?: ResultInformation;
/** Participant */
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;
}
/** 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;
/** Contains the resulting SIP code, sub-code and message. */
resultInformation?: ResultInformation;
/** Participant */
participant?: CommunicationIdentifierModel;
}
/** 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;
/** Contains the resulting SIP code, sub-code and message. */
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;
/** Contains the resulting SIP code, sub-code and message. */
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;
/** Contains the resulting SIP code, sub-code and message. */
resultInformation?: ResultInformation;
/** Target who the call is transferred to. */
transferTarget?: CommunicationIdentifierModel;
/** the participant who is being transferred away. */
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;
/** Contains the resulting SIP code, sub-code and message. */
resultInformation?: ResultInformation;
}
/** The participants updated in a call event. */
export interface ParticipantsUpdated {
/** 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;
/** The Sequence Number of the event */
sequenceNumber?: number;
/** The list of participants in the call. */
participants?: CallParticipantInternal[];
/** Contains the resulting SIP code, sub-code and message. */
resultInformation?: ResultInformation;
}
/** The participant removed event. */
export interface RemoveParticipantSucceeded {
/** 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;
/** Contains the resulting SIP code, sub-code and message. */
resultInformation?: ResultInformation;
/** Participant */
participant?: CommunicationIdentifierModel;
}
/** The failed to remove participant event. */
export interface RemoveParticipantFailed {
/** 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;
/** Contains the resulting SIP code, sub-code and message. */
resultInformation?: ResultInformation;
/** Participant */
participant?: CommunicationIdentifierModel;
}
/** 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;
/** Contains the resulting SIP code, sub-code and message. */
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;
/** Contains the resulting SIP code, sub-code and message. */
resultInformation?: ResultInformation;
/** Invitation ID used to cancel the request. */
invitationId?: string;
}
/** 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;
/** Contains the resulting SIP code, sub-code and message. */
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;
/** Contains the resulting SIP code, sub-code and message. */
resultInformation?: ResultInformation;
}
/** 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;
/** Contains the resulting SIP code, sub-code and message. */
resultInformation?: ResultInformation;
}
export interface RecordingStateChanged {
/** 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;
/**
* The call recording id
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly recordingId?: string;
state?: RecordingState;
/**
* The time of the recording started
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly startDateTime?: Date;
recordingKind?: RecordingKind;
/** Contains the resulting SIP code, sub-code and message. */
resultInformation?: ResultInformation;
}
/** Play started event. */
export interface PlayStarted {
/** 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;
/** Contains the resulting SIP code, sub-code and message. */
resultInformation?: ResultInformation;
}
export interface PlayCompleted {
/** 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;
/** Contains the resulting SIP code, sub-code and message. */
resultInformation?: ResultInformation;
}
export interface PlayFailed {
/** 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;
/** Contains the resulting SIP code, sub-code and message. */
resultInformation?: ResultInformation;
/** Contains the index of the failed play source. */
failedPlaySourceIndex?: number;
}
export interface PlayCanceled {
/** 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;
/** Contains the resulting SIP code, sub-code and message. */
resultInformation?: ResultInformation;
}
export interface RecognizeCompleted {
/** 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;
/** Contains the resulting SIP code, sub-code and message. */
resultInformation?: ResultInformation;
/**
* Determines the sub-type of the recognize operation.
* In case of cancel operation the this field is not set and is returned empty
*/
recognitionType?: RecognitionType;
/** Defines the result for RecognitionType = Dtmf */
dtmfResult?: DtmfResult;
/** Defines the result for RecognitionType = Choices */
choiceResult?: ChoiceResult;
/**
* Defines the result for RecognitionType = Speech and SpeechOrDtmf
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly speechResult?: SpeechResult;
}
export interface DtmfResult {
/** NOTE: This property will not be serialized. It can only be populated by the server. */
readonly tones?: Tone[];
}
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 speech status as a result. */
export interface SpeechResult {
/** The recognized speech in string. */
speech?: string;
/** The confidence level of the recognized speech, if available, ranges from 0.0 to 1.0. */
confidence?: number;
}
export interface RecognizeFailed {
/** 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;
/** Contains the resulting SIP code, sub-code and message. */
resultInformation?: ResultInformation;
/** Contains the index of the failed play source. */
failedPlaySourceIndex?: number;
}
export interface RecognizeCanceled {
/** 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;
/** Contains the resulting SIP code, sub-code and message. */
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;
/** Contains the resulting SIP code, sub-code and message. */
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;
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;
/** Contains the resulting SIP code, sub-code and message. */
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;
/** Contains the resulting SIP code, sub-code and message. */
resultInformation?: ResultInformation;
}
export interface SendDtmfTonesCompleted {
/** 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;
/** Contains the resulting SIP code, sub-code and message. */
resultInformation?: ResultInformation;
}
export interface SendDtmfTonesFailed {
/** 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;
/** Contains the resulting SIP code, sub-code and message. */
resultInformation?: ResultInformation;
}
export interface MediaStreamingFailed {
/**
* Defines the result for MediaStreamingUpdate with the current status and the details about the status
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly 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;
/** Contains the resulting SIP code, sub-code and message. */
resultInformation?: ResultInformation;
}
export interface MediaStreamingUpdate {
contentType?: string;
mediaStreamingStatus?: MediaStreamingStatus;
mediaStreamingStatusDetails?: MediaStreamingStatusDetails;
}
export interface MediaStreamingStarted {
/**
* Defines the result for MediaStreamingUpdate with the current status and the details about the status
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly 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;
/** Contains the resulting SIP code, sub-code and message. */
resultInformation?: ResultInformation;
}
export interface MediaStreamingStopped {
/**
* Defines the result for MediaStreamingUpdate with the current status and the details about the status
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly 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;
/** Contains the resulting SIP code, sub-code and message. */
resultInformation?: ResultInformation;
}
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?: str