mobile_sdk 0.0.4
mobile_sdk: ^0.0.4 copied to clipboard
A flutter plugin for incoming and outgoing VoIP calls using SIP integration.
sip_ua_calls #
A flutter plugin for incoming and outgoing VoIP calls using SIP integration.
Features #
- Show and receive an incoming call
- Start an outgoing call
- Hold and mute during a call
Getting started #
1. Installation #
Add this to your pubspec.yaml
:
dependencies:
mobile_sdk: ^0.0.4
Run flutter pub get
to fetch the package and update dependencies.
2. Configure Project #
-
AndroidManifest.xml
Add the following permissions:
<uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.CALL_PHONE"/> <uses-permission android:name="android.permission.RECORD_AUDIO"/> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
-
SIP Configuration
SIP credentials should be added like this:
final SipConfig sipConfig = SipConfig(
webSocketUrl: 'wss://your-sip-server.com:7443',
password: 'SecurePassword',
userAgent: 'MyCustomApp',
uri: 'sip:1001@your-sip-server.com',
displayName: 'User Test',
authorizationUser: '1001',
queueUri: 'queue@your-sip-server.com',
);
Initialize the Sip Service with these credentials before running the application:
Get.put<SipService>(SipService(sipConfig: sipConfig));
Usage #
To use the package, import it:
import 'package:mobile_sdk/app/mobile_sdk.dart';
For instance :
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
debugShowCheckedModeBanner: false,
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,
),
home: App(), // The package function has been called here.
);
}