Options
All
  • Public
  • Public/Protected
  • All
Menu

Class to perform Integrated Softphone related task

Hierarchy

  • ACWebRtcService

Index

Constructors

Properties

AudioCodesHeader: "X-InContact-AgentLegId: " = 'X-InContact-AgentLegId: '
AudioCodesHeaderReplace: "Replaces: " = 'Replaces: '
acdAgentId: string = ''
agentLegId: string
agentLegState: string
appName: string = ''
audioCode: any
audioCodeCall: any = null
audioCodeConnectRequested: boolean = false
audioCodeIsConnected: boolean = false
audioElement: HTMLAudioElement = ...
connectedSBC: string = ''
isContactNotEnded: (() => boolean) = ...

Type declaration

    • (): boolean
    • Returns boolean

lastAgentLegIdCall: string = ''
logger: Logger = ...
needToShowAgentLegAcceptReject: (() => boolean) = ...

Type declaration

    • (): boolean
    • Returns boolean

onCallStatusChanged: Subject<CXoneVoiceCall>
onConnectionStatusChanged: Subject<CXoneVoiceConnection>
validationUtilSvc: ValidationUtils = ...

Methods

  • acLog(...args: any): void
  • audiocodeListeners(): { callConfirmed: ((call: any, message: any, cause: any) => void); callHoldStateChanged: ((call: any, isHold: any, isRemote: any) => void); callShowStreams: ((call: any, _localStream: MediaStream, remoteStream: MediaStream) => void); callTerminated: ((call: any, message: any, cause: any, redirectTo: any) => void); incomingCall: ((call: any, invite: any, replacedCall: any, hasSDP: any) => void); loginStateChanged: ((isLogin: any, cause: any) => void); outgoingCallProgress: ((call: any) => void) }
  • Audiocodes library callback methods

    example
    this.audiocodeListeners.call(this)
    

    Returns { callConfirmed: ((call: any, message: any, cause: any) => void); callHoldStateChanged: ((call: any, isHold: any, isRemote: any) => void); callShowStreams: ((call: any, _localStream: MediaStream, remoteStream: MediaStream) => void); callTerminated: ((call: any, message: any, cause: any, redirectTo: any) => void); incomingCall: ((call: any, invite: any, replacedCall: any, hasSDP: any) => void); loginStateChanged: ((isLogin: any, cause: any) => void); outgoingCallProgress: ((call: any) => void) }

    • callConfirmed: ((call: any, message: any, cause: any) => void)
        • (call: any, message: any, cause: any): void
        • Triggered when the call is established

          Parameters

          • call: any

            [AudioCodesSession] The call session object

          • message: any

            [SipMessage] The OK SIP message of an outgoing call, or 'null' for an incoming call

          • cause: any

            [String] The cause may be one of the following strings: "received ack" "sent ack"

          Returns void

    • callHoldStateChanged: ((call: any, isHold: any, isRemote: any) => void)
        • (call: any, isHold: any, isRemote: any): void
        • Triggered when a SIP local or remote hold state changes (incoming or outgoing re-INVITE).

          Parameters

          • call: any

            [AudioCodesSession] The call session object

          • isHold: any

            [Boolean] Hold (true) or Un-Hold (false)

          • isRemote: any

            [Boolean] Initiator remote side (true) or local side (false)

          Returns void

    • callShowStreams: ((call: any, _localStream: MediaStream, remoteStream: MediaStream) => void)
        • (call: any, _localStream: MediaStream, remoteStream: MediaStream): void
        • Triggered when local and remote audio and video streams are ready to be shown in view panels.

          Parameters

          • call: any

            [AudioCodesSession] The call session object

          • _localStream: MediaStream
          • remoteStream: MediaStream

            [Stream] The stream from the remote camera and microphone

          Returns void

    • callTerminated: ((call: any, message: any, cause: any, redirectTo: any) => void)
        • (call: any, message: any, cause: any, redirectTo: any): void
        • Triggered when a call is terminated or fails.

          Parameters

          • call: any

            [AudioCodesSession] The call session object

          • message: any

            [SipMessage] (Optional) The BYE SIP message

          • cause: any

            [string] (Optional) Reason of termination

          • redirectTo: any

            [string]: (Optional) Destination of redirection, set when the 'cause' parameter is 'Redirected'.

          Returns void

    • incomingCall: ((call: any, invite: any, replacedCall: any, hasSDP: any) => void)
        • (call: any, invite: any, replacedCall: any, hasSDP: any): void
        • Parameters

          • call: any

            [AudioCodesSession] The call session object

          • invite: any

            [SipRequest] The SIP request object

          • replacedCall: any

            [AudioCodesSession] The replaced call session object or null The replacedCall argument is not null, if the received INVITE includes a Replace header. In this case, the programmer in the callback should terminate replacedCall, automatically answer the incoming call, and visually (in GUI panel or window) make it the replacement for the terminated call.

          • hasSDP: any

            [Boolean] Enabled for the phone developer for a special case – incoming INVITE without SDP If it isn’t known whether the other side supports video calls, an answer can be made with or without video).

          Returns void

    • loginStateChanged: ((isLogin: any, cause: any) => void)
        • (isLogin: any, cause: any): void
        • Triggered when the login state is changed.

          Parameters

          • isLogin: any

            [Boolean] isLogin is 'true' if logged in, and 'false' if not logged in.

          • cause: any

            [string] The cause is one of these strings: 'connected', 'disconnected', 'login failed', 'login', 'logout'

          Returns void

    • outgoingCallProgress: ((call: any) => void)
        • (call: any): void
        • Triggered when a SIP 'trying' response or a SIP 'ringing' response is received.

          Parameters

          • call: any

            [AudioCodesSession] The call session object

          Returns void

  • connectAgentLeg(agentLegId: string): void
  • connectAudioCodeServer(): void
  • disconnectAgentLeg(): void
  • disconnectServer(): void
  • getActiveAudioTrackLabel(): string
  • Returns the active audio input track label from the current RTCPeerConnection sender to seed the known active device on call connect.

    example
    webRtcService.getActiveAudioTrackLabel();
    

    Returns string

    the track label string, or null if no active call or audio sender is found

  • getAudioCodeServer(webRTCWSSUrls: any, prevConnectedSBC: any): (string | number)[][]
  • Method get Audio Codes Server details

    Parameters

    • webRTCWSSUrls: any

      contains Get webRTC URL

    • prevConnectedSBC: any

      contains Previous connection details

    Returns (string | number)[][]

    it will return the WebRTC ServerURL to set ServerConfig

  • isSpeakerandMicAvailable(): Promise<boolean>
  • jssipLog(...args: any): void
  • loginAudioCodeServer(): void
  • logoutAudioCodeServer(): void
  • makeAgentLegCall(): void
  • onBeforeUnload(event: any): void
  • removeConnectedSBC(): void
  • replaceTrack(newTrack: MediaStreamTrack): Promise<void>
  • Replaces the active audio input track on the live RTP sender with a new track during mid-call audio device failover.

    example
    webRtcService.replaceTrack(newTrack);
    

    Parameters

    • newTrack: MediaStreamTrack

      the new MediaStreamTrack to use for the microphone input

    Returns Promise<void>

  • requestMediaAccess(): Promise<boolean>
  • restoreCall(): boolean
  • Makes a call with replace header from previously connected call. In case of refresh to retain a previous call this function is used.

    Returns boolean

    boolean true if there is a active agent leg call in localstorate to restore else return false.

  • setSinkId(deviceId: string): Promise<void>
  • Sets the audio output device on the audio element via setSinkId during mid-call audio device failover. Throws if setSinkId is not supported in the current browser context or if the switch fails, allowing callers to detect failure and avoid persisting an unapplied device ID.

    example
    webRtcService.setSinkId('device-id');
    

    Parameters

    • deviceId: string

      the deviceId of the target audio output device

    Returns Promise<void>

  • stopAudioTrack(mediaStream: MediaStream): void
  • storeAudioCodeCallData(): void
  • volumeChange(volume: number): void

Generated using TypeDoc