Skip to main content
Web calls let users speak with a DialNexa agent directly from a browser without a phone number on either end. The call runs over WebRTC, handled by the DialNexa Web SDK. Common use cases include website chat-to-call widgets, customer-facing embedded assistants, and internal agent testing without a physical phone.

How Web Calls Work

Instead of routing through a telephony carrier, web calls use a direct WebRTC audio connection between the user’s browser and the DialNexa platform. The agent version processes audio in real time exactly as it would on a phone call. Transcripts, post-call analysis, and call records are created the same way. There is no from_number or to_number for a web call. The agent version is specified at call initiation via the SDK.

Prerequisites

  • The DialNexa Web SDK installed in your web application.
  • A published agent version.
  • A modern browser with microphone access (Chrome, Firefox, Edge, or Safari 15+).
  • HTTPS required in production. The SDK will not initiate microphone capture on insecure origins.

Install the Web SDK

npm install @dialnexa/web-sdk
Or load via CDN:
<script src="https://cdn.dialnexa.com/web-sdk/latest/dialnexa.min.js"></script>

Initiate a Web Call

import { DialNexaWebCall } from '@dialnexa/web-sdk';

const call = new DialNexaWebCall({
  agentVersionId: 'av_01hx...',
  apiKey: 'YOUR_PUBLIC_API_KEY',   // use a publishable key, not your secret key
  variables: {
    visitor_name: 'Alex',
    page_url: window.location.href
  }
});

// Start the call
await call.start();

// End the call
await call.end();

Constructor Options

OptionTypeRequiredDescription
agentVersionIdstringYesThe published agent version to run.
apiKeystringYesYour DialNexa publishable API key. Do not use your secret API key in browser code.
variablesobjectNoKey-value pairs injected into the agent prompt, same format as outbound API calls.
metadataobjectNoArbitrary key-value pairs stored on the call record.

Events

call.on('connected', () => {
  console.log('Call connected');
});

call.on('disconnected', ({ reason }) => {
  console.log('Call ended:', reason);
});

call.on('error', (err) => {
  console.error('Call error:', err);
});

Use Cases

Website Chat-to-Call Widget

Embed a call button on your website. Visitors click to speak with your agent without leaving the page or dialing a number.

Internal Agent Testing

Test agent behavior from a browser during development. Faster than setting up a physical phone call and works without a provisioned number.

Customer Support Portal

Add a voice support option to an authenticated web portal. Pass user account data as variables for a personalized experience.

Onboarding Flows

Guide new users through a voice-driven onboarding sequence embedded in your product.

API Keys for Web Calls

Web calls use a publishable API key, not your secret API key. Publishable keys are safe to expose in browser code and are restricted to initiating calls. Manage your keys in Settings > API Keys.
Never use your secret API key in client-side JavaScript. If a secret key is exposed, rotate it immediately in Settings > API Keys.

Call History

Web calls appear in Call History alongside phone calls. The record includes:
  • Call duration
  • Full transcript
  • Post-call analysis output (if configured)
  • The agent version used
  • Any variables and metadata passed at call initiation
The call record does not include a phone number field. The Channel column shows web to distinguish from inbound and outbound phone calls.

Limitations

  • Web calls require the user’s browser to have microphone access. If access is denied, the call cannot start.
  • The SDK does not support Internet Explorer or legacy browsers.
  • Web calls consume workspace concurrency the same as phone calls. See Concurrency and Limits.
  • SMS nodes in agent flows are not triggered during web calls (no phone number to send to).