@exolve/react-native-voice-sdk
TypeScript icon, indicating that this package has built-in type declarations

1.7.1 • Public • Published

@exolve/react-native-voice-sdk

Exolve React Native Voice SDK allows you to make phone calls in your application.

Full SDK API usage shown in our demo app.

See https://community.exolve.ru for more information.

Installation

The package is available through npm.

yarn add @exolve/react-native-voice-sdk

Usage

Register account:

import { RegistrationEvent, Communicator, LogLevel } from '@exolve/react-native-voice-sdk';

const communicator = new Communicator();

communicator.initialize({
  logConfiguration: { logLevel: LogLevel.Debug },
  enableNotifications: true
});

const callClient = communicator.callClient();

// Set up listenting for registration events (see RegistrationEvent enum)
callClient.on(RegistrationEvent.Registered, ({stateName}) => {
    console.debug('RegistrationEvent.Registered');
});

// Register with SIP credentials from your Exolve account
callClient.registerAccount(username, password);

Make call:

// Set up listening for call events (see CallEvent enum)
callClient.on(CallEvent.New, (call: Call) => {
  console.debug(`CallEvent.New id: ${call.id}`);
  // Handle new call (incoming and outgoing)
});

// Start outgoing call
callClient.makeCall(phone_number);

Package Sidebar

Install

npm i @exolve/react-native-voice-sdk

Repository

exolve.ru

Homepage

exolve.ru

Weekly Downloads

8

Version

1.7.1

License

MIT

Unpacked Size

212 kB

Total Files

80

Last publish

Collaborators

  • zaitsevdm
  • svromanov