UNPKG

communication-call-automation

Version:
1,251 lines 68.8 kB
import * as coreClient from "@azure/core-client"; /** 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; } /** 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; } /** 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. * Only populated in outbound PSTN calls. */ 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 and an inbound call. */ answeredBy?: CommunicationUserIdentifierModel; /** Identity of the original PSTN target of an incoming Call. Only populated when the original target is a PSTN number and an inbound call. */ answeredFor?: PhoneNumberIdentifierModel; } /** 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; } /** 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; } /** 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 */ 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 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; } /** 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 to set the context for creating a new call. This property will be null for answering a call. */ 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 to set the context for creating a new call. This property will be null for answering a call. */ 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 from NGC services. */ 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; } export interface RecordingStateChanged { /** Call connection ID. */ callConnectionId?: string; /** Server call ID. */ serverCallId?: string; /** Correlation ID for event to call correlation. */ 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 { /** Gets or sets call connection ID. */ callConnectionId?: string; /** Gets or sets server call ID. */ serverCallId?: string; /** Gets or sets correlation ID for event to call correlation. */ correlationId?: string; /** Gets or sets used by customers when calling mid-call actions to correlate the request to the response event. */ operationContext?: string; /** Gets or sets 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. */ 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. */ 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. */ 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. */ 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 speech status as a result. */ export interface SpeechResult { /** The recognized speech in string. */ speech?: string; } export interface RecognizeFailed { /** Call connection ID. */ callConnectionId?: string; /** Server call ID. */ serverCallId?: string; /** Correlation ID for event to call correlation. */ 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. */ 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. */ 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 or 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 ContinuousDtmfRecognitionStopped { /** Call connection ID. */ callConnectionId?: string; /** Server call ID. */ serverCallId?: string; /** Correlation ID for event to call correlation. */ 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. */ 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. */ 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. */ 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 to correlate the request to the response event. */ operationContext?: string; /** Contains the resulting SIP code, sub-code and message. */ resultInformation?: ResultInformation; } /** Known values of {@link CommunicationIdentifierModelKind} that the service accepts. */ export declare enum KnownCommunicationIdentifierModelKind { /** Unknown */ Unknown = "unknown", /** CommunicationUser */ CommunicationUser = "communicationUser", /** PhoneNumber */ PhoneNumber = "phoneNumber", /** MicrosoftTeamsUser */ MicrosoftTeamsUser = "microsoftTeamsUser", /** MicrosoftTeamsApp */ MicrosoftTeamsApp = "microsoftTeamsApp" } /** * Defines values for CommunicationIdentifierModelKind. \ * {@link KnownCommunicationIdentifierModelKind} can be used interchangeably with CommunicationIdentifierModelKind, * this enum contains the known values that the service supports. * ### Known values supported by the service * **unknown** \ * **communicationUser** \ * **phoneNumber** \ * **microsoftTeamsUser** \ * **microsoftTeamsApp** */ export type CommunicationIdentifierModelKind = string; /** Known values of {@link CommunicationCloudEnvironmentModel} that the service accepts. */ export declare enum KnownCommunicationCloudEnvironmentModel { /** Public */ Public = "public", /** Dod */ Dod = "dod", /** Gcch */ Gcch = "gcch" } /** * Defines values for CommunicationCloudEnvironmentModel. \ * {@link KnownCommunicationCloudEnvironmentModel} can be used interchangeably with CommunicationCloudEnvironmentModel, * this enum contains the known values that the service supports. * ### Known values supported by the service * **public** \ * **dod** \ * **gcch** */ export type CommunicationCloudEnvironmentModel = string; /** Known values of {@link CallConnectionStateModel} that the service accepts. */ export declare enum KnownCallConnectionStateModel { /** Unknown */ Unknown = "unknown", /** Connecting */ Connecting = "connecting", /** Connected */ Connected = "connected", /** Transferring */ Transferring = "transferring", /** TransferAccepted */ TransferAccepted = "transferAccepted", /** Disconnecting */ Disconnecting = "disconnecting", /** Disconnected */ Disconnected = "disconnected" } /** * Defines values for CallConnectionStateModel. \ * {@link KnownCallConnectionStateModel} can be used interchangeably with CallConnectionStateModel, * this enum contains the known values that the service supports. * ### Known values supported by the service * **unknown** \ * **connecting** \ * **connected** \ * **transferring** \ * **transferAccepted** \ * **disconnecting** \ * **disconnected** */ export type CallConnectionStateModel = string; /** Known values of {@link CallRejectReason} that the service accepts. */ export declare enum KnownCallRejectReason { /** None */ None = "none", /** Busy */ Busy = "busy", /** Forbidden */ Forbidden = "forbidden" } /** * Defines values for CallRejectReason. \ * {@link KnownCallRejectReason} can be used interchangeably with CallRejectReason, * this enum contains the known values that the service supports. * ### Known values supported by the service * **none** \ * **busy** \ * **forbidden** */ export type CallRejectReason = string; /** Known values of {@link CallLocatorKind} that the service accepts. */ export declare enum KnownCallLocatorKind { /** Unknown */ Unknown = "unknown", /** GroupCallLocator */ GroupCallLocator = "groupCallLocator", /** ServerCallLocator */ ServerCallLocator = "serverCallLocator", /** RoomCallLocator */ RoomCallLocator = "roomCallLocator" } /** * Defines values for CallLocatorKind. \ * {@link KnownCallLocatorKind} can be used interchangeably with CallLocatorKind, * this enum contains the known values that the service supports. * ### Known values supported by the service * **unknown** \ * **groupCallLocator** \ * **serverCallLocator** \ * **roomCallLocator** */ export type CallLocatorKind = string; /** Known values of {@link PlaySourceType} that the service accepts. */ export declare enum KnownPlaySourceType { /** File */ File = "file", /** Text */ Text = "text", /** Ssml */ Ssml = "ssml" } /** * Defines values for PlaySourceType. \ * {@link KnownPlaySourceType} can be used interchangeably with PlaySourceType, * this enum contains the known values that the service supports. * ### Known values supported by the service * **file** \ * **text** \ * **ssml** */ export type PlaySourceType = string; /** Known values of {@link VoiceKind} that the service accepts. */ export declare enum KnownVoiceKind { /** Male */ Male = "male", /** Female */ Female = "female" } /** * Defines values for VoiceKind. \ * {@link KnownVoiceKind} can be used interchangeably with VoiceKind, * this enum contains the known values that the service supports. * ### Known values supported by the service * **male** \ * **female** */ export type VoiceKind = string; /** Known values of {@link RecognizeInputType} that the service accepts. */ export declare enum KnownRecognizeInputType { /** Dtmf */ Dtmf = "dtmf", /** Speech */ Speech = "speech", /** SpeechOrDtmf */ SpeechOrDtmf = "speechOrDtmf", /** Choices */ Choices = "choices" } /** * Defines values for RecognizeInputType. \ * {@link KnownRecognizeInputType} can be used interchangeably with RecognizeInputType, * this enum contains the known values that the service supports. * ### Known values supported by the service * **dtmf** \ * **speech** \ * **speechOrDtmf** \ * **choices** */ export type RecognizeInputType = string; /** Known values of {@link Tone} that the service accepts. */ export declare enum KnownTone { /** Zero */ Zero = "zero", /** One */ One = "one", /** Two */ Two = "two", /** Three */ Three = "three", /** Four */ Four = "four", /** Five */ Five = "five", /** Six */ Six = "six", /** Seven */ Seven = "seven", /** Eight */ Eight = "eight", /** Nine */ Nine = "nine", /** A */ A = "a", /** B */ B = "b", /** C */ C = "c", /** D */ D = "d", /** Pound */ Pound = "pound", /** Asterisk */ Asterisk = "asterisk" } /** * Defines values for Tone. \ * {@link KnownTone} can be used interchangeably with Tone, * this enum contains the known values that the service supports. * ### Known values supported by the service * **zero** \ * **one** \ * **two** \ * **three** \ * **four** \ * **five** \ * **six** \ * **seven** \ * **eight** \ * **nine** \ * **a** \ * **b** \ * **c** \ * **d** \ * **pound** \ * **asterisk** */ export type Tone = string; /** Known values of {@link RecordingContentType} that the service accepts. */ export declare enum KnownRecordingContentType { /** Audio */ Audio = "audio", /** AudioVideo */ AudioVideo = "audioVideo" } /** * Defines values for RecordingContentType. \ * {@link KnownRecordingContentType} can be used interchangeably with RecordingContentType, * this enum contains the known values that the service supports. * ### Known values supported by the service * **audio** \ * **audioVideo** */ export type RecordingContentType = string; /** Known values of {@link RecordingChannelType} that the service accepts. */ export declare enum KnownRecordingChannelType { /** Mixed */ Mixed = "mixed", /** Unmixed */ Unmixed = "unmixed" } /** * Defines values for RecordingChannelType. \ * {@link KnownRecordingChannelType} can be used interchangeably with RecordingChannelType, * this enum contains the known values that the service supports. * ### Known values supported by the service * **mixed** \ * **unmixed** */ export type RecordingChannelType = string; /** Known values of {@link RecordingFormatType} that the service accepts. */ export declare enum KnownRecordingFormatType { /** Wav */ Wav = "wav", /** Mp3 */ Mp3 = "mp3", /** Mp4 */ Mp4 = "mp4" } /** * Defines values for RecordingFormatType. \ * {@link KnownRecordingFormatType} can be used interchangeably with RecordingFormatType, * this enum contains the known values that the service supports. * ### Known values supported by the service * **wav** \ * **mp3** \ * **mp4** */ export type RecordingFormatType = string; /** Known values of {@link RecordingStorageKind} that the service accepts. */ export declare enum KnownRecordingStorageKind { /** Storage managed by Azure Communication Services */ AzureCommunicationServices = "AzureCommunicationSer