exolve_voice_sdk 0.0.6 exolve_voice_sdk: ^0.0.6 copied to clipboard
Flutter plugin for Exolve Voice SDK provides voice call capabilites to your application
@exolve_voice_sdk #
Exolve Flutter 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 #
To use this plugin, add exolve_voice_sdk as a dependency in your pubspec.yaml file.
dependencies:
exolve_voice_sdk: ^actual_version
Usage #
Initialization #
To get started, you need to initialize the CallClient
class, which is the main entry point to the library's functionality.
import 'package:exolve_voice_sdk/call_client/call_client.dart';
import 'package:exolve_voice_sdk/configuration/configuration.dart';
final CallClient callClient = CallClient();
final Configuration configuration = Configuration(
logConfiguration: LogConfiguration(logLevel: LogLevel.debug),
enableSipTrace: true,
enableNotifications: true,
callKitConfiguration: CallKitConfiguration(
includeInRecents: true,
)
)
callClient.initializeCallClient(configuration: configuration);
Registration #
To make and receive calls, you need to register with your account credentials.
await callClient.register(
login: your_login,
password: your_password,
);
To access registration events and handle them, you need to subscribe to the corresponding events.
StreamSubscription<RegistrationEvent> registrationSubscription = callClient
.subscribeOnRegistrationEvents()
.listen((event) {
// Handle events here
}
);
Calls #
To access call events and handle them, you need to subscribe to the corresponding events.
StreamSubscription<CallEvent> callsSubscription = callClient
.subscribeOnCallEvents()
.listen((event) {
// Handle events here
});
For outgoing calls:
callClient.makeCall(number: your_number);
Incoming calls are accepted based on the event received when subscribing as mentioned above.
// Do when event.callEvent is CallNewEvent
call.accept();
Call Class Methods #
Method | Description |
---|---|
accept() |
Accepts the call |
terminate() |
Terminates the cal |
hold() |
Holds the call |
resume() |
Resumes the call |
transfer({String targetUri}) |
Transfers the call to the specified address |
sendDtmf({String sequence}) |
Sends a DTMF signal |
createConference({String otherCallId}) |
Creates a conference with another call |
addToConference() |
Adds the call to the conference |
removeFromConference() |
Removes the call from the conference |
mute() |
Mutes the microphone |
unMute() |
Unmutes the microphone |
CallClient Class Methods #
Method | Description |
---|---|
initializeCallClient({Configuration configuration}) |
Initializes the CallClient with the specified configuration |
subscribeOnRegistrationEvents() |
Subscribes to activation events and returns an event stream |
register({String login, String password}) |
Register an account with the given login and password |
unregister()) |
Unregister the account |
getRegistrationState() |
Retrieves the current registration state |
makeCall({String number}) |
Makes a call to the specified number |
subscribeOnCallEvents() |
Subscribes to call events and returns an event stream |
setSpeaker({bool setSpeakerOn}) |
Sets the speaker mode (on/off) |
getCallList() |
Retrieves the list of active calls |
License #
Check https://community.exolve.ru/faq/terms/ for information.