CallAutomationClient class

Obiekt CallAutomationClient reprezentuje klienta w usłudze Azure Communication CallAutomation.

Konstruktory

CallAutomationClient(string, CallAutomationClientOptions)

Inicjuje nowe wystąpienie klasy CallAutomationClient.

CallAutomationClient(string, TokenCredential | KeyCredential, CallAutomationClientOptions)

Inicjuje nowe wystąpienie klasy CallAutomationClient przy użyciu tokenuCredential lub KeyCredential.

Metody

answerCall(string, string, AnswerCallOptions)

Odpowiedz na połączenie.

connectCall(CallLocator, string, ConnectCallOptions)

Utwórz połączenie z połączeniem pokoju.

createCall(CallInvite, string, CreateCallOptions)

Utwórz połączenie wychodzące ze źródła do tożsamości docelowej.

createGroupCall(CommunicationIdentifier[], string, CreateCallOptions)

Utwórz połączenie wychodzące ze źródła do grupy tożsamości docelowych.

getCallConnection(string)

Inicjuje nowe wystąpienie callConnection.

getCallRecording()

Inicjuje nowe wystąpienie metody CallRecording.

getSourceIdentity()

Uzyskiwanie tożsamości źródłowej używanej do tworzenia i odbierania połączenia

redirectCall(string, CallInvite, OperationOptions)

Przekieruj połączenie.

rejectCall(string, RejectCallOptions)

Odrzuć połączenie.

Szczegóły konstruktora

CallAutomationClient(string, CallAutomationClientOptions)

Inicjuje nowe wystąpienie klasy CallAutomationClient.

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

Parametry

connectionString

string

Parametry połączenia w celu nawiązania połączenia z zasobem usługi Azure Communication Service. Przykład: "endpoint=https://contoso.eastus.communications.azure.net/; accesskey=secret";

options
CallAutomationClientOptions

Fakultatywny. Opcje konfigurowania potoku HTTP.

CallAutomationClient(string, TokenCredential | KeyCredential, CallAutomationClientOptions)

Inicjuje nowe wystąpienie klasy CallAutomationClient przy użyciu tokenuCredential lub KeyCredential.

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

Parametry

endpoint

string

Punkt końcowy usługi (np. https://contoso.eastus.communications.azure.net).

credential

TokenCredential | KeyCredential

TokenCredential lub KeyCredential używany do uwierzytelniania żądań w usłudze.

options
CallAutomationClientOptions

Fakultatywny. Opcje konfigurowania potoku HTTP.

Szczegóły metody

answerCall(string, string, AnswerCallOptions)

Odpowiedz na połączenie.

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

Parametry

incomingCallContext

string

Kontekst skojarzony z wywołaniem.

callbackUrl

string

Adres URL wywołania zwrotnego.

options
AnswerCallOptions

Dodatkowe opcje żądania zawierają opcje interfejsu API answerCall.

Zwraca

Promise<CallResult>

connectCall(CallLocator, string, ConnectCallOptions)

Utwórz połączenie z połączeniem pokoju.

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

Parametry

callLocator
CallLocator

Wywołaj lokalizator, aby utworzyć połączenie.

callbackUrl

string

Adres URL wywołania zwrotnego

options
ConnectCallOptions

Dodatkowe opcje żądania zawierają opcje interfejsu API łączenia.

Zwraca

Promise<CallResult>

createCall(CallInvite, string, CreateCallOptions)

Utwórz połączenie wychodzące ze źródła do tożsamości docelowej.

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

Parametry

targetParticipant
CallInvite

Pojedynczy element docelowy.

callbackUrl

string

Adres URL wywołania zwrotnego.

options
CreateCallOptions

Dodatkowe opcje żądania zawierają opcje interfejsu API createCallConnection.

Zwraca

Promise<CallResult>

createGroupCall(CommunicationIdentifier[], string, CreateCallOptions)

Utwórz połączenie wychodzące ze źródła do grupy tożsamości docelowych.

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

Parametry

targetParticipants

CommunicationIdentifier[]

Grupa tożsamości docelowych.

callbackUrl

string

Adres URL wywołania zwrotnego.

options
CreateCallOptions

Dodatkowe opcje żądania zawierają opcje interfejsu API createCallConnection.

Zwraca

Promise<CallResult>

getCallConnection(string)

Inicjuje nowe wystąpienie callConnection.

function getCallConnection(callConnectionId: string): CallConnection

Parametry

callConnectionId

string

Identyfikator callConnection dla wystąpienia CallConnection. (np. 421CONTOSO-cRD6-4RDc-a078-99dRANDOMf).

Zwraca

getCallRecording()

Inicjuje nowe wystąpienie metody CallRecording.

function getCallRecording(): CallRecording

Zwraca

getSourceIdentity()

Uzyskiwanie tożsamości źródłowej używanej do tworzenia i odbierania połączenia

function getSourceIdentity(): undefined | CommunicationUserIdentifier

Zwraca

redirectCall(string, CallInvite, OperationOptions)

Przekieruj połączenie.

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

Parametry

incomingCallContext

string

Kontekst skojarzony z wywołaniem.

targetParticipant
CallInvite

Tożsamość docelowa do przekierowania wywołania do.

options
OperationOptions

Dodatkowe opcje żądania zawierają opcje interfejsu API redirectCall.

Zwraca

Promise<void>

rejectCall(string, RejectCallOptions)

Odrzuć połączenie.

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

Parametry

incomingCallContext

string

Kontekst skojarzony z wywołaniem.

options
RejectCallOptions

Dodatkowe opcje żądania zawierają opcje interfejsu API rejectCall.

Zwraca

Promise<void>