Socket
Socket
Sign inDemoInstall

@xtreamr/react-xt-sip-phone

Package Overview
Dependencies
Maintainers
15
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xtreamr/react-xt-sip-phone

SIP phone component for use in react projects


Version published
Weekly downloads
0
Maintainers
15
Weekly downloads
 
Created
Source

react-sip-phone

SIP phone component for use in react projects

NPM JavaScript Style Guide

Install

npm install --save react-sip-phone

Usage

import React, { Component } from 'react'

import { ReactSipPhone } from 'react-sip-phone'
import 'react-sip-phone/dist/index.css'

class Example extends Component {
  render() {
    return <ReactSipPhone
        name={name}
        sipCredentials={{
          sipuri: sipuri,
          password: password
        }}
        sipConfig={{
          websocket: websocket,
          defaultCountryCode: '1'
        }}
        width={400}
      />
  }
}

To make calls from outside of the component, import the phone's store and access the SIP Account once it is registered

import { ReactSipPhone, phoneStore } from 'react-sip-phone'
class MyApp extends Component {

  makeCall(number) {
    const sipAccount = phoneStore.getState().sipAccounts.sipAccount
    if (sipAccount && number) {
      sipAccount.makeCall(number)
    }
  }

  render() {
    return <ReactSipPhone ... />
  }
}

License

MIT

FAQs

Package last updated on 10 May 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc