npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@dora-cell/sdk

v4.1.6

Published

VoIP calling SDK for Dora Cell - Make calls from any JavaScript application

Readme

@dora-cell/sdk

VoIP calling SDK for Dora Cell - Make calls from any JavaScript application without logging into the Dora Cell web app.

Features

Framework-agnostic - Works with vanilla JS, React, Vue, Angular, etc.
TypeScript support - Full type definitions included
WebRTC-based - High-quality voice calls using JsSIP
Event-driven API - Listen to call state changes
API Token Auth - Securely authenticate with Public & Secret keys
Dynamic Extensions - Fetch and switch between DID numbers
Wallet Integration - Check credit balance directly from the SDK
React bindings - Premium UI components and hooks included

Installation

npm install @dora-cell/sdk
# or
yarn add @dora-cell/sdk
# or
pnpm add @dora-cell/sdk

[!NOTE] jssip is a dependency of this SDK and will be installed automatically. You only need to install it manually if you want to use a specific version.

Quick Start

1. Initialize the SDK

Choose your preferred authentication method:

Option A: Extension Authentication (Recommended for Testing)

Best for quick testing or internal apps where default credentials are used.

import { DoraCell } from "@dora-cell/sdk";

const sdk = new DoraCell({
  auth: {
    type: "extension",
    extension: "1001",
  },
});

Option B: API Token Authentication (Production)

Best for production apps. The SDK will verify keys and fetch SIP credentials automatically.

const sdk = new DoraCell({
  auth: {
    type: "api-token",
    publicKey: "pk_live_...",
    secretKey: "sk_live_...",
  },
});

Option C: Direct Credentials (Advanced)

If you already have SIP credentials.

const sdk = new DoraCell({
  auth: {
    type: "direct",
    sipUri: "sip:[email protected]",
    password: "your-password",
    wsUrl: "wss://voice.example.com:8089/ws",
  },
});

2. Connect and Register

// Listen for registration
sdk.on("connection:status", (state) => {
  if (state.status === "registered") {
    console.log("SIP Ready to make calls!");
  }
});

// Initialize connection
await sdk.initialize();

3. Make a Call

try {
  const call = await sdk.call("+2348012345678");

  // Mute/unmute
  call.mute();

  // Hang up
  call.hangup();
} catch (error) {
  console.error("Call failed:", error.message);
}

API Reference

DoraCell Class

new DoraCell(config)

  • config.auth (Required)
    • type: 'api-token' | 'extension' | 'direct'
    • publicKey/secretKey (for api-token)
    • extension (for extension type)
  • config.environment?: 'dev' | 'staging' | 'production' - Shortcut for API URLs (default: 'production')
  • config.autoSelectExtension?: boolean - Register first available DID (default: true)
  • config.debug?: boolean - Enable JsSIP debug logs (default: false)

Methods

  • initialize(): Promise<void> - Authenticate and register with the SIP server.
  • call(number, extension?): Promise<Call> - Initiate an outbound call.
  • getWallet(): Promise<{ balance: number, currency: string }> - Get current credit balance.
  • fetchExtensions(): Promise<Extension[]> - Fetch available DID numbers/extensions.
  • setExtension(ext): Promise<void> - Switch active extension and re-register SIP.
  • answerCall(): void - Answer a pending incoming call.
  • hangup(): void - End the current active call.
  • on(event, handler): void - Listen for events (see below).
  • destroy(): void - Cleanup and disconnect.

Call Object

Returned by call() and emitted in events.

  • id: Unique call ID.
  • status: 'idle' | 'connecting' | 'ringing' | 'ongoing' | 'ended'.
  • direction: 'inbound' | 'outbound'.
  • remoteNumber: The other party's number.
  • duration: Call duration in seconds.
  • mute() / unmute(): Control microphone.
  • hangup(): End this specific call.
  • getRemoteStream(): Returns the WebRTC MediaStream for audio playback.

Events

| Event | Description | Data | | ------------------- | ------------------------------ | ---------------------------------- | | connection:status | SIP registration status change | { status: string, extension?: string, error?: string } | | call:incoming | New incoming call detected | Call object | | call:outgoing | New outbound call started | Call object | | call:ringing | Remote party is ringing | Call object | | call:connected | Call answered and connected | Call object | | call:ended | Call terminated | Call object, reason: string | | call:failed | Call failed to connect | Call object, error: string | | error | General SDK error | Error object |

Browser Requirements

  • HTTPS: WebRTC and microphone access require a secure context (HTTPS or localhost).
  • Environment: Modern browsers with WebRTC support (Chrome, Firefox, Safari, Edge).

Examples

Check the examples/ directory in the main repository:

  • next-js-demo/ - Complete Next.js implementation with React components

License

MIT