Options
Menu

External module Voice

Index

Variables

Const Backoff

Backoff: any = require('backoff')

Const C

C: any = require('./constants')

Const C

C: any = require('./constants')

COWBELL_AUDIO_URL

COWBELL_AUDIO_URL: any

Const DEFAULT_TEST_SOUND_URL

DEFAULT_TEST_SOUND_URL: string = `${SOUNDS_BASE_URL}/outgoing.mp3`

Const DTMF_INTER_TONE_GAP

DTMF_INTER_TONE_GAP: number = 70

Const DTMF_PAUSE_DURATION

DTMF_PAUSE_DURATION: number = 500

Const DTMF_TONE_DURATION

DTMF_TONE_DURATION: number = 160

ECHO_TEST_DURATION

ECHO_TEST_DURATION: any

Const INVALID_TOKEN_MESSAGE

INVALID_TOKEN_MESSAGE: "Parameter "token" must be of type "string"." = "Parameter "token" must be of type "string"."

Const Logger

Logger: Logger = Log.getInstance().getLogLevelInstance()

Const METRICS_BATCH_SIZE

METRICS_BATCH_SIZE: number = 10

Const METRICS_DELAY

METRICS_DELAY: number = 5000

Const MediaDeviceInfoShim

MediaDeviceInfoShim: any = require('./shims/mediadeviceinfo')

Const PStream

PStream: any = require('./pstream')

Const PUBLISHER_PRODUCT_NAME

PUBLISHER_PRODUCT_NAME: "twilio-js-sdk" = "twilio-js-sdk"

PeerConnection

PeerConnection: any

Const Publisher

Publisher: any = require('./eventpublisher')

Const REGISTRATION_INTERVAL

REGISTRATION_INTERVAL: 30000 = 30000

Const RINGTONE_PLAY_TIMEOUT

RINGTONE_PLAY_TIMEOUT: 2000 = 2000

Const RTCRtpTransceiver

RTCRtpTransceiver: any

Const SAMPLE_COUNT_CLEAR

SAMPLE_COUNT_CLEAR: 0 = 0

Const SAMPLE_COUNT_METRICS

SAMPLE_COUNT_METRICS: 5 = 5

Const SAMPLE_COUNT_RAISE

SAMPLE_COUNT_RAISE: 3 = 3

Const SAMPLE_INTERVAL

SAMPLE_INTERVAL: 1000 = 1000

Const Sound

Sound: any = require('./sound')

Const WARNING_TIMEOUT

WARNING_TIMEOUT: number = 5 * 1000

Private Const defaultChunderRegionURI

defaultChunderRegionURI: string = "chunderw-vpc-gll.twilio.com"

The default chunder URI to connect to, should map to region gll.

constant

Const defaultEdge

defaultEdge: Edge = Edge.Roaming

The default edge to connect to and create a chunder uri from, if the edge parameter is not specified during setup in Device.

constant

Private Const defaultEventGatewayURI

defaultEventGatewayURI: string = "eventgw.twilio.com"

The default event gateway URI to publish to.

constant

Private Const defaultRegion

defaultRegion: string = "gll"

The default region to connect to and create a chunder uri from if region is not defined.

constant

Private Const errorsByCode

errorsByCode: ReadonlyMap<number, any> = new Map([[ 20101, AuthorizationErrors.AccessTokenInvalid ],[ 20104, AuthorizationErrors.AccessTokenExpired ],[ 20151, AuthorizationErrors.AuthenticationFailed ],[ 31400, ClientErrors.BadRequest ],[ 31000, GeneralErrors.UnknownError ],[ 31005, GeneralErrors.ConnectionError ],[ 31008, GeneralErrors.CallCancelledError ],[ 31009, GeneralErrors.TransportError ],[ 31401, UserMediaErrors.PermissionDeniedError ],[ 31402, UserMediaErrors.AcquisitionFailedError ],[ 53000, SignalingErrors.ConnectionError ],[ 53001, SignalingErrors.ConnectionDisconnected ],[ 53400, MediaErrors.ClientLocalDescFailed ],[ 53402, MediaErrors.ClientRemoteDescFailed ],[ 53405, MediaErrors.ConnectionError ],])

getPreferredCodecInfo

getPreferredCodecInfo: any

getRTCStats

getRTCStats: any

Const getUserMedia

getUserMedia: any = require('./rtc/getusermedia')

Const rtc

rtc: any = require('./rtc')

Const webkitAudioContext

webkitAudioContext: typeof AudioContext

Functions

Private calculateStandardDeviation

  • calculateStandardDeviation(values: number[]): number | null
  • Calculate the standard deviation from a list of numbers.

    Parameters

    • values: number[]

      The list of numbers to calculate the standard deviation from.

    Returns number | null

    The standard deviation of a list of numbers.

Private countHigh

  • countHigh(max: number, values: number[]): number
  • Count the number of values that cross the max threshold.

    Parameters

    • max: number

      The max allowable value.

    • values: number[]

      The values to iterate over.

    Returns number

    The amount of values in which the stat crossed the threshold.

Private countLow

  • countLow(min: number, values: number[]): number
  • Count the number of values that cross the min threshold.

    Parameters

    • min: number

      The minimum allowable value.

    • values: number[]

      The values to iterate over.

    Returns number

    The amount of values in which the stat crossed the threshold.

createChunderEdgeURI

  • createChunderEdgeURI(edge: string): string
  • String template for an edge chunder URI

    Parameters

    • edge: string

      The edge.

    Returns string

createChunderRegionURI

  • createChunderRegionURI(region: string): string
  • String template for a region chunder URI

    Parameters

    • region: string

      The region.

    Returns string

createEventGatewayURI

  • createEventGatewayURI(region: string): string
  • String template for a region insights URI

    Parameters

    • region: string

      The region.

    Returns string

flattenSamples

  • flattenSamples(sampleSets: number[][]): number[]
  • Flatten a set of numerical sample sets into a single array of samples.

    Parameters

    • sampleSets: number[][]

    Returns number[]

generateTempCallSid

  • generateTempCallSid(): string

Private getChunderURIs

  • getChunderURIs(edge: string[] | string | undefined, region: string | undefined, onDeprecated?: undefined | function): string[]
  • Get the URI associated with the passed region or edge. If both are passed, then we want to fail Device setup, so we throw an error. As of CLIENT-7519, Regions are deprecated in favor of edges as part of Phase 1 Regional.

    Parameters

    • edge: string[] | string | undefined

      A string or an array of edge values

    • region: string | undefined

      The region shortcode.

    • Optional onDeprecated: undefined | function

    Returns string[]

    An array of chunder URIs

Private getRegionShortcode

  • getRegionShortcode(region: string): Region | null
  • Get the region shortcode by its full AWS region string.

    Parameters

    • region: string

      The region's full AWS string.

    Returns Region | null

Generated using TypeDoc