Freigeben über


CallAutomationClient class

Ein CallAutomationClient stellt einen Client für den Azure Communication CallAutomation-Dienst dar.

Konstruktoren

CallAutomationClient(string, CallAutomationClientOptions)

Initialisiert eine neue Instanz der CallAutomationClient-Klasse.

CallAutomationClient(string, TokenCredential | KeyCredential, CallAutomationClientOptions)

Initialisiert eine neue Instanz der CallAutomationClient-Klasse mithilfe einer TokenCredential oder KeyCredential.

Methoden

answerCall(string, string, AnswerCallOptions)

Annehmen des Anrufs.

connectCall(CallLocator, string, ConnectCallOptions)

Verbindung mit Chatroomanrufen erstellen.

createCall(CallInvite, string, CreateCallOptions)

Erstellen Sie einen ausgehenden Anruf aus der Quelle zu einer Zielidentität.

createGroupCall(CommunicationIdentifier[], string, CreateCallOptions)

Erstellen Sie einen ausgehenden Aufruf aus der Quelle zu einer Gruppe von Zielidentitäten.

getCallConnection(string)

Initialisiert eine neue Instanz von CallConnection.

getCallRecording()

Initialisiert eine neue Instanz von CallRecording.

getSourceIdentity()

Abrufen der Quellidentität, die zum Erstellen und Annehmen eines Anrufs verwendet wird

redirectCall(string, CallInvite, OperationOptions)

Umleitung des Anrufs.

rejectCall(string, RejectCallOptions)

Ablehnen des Anrufs.

Details zum Konstruktor

CallAutomationClient(string, CallAutomationClientOptions)

Initialisiert eine neue Instanz der CallAutomationClient-Klasse.

new CallAutomationClient(connectionString: string, options?: CallAutomationClientOptions)

Parameter

connectionString

string

Verbindungszeichenfolge zum Herstellen einer Verbindung mit einer Azure Communication Service-Ressource. Beispiel: "endpoint=https://contoso.eastus.communications.azure.net/; accesskey=secret";

options
CallAutomationClientOptions

Wahlfrei. Optionen zum Konfigurieren der HTTP-Pipeline.

CallAutomationClient(string, TokenCredential | KeyCredential, CallAutomationClientOptions)

Initialisiert eine neue Instanz der CallAutomationClient-Klasse mithilfe einer TokenCredential oder KeyCredential.

new CallAutomationClient(endpoint: string, credential: TokenCredential | KeyCredential, options?: CallAutomationClientOptions)

Parameter

endpoint

string

Der Endpunkt des Diensts (z. B. https://contoso.eastus.communications.azure.net).

credential

TokenCredential | KeyCredential

TokenCredential oder KeyCredential, die zum Authentifizieren von Anforderungen an den Dienst verwendet werden.

options
CallAutomationClientOptions

Wahlfrei. Optionen zum Konfigurieren der HTTP-Pipeline.

Details zur Methode

answerCall(string, string, AnswerCallOptions)

Annehmen des Anrufs.

function answerCall(incomingCallContext: string, callbackUrl: string, options?: AnswerCallOptions): Promise<CallResult>

Parameter

incomingCallContext

string

Der dem Aufruf zugeordnete Kontext.

callbackUrl

string

Die Rückruf-URL.

options
AnswerCallOptions

Zusätzliche Anforderungsoptionen enthalten answerCall-API-Optionen.

Gibt zurück

Promise<CallResult>

connectCall(CallLocator, string, ConnectCallOptions)

Verbindung mit Chatroomanrufen erstellen.

function connectCall(callLocator: CallLocator, callbackUrl: string, options?: ConnectCallOptions): Promise<CallResult>

Parameter

callLocator
CallLocator

Anruflocator zum Erstellen einer Verbindung.

callbackUrl

string

Die Rückruf-URL

options
ConnectCallOptions

Zusätzliche Anforderungsoptionen enthalten Verbindungs-API-Optionen.

Gibt zurück

Promise<CallResult>

createCall(CallInvite, string, CreateCallOptions)

Erstellen Sie einen ausgehenden Anruf aus der Quelle zu einer Zielidentität.

function createCall(targetParticipant: CallInvite, callbackUrl: string, options?: CreateCallOptions): Promise<CallResult>

Parameter

targetParticipant
CallInvite

Ein einzelnes Ziel.

callbackUrl

string

Die Rückruf-URL.

options
CreateCallOptions

Zusätzliche Anforderungsoptionen enthalten createCallConnection-API-Optionen.

Gibt zurück

Promise<CallResult>

createGroupCall(CommunicationIdentifier[], string, CreateCallOptions)

Erstellen Sie einen ausgehenden Aufruf aus der Quelle zu einer Gruppe von Zielidentitäten.

function createGroupCall(targetParticipants: CommunicationIdentifier[], callbackUrl: string, options?: CreateCallOptions): Promise<CallResult>

Parameter

targetParticipants

CommunicationIdentifier[]

Eine Gruppe von Zielidentitäten.

callbackUrl

string

Die Rückruf-URL.

options
CreateCallOptions

Zusätzliche Anforderungsoptionen enthalten createCallConnection-API-Optionen.

Gibt zurück

Promise<CallResult>

getCallConnection(string)

Initialisiert eine neue Instanz von CallConnection.

function getCallConnection(callConnectionId: string): CallConnection

Parameter

callConnectionId

string

Die CallConnection-ID für die CallConnection-Instanz. (z. B. 421CONTOSO-cRD6-4RDc-a078-99dRANDOMf).

Gibt zurück

getCallRecording()

Initialisiert eine neue Instanz von CallRecording.

function getCallRecording(): CallRecording

Gibt zurück

getSourceIdentity()

Abrufen der Quellidentität, die zum Erstellen und Annehmen eines Anrufs verwendet wird

function getSourceIdentity(): undefined | CommunicationUserIdentifier

Gibt zurück

redirectCall(string, CallInvite, OperationOptions)

Umleitung des Anrufs.

function redirectCall(incomingCallContext: string, targetParticipant: CallInvite, options?: OperationOptions): Promise<void>

Parameter

incomingCallContext

string

Der dem Aufruf zugeordnete Kontext.

targetParticipant
CallInvite

Die Zielidentität, an die der Anruf umgeleitet werden soll.

options
OperationOptions

Zusätzliche Anforderungsoptionen enthalten redirectCall-API-Optionen.

Gibt zurück

Promise<void>

rejectCall(string, RejectCallOptions)

Ablehnen des Anrufs.

function rejectCall(incomingCallContext: string, options?: RejectCallOptions): Promise<void>

Parameter

incomingCallContext

string

Der dem Aufruf zugeordnete Kontext.

options
RejectCallOptions

Zusätzliche Anforderungsoptionen enthalten rejectCall-API-Optionen.

Gibt zurück

Promise<void>