For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Log inSign up
Support
GuidesReferenceClick-to-Call
GuidesReferenceClick-to-Call
  • Core
    • Overview
  • Entities
    • SignalWire
    • Address
    • Participant
    • ClientPreferences
    • SelfCapabilities
    • SelfParticipant
    • User
    • WebRTCCall
      • address$
      • answer
      • answered$
      • answerMediaOptions
      • bandwidthConstrained$
      • callEvent$
      • callStates$
      • callUpdated$
      • capabilities$
      • destroy
      • destroyed$
      • direction
      • disablePushToTalk
      • enablePushToTalk
      • errors$
      • execute
      • executeMethod
      • from
      • fromName
      • hangup
      • isNetworkHealthy$
      • layout$
      • layoutEvent$
      • layoutLayers$
      • layouts$
      • layoutUpdates$
      • localAudioLevel$
      • localMicrophoneGain$
      • localSpeaking$
      • localStream$
      • locked$
      • mediaDirections$
      • mediaParamsUpdated$
      • memberJoined$
      • memberLeft$
      • memberTalking$
      • memberUpdated$
      • meta$
      • networkIssues$
      • networkMetrics$
      • nodeId$
      • notifyModifyFailed
      • participants$
      • participantsId$
      • qualityLevel$
      • qualityScore$
      • raiseHandPriority$
      • recording$
      • recoveryEvent$
      • recoveryState$
      • reject
      • remoteAudioLevel$
      • remoteStream$
      • requestIceRestart
      • requestKeyframe
      • rtcPeerConnection
      • self$
      • selfId$
      • sendDigits
      • setAutoGainControl
      • setEchoCancellation
      • setLayout
      • setLocalMicrophoneGain
      • setMeta
      • setNoiseSuppression
      • setPushToTalkActive
      • signalingEvent$
      • startRecording
      • startStreaming
      • status$
      • streaming$
      • subscribe
      • toggleHold
      • toggleIncomingAudio
      • toggleIncomingVideo
      • toggleLock
      • toName
      • transfer
      • updateMeta
      • userVariables$
      • webrtcMessages$
  • Web Components
    • Overview
    • sw-audio-level
    • sw-call-controls
    • sw-call-dialpad
    • sw-call-media
    • sw-call-provider
    • sw-call-status
    • sw-call-widget
    • sw-click-to-call
    • sw-device-selector
    • sw-directory
    • sw-local-camera
    • sw-participant-controls
    • sw-participants
    • sw-self-media
    • sw-ui-alert
    • sw-ui-background
    • sw-ui-call-layout
    • sw-ui-content-drawer
    • sw-ui-control-bar
    • sw-ui-dialpad
    • sw-ui-dropup
    • sw-ui-icon
    • sw-ui-modal
    • sw-ui-responsive-container
    • sw-ui-split-button
    • sw-ui-transcript-view
LogoLogoSignalWire Docs
Log inSign up
Support
On this page
  • Extends
  • Implements
  • Constructors
  • Constructor
  • Properties
  • Accessors
  • Methods
Entities

WebRTCCall

|View as Markdown|Open in Claude|
Was this page helpful?
Edit this page
Previous

address$

Next
Built with

WebRTCCall represents an active call between the local user and one or more remote participants. Instances are never constructed directly by applications — they are returned by SignalWire.dial for outbound calls, or surfaced through the inbound-call flow once the user has registered.

The class owns every aspect of an in-progress call: signaling (RTCPeerConnection, Verto messages), local and remote media streams, participant roster, layout, recording/streaming state, and network-quality telemetry. State is exposed in two complementary forms — a snapshot getter (e.g. locked) for one-shot reads and an observable (e.g. locked$) for reactive UI binding. Event streams that have no snapshot equivalent end in $ only (e.g. memberJoined$, signalingEvent$).

The available control methods depend on the capabilities granted by the server at join time — inspect capabilities$ before exposing a control in your UI. Calling hangup ends the call locally and transitions status$ to disconnected; the instance is then safe to release.

Extends

  • Destroyable

Implements

  • CallManager

Constructors

Constructor

1new WebRTCCall(clientSession, options, initialization, address?): WebRTCCall

Parameters

clientSession
ClientSessionRequired

Active client session created by SignalWire. Provides the signaling transport and authentication context for the call.

options
CallOptionsRequired

Media and behavior options for this call (audio/video constraints, recovery, etc.). See CallOptions.

initialization
CallInitializationRequired

Initialization payload supplied by the SDK when constructing the call. Carries direction, remote address, and any inbound-call metadata.

address
Address

Optional pre-resolved Address for the destination. When omitted, the address is derived from the dial string or inbound signaling.

Returns

WebRTCCall

Properties

id
stringRequired

Unique identifier for this call.

to
string

Destination URI this call was placed to.

Accessors

address$

Observable of the address associated with this call.

answered$

Observable that emits true when answered, false when rejected.

answerMediaOptions

Media options provided when answering. Used internally by the VertoManager.

bandwidthConstrained$

Observable indicating whether the call is bandwidth-constrained.

callEvent$

Observable of all call-related event payloads (join, leave, member updates, layout changes, etc.).

callStates$

Observable of call state-change events.

callUpdated$

Observable of call-updated events.

capabilities$

Observable of the call’s capability flags.

destroyed$

Observable that emits when the instance is destroyed

direction

Whether this call is 'inbound' or 'outbound'.

errors$

Observable stream of errors from media, signaling, and peer connection layers.

from

Address URI of the caller.

fromName

Display name of the caller.

isNetworkHealthy$

Simple boolean health indicator derived from stats monitor.

layout$

Observable of the current layout name.

layoutEvent$

Observable of layout-changed event payloads.

layoutLayers$

Observable of layout layer positions for all participants.

layouts$

Observable of available layout names.

layoutUpdates$

Observable of layout-changed events.

localAudioLevel$

Observable of the RMS audio level of the local microphone, 0..1. Emits at ~30fps while a mic track is active. Engages the local audio pipeline on first subscription.

localMicrophoneGain$

Observable of the current local microphone gain (0..200, where 100 = unity).

localSpeaking$

Observable that is true while the local participant is speaking (RMS level above the VAD threshold, with hold time to avoid flicker).

localStream$

Observable of the local media stream (camera/microphone).

locked$

Observable indicating whether the call room is locked.

mediaDirections$

Observable of the current audio/video send/receive directions.

mediaParamsUpdated$

Observable that emits when server-pushed media params are applied.

memberJoined$

Observable of member-joined events, emitted when a remote participant joins the call.

memberLeft$

Observable of member-left events, emitted when a participant leaves the call.

memberTalking$

Observable of member-talking events (speech start/stop).

memberUpdated$

Observable of member-updated events (mute, volume, etc.).

meta$

Observable of custom metadata associated with the call.

networkIssues$

Observable of current network health issues (empty array = healthy).

networkMetrics$

Rolling history of raw network metrics (RTT, jitter, packet loss, bitrate).

nodeId$

Observable of the server node ID handling this call.

participants$

Observable of the participants list, emits on join/leave/update.

participantsId$

Observable of the current participant ID list for the call.

qualityLevel$

Observable of simplified quality level (excellent/good/fair/poor/critical).

qualityScore$

Observable of MOS quality score (1-5) computed from stats metrics.

raiseHandPriority$

Observable indicating whether raise-hand priority is active.

recording$

Observable indicating whether the call is being recorded.

recoveryEvent$

Observable of recovery events (keyframe requested, ICE restart, etc.).

recoveryState$

Observable of the recovery pipeline state machine.

remoteAudioLevel$

Observable of the aggregate remote audio level, 0..1 RMS.

remoteStream$

Observable of the remote media stream from the far end.

rtcPeerConnection

Underlying RTCPeerConnection, for advanced use cases.

self$

Observable of the local (self) participant.

selfId$

Observable of the local participant’s member ID.

signalingEvent$

Observable of raw signaling events as plain objects.

status$

Observable of the current call status (e.g. 'ringing', 'connected').

streaming$

Observable indicating whether the call is being streamed.

toName

Display name of the callee.

userVariables$

Observable of custom user variables associated with the call.

webrtcMessages$

Observable of raw WebRTC message payloads received on this call.

Methods

answer

Accepts an inbound call, optionally overriding media options for the answer.

destroy

Destroys the call, releasing all resources and subscriptions.

disablePushToTalk

Disable push-to-talk; mic gain returns to the configured value.

enablePushToTalk

Enable push-to-talk: while setPushToTalkActive has been called with false, the microphone gain is forced to 0; calling setPushToTalkActive with true restores the configured gain.

execute

Executes a raw JSON-RPC request on the client session.

executeMethod

Executes a Verto RPC method targeting a specific participant.

hangup

Hangs up the call and releases all resources.

notifyModifyFailed

Notify the recovery manager that a verto.modify signaling exchange failed.

reject

Rejects an inbound call, preventing media negotiation.

requestIceRestart

Force an ICE restart / re-INVITE.

requestKeyframe

Request a video keyframe via RTCP PLI/FIR.

sendDigits

Sends DTMF digits on the call.

setAutoGainControl

Toggle browser automatic gain control on the local mic at runtime.

setEchoCancellation

Toggle echo cancellation on the local mic at runtime.

setLayout

Sets the call layout and participant positions.

setLocalMicrophoneGain

Set the local microphone gain as a percentage applied before transmission.

setMeta

Replaces the call’s custom metadata.

setNoiseSuppression

Toggle browser noise suppression on the local mic at runtime.

setPushToTalkActive

While push-to-talk is enabled, sets the talk state. true = transmitting, false = silent. No-op if push-to-talk has not been enabled.

startRecording

Not yet implemented. Status tracked via recording$.

startStreaming

Not yet implemented. Status tracked via streaming$.

subscribe

Subscribe to a custom signaling event type on this call.

toggleHold

Toggles the hold state of the call (pauses/resumes local media transmission).

toggleIncomingAudio

Toggles whether incoming audio is received.

toggleIncomingVideo

Toggles whether incoming video is received.

toggleLock

Toggles the call lock state, preventing or allowing new participants from joining.

transfer

Transfers the call to another destination.

updateMeta

Merges values into the call’s custom metadata (unlike setMeta which replaces).