1.0.1 • Published 10 months ago

@ayoawe/dialer-widget v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

Dialer Widget

This Dialer widget is a customizable React component for embedding a simple SIP-based dialer into your React application. It enables users to input a phone number and make real-time SIP calls directly from the browser, leveraging the power of WebRTC and SIP protocols. Designed for seamless integration, it provides a clean and intuitive user interface, making it ideal for customer support dashboards, communication apps, and VoIP services

NPM JavaScript Style Guide

Install

npm install --save @ayoawe/dialer-widget

Usage

import React from 'react';
import { DialerWidget } from '@ayoawe/dialer-widget';

const App = () => {
  const sipConfig = {
    websocketUrl: 'wss://example.com/ws',
    username: 'user123',
    password: 'password123',
    domain: 'example.com',
  };

  return (
    <div>
      <h1>Call Widget</h1>
      <DialerWidget
        sipConfig={sipConfig}
        onCallStart={(number) => console.log(`Calling ${number}`)}
        onCallEnd={(number) => console.log(`Call ended with ${number}`)}
        onError={(error) => console.error(`Error: ${error}`)}
      />
    </div>
  );
};

export default App;
1.0.1

10 months ago

1.0.0

10 months ago