Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface CallClient

Hierarchy

  • CallClient

Index

Methods

  • callConference(conferenceId: string, headers?: Record<string, string>): Promise<Call>
  • Calls the conference with the given id and the given headers.

    throws

    InvalidOperationError if SinchClient is not started

    throws

    ArgumentError if the size of all header strings exceeds 1024 bytes when encoded as UTF-8.

    Parameters

    • conferenceId: string

      Conference ID to dial in to.

    • Optional headers: Record<string, string>

      Headers to pass with the call.

    Returns Promise<Call>

    A Call instance.

  • callPhoneNumber(phoneNumber: string, headers?: Record<string, string>): Promise<Call>
  • Calls a phone number and terminates the call to the PSTN-network (Publicly Switched Telephone Network).

    throws

    InvalidOperationError if SinchClient is not started

    throws

    ArgumentError if conferenceId exceeds 64 characters

    throws

    ArgumentError if the size of all header strings exceeds 1024 bytes when encoded as UTF-8.

    Parameters

    • phoneNumber: string

      The phone number to call. The phone number should be given according to E.164 number formatting (http://en.wikipedia.org/wiki/E.164) and should be prefixed with a '+'. E.g. to call the US phone number 415 555 0101, it should be specified as "+14155550101", where the '+' is the required prefix and the US country code '1' added before the local subscriber number.

    • Optional headers: Record<string, string>

      Headers to pass with the call.

    Returns Promise<Call>

    A Call instance.

  • callSip(sipIdentity: string, headers?: Record<string, string>): Promise<Call>
  • Makes a SIP call to the user with the given identity. The identity should be in the form "sip:user@server".

    throws

    InvalidOperationError if SinchClient is not started

    throws

    ArgumentError if sipIdentity exceeds 64 characters

    throws

    ArgumentError if the size of all header strings exceeds 1024 bytes when encoded as UTF-8.

    Parameters

    • sipIdentity: string

      SIP identity to dial in to.

    • Optional headers: Record<string, string>

    Returns Promise<Call>

    A Call instance.

  • callUser(toUserId: string, headers?: Record<string, string>): Promise<Call>
  • Makes a call to the user with the given id.

    throws

    InvalidOperationError if SinchClient is not started

    throws

    ArgumentError if the size of all header strings exceeds 1024 bytes when encoded as UTF-8.

    Parameters

    • toUserId: string

      The app specific id of the user to call. May not be null or empty.

    • Optional headers: Record<string, string>

      Headers to pass with the call.

    Returns Promise<Call>

    A Call instance.

  • callUserVideo(toUserId: string, headers?: Record<string, string>): Promise<Call>
  • Makes a video call to the user with the given id and adding the given headers.

    throws

    InvalidOperationError if SinchClient is not started

    throws

    ArgumentError if the size of all header strings exceeds 1024 bytes when encoded as UTF-8.

    Parameters

    • toUserId: string

      The app specific id of the user to call. May not be null or empty.

    • Optional headers: Record<string, string>

      Headers to pass with the call.

    Returns Promise<Call>

    A Call instance.

  • getCall(callId: string): undefined | Call
  • Returns the Call object with the identifier callId.

    Parameters

    • callId: string

      The call identifier string.

    Returns undefined | Call

    A Call instance if one matches, otherwise undefined.

Generated using TypeDoc