Dora Cell SDK
The Dora Cell SDK allows you to integrate professional-grade VoIP calling into your JavaScript or React applications. Whether you're building a custom CRM, a helpdesk tool, or a mobile-first web app, our SDK handles the complex WebRTC logic so you can focus on your user experience.
High Performance
Built on top of JsSIP for reliable, low-latency voice communication over WebRTC.
Secure Auth
Multiple authentication tiers including public/secret key pairs and session-based tokens.
Core SDK Installation
Install the base SDK to use it in any JavaScript environment (Node.js, Vanilla JS, Vue, etc.).
1npm install @dora-cell/sdkInitialization
Initialize the SDK using your API credentials. Supported auth types include api-token, extension, and direct.
1import { DoraCell } from "@dora-cell/sdk";2 3const sdk = new DoraCell({4 auth: {5 type: "api-token",6 publicKey: "pk_live_your_key",7 secretKey: "sk_live_your_secret",8 },9 environment: "production"10});11 12// Always wrap in async/await or use .then()13await sdk.initialize();14console.log("SDK is ready!");Making & Receiving Calls
The SDK provides a simple interface for call management.
1// Place an outbound call2const call = await sdk.call("+2348000000000");3 4// Hang up5call.hangup();6 7// Answer an incoming call8sdk.on("call:incoming", (call) => {9 console.log("Incoming call from:", call.remoteNumber);10 // To answer:11 sdk.answerCall();12});Event Handlers
Stay updated with the call state by subscribing to SDK events.
1// Listen for connection status2sdk.on("connection:status", ({ status, error }) => {3 console.log("SIP Status changed:", status);4});5 6// Listen for call transitions7sdk.on("call:connected", (call) => {8 console.log("Conversation started with:", call.remoteNumber);9});10 11sdk.on("call:ended", (call, reason) => {12 console.log("Call ended. Reason:", reason);13});React SDK Installation
The React SDK requires the Core SDK as a peer dependency.
1npm install @dora-cell/sdk @dora-cell/sdk-reactSetting up the Provider
Wrap your application tree with the DoraCellProvider to enable global call management.
1import { DoraCellProvider } from "@dora-cell/sdk-react";2import "@dora-cell/sdk-react/styles.css";3 4export default function RootLayout({ children }) {5 return (6 <DoraCellProvider7 config={{8 auth: {9 type: "api-token",10 publicKey: "pk_...",11 secretKey: "sk_...",12 }13 }}14 autoInitialize={true}15 >16 {children}17 </DoraCellProvider>18 );19}Hooks Overview
useCall()
Manage active calls, mute, and duration.
useConnectionStatus()
Monitor SIP registration and errors.
1import { useCall, useConnectionStatus } from "@dora-cell/sdk-react";2 3export function Dialer() {4 const { call, callStatus } = useCall();5 const { isConnected } = useConnectionStatus();6 7 return (8 <button 9 onClick={() => call("+234...")}10 disabled={!isConnected || callStatus !== 'idle'}11 >12 {callStatus === 'idle' ? 'Call' : 'Calling...'}13 </button>14 );15}Built-in UI Components
We provide production-ready components that fit perfectly into your application.
1import { CallInterface, Dialpad, CreditBalance } from "@dora-cell/sdk-react";2 3function App() {4 const [dialerOpen, setDialerOpen] = useState(false);5 6 return (7 <>8 <header>9 <CreditBalance />10 </header>11 12 {/* Handles all incoming and outgoing call UI */}13 <CallInterface isOpen={dialerOpen} onOpenChange={setDialerOpen} />14 15 <main>16 <Dialpad />17 </main>18 </>19 );20}Component Previews
Dialpad Component
A full-featured dialer with Caller ID selection and interactive keys.
Call Interface Component
Responsive floating interface for active and incoming call management.
John Doe
+234 701 555 0123 • Incoming...
John Doe
+234 701 555 0123 • On Call