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
      • applySelectedAudioOutputDevice
      • audioInputDevices$
      • audioInputDisabled$
      • audioOutputDevices$
      • clearDeviceState
      • connect
      • destroy
      • destroyed$
      • deviceInfoToConstraints
      • deviceRecovered$
      • dial
      • directory$
      • disableAudioInput
      • disableDeviceMonitoring
      • disableVideoInput
      • disconnect
      • enableAudioInput
      • enableDeviceMonitoring
      • enableVideoInput
      • enumerateDevices
      • errors$
      • exportDiagnostics
      • getDeviceCapabilities
      • isConnected$
      • isRegistered$
      • isValidDevice
      • platformCapabilities
      • preflight
      • ready$
      • register
      • requestMediaPermissions
      • resetToDefaults
      • selectAudioInputDevice
      • selectAudioOutputDevice
      • selectedAudioInputDevice$
      • selectedAudioInputDeviceConstraints
      • selectedAudioOutputDevice$
      • selectedVideoInputDevice$
      • selectedVideoInputDeviceConstraints
      • selectVideoInputDevice
      • session
      • setStorageManager
      • unregister
      • user$
      • videoInputDevices$
      • videoInputDisabled$
      • warnings$
    • Address
    • Participant
    • ClientPreferences
    • SelfCapabilities
    • SelfParticipant
    • User
    • WebRTCCall
  • 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
  • Returns
  • Examples
  • Download the diagnostics bundle
  • Attach diagnostics to a support form
EntitiesSignalWire

exportDiagnostics

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

getDeviceCapabilities

Next
Built with
1exportDiagnostics(): SessionDiagnostics

Snapshots the client’s accumulated diagnostic data into a single serializable bundle — connection events, recent call summaries, and device-change history — for inclusion in support tickets or local debug exports.

The returned object is a plain JSON-serializable structure; safe to JSON.stringify and ship to a support endpoint.

Returns

SessionDiagnostics — a structured snapshot containing connection events, call summaries, and device change history at the moment of the call.

Examples

Download the diagnostics bundle

1const diag = client.exportDiagnostics();
2const blob = new Blob([JSON.stringify(diag, null, 2)], { type: 'application/json' });
3const url = URL.createObjectURL(blob);
4Object.assign(document.createElement('a'), { href: url, download: 'signalwire-diag.json' }).click();
5URL.revokeObjectURL(url);

Attach diagnostics to a support form

1supportForm.addEventListener('submit', async (e) => {
2 e.preventDefault();
3 await fetch('/api/support', {
4 method: 'POST',
5 body: JSON.stringify({
6 message: messageInput.value,
7 diagnostics: client.exportDiagnostics(),
8 }),
9 });
10});