PortsipPlatform class abstract
Abstract platform interface for the PortSIP Flutter plugin.
This class defines the contract for platform-specific implementations of the PortSIP VoIP SDK. It provides methods for SIP registration, call management, and audio/video controls.
Platform-specific implementations (iOS and Android) extend this class and provide their native implementations via method channels.
- Inheritance
-
- Object
- PlatformInterface
- PortsipPlatform
- Implementers
Constructors
- PortsipPlatform()
- Constructs a PortsipPlatform.
Properties
-
events
→ Stream<
PortsipEvent> -
Returns a broadcast stream of PortSIP SDK events.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
configureCallKit(
{required String appName, bool canUseCallKit = true, String? iconTemplateImageName}) → Future< void> - Configures CallKit provider with app name and settings (iOS only).
-
configureConnectionService(
{required String appName, bool canUseConnectionService = true}) → Future< int> - Configures ConnectionService with app name and settings (Android only).
-
dispose(
) → Future< void> - Disposes of all SDK resources and cleans up.
-
enable3GppTags(
{required bool enable}) → Future< int> - Enables or disables 3GPP tags in SIP messages.
-
enableAEC(
{required bool enable}) → Future< int> - Enables or disables Acoustic Echo Cancellation (AEC).
-
enableAGC(
{required bool enable}) → Future< int> - Enables or disables Automatic Gain Control (AGC).
-
enableANS(
{required bool enable}) → Future< int> - Enables or disables Automatic Noise Suppression (ANS).
-
enableAudioManager(
{required bool enable}) → Future< int> - Enables or disables the audio manager.
-
enableCallKit(
{required bool enabled}) → Future< void> - Enables or disables CallKit integration at runtime (iOS only).
-
enableCNG(
{required bool enable}) → Future< int> - Enables or disables Comfort Noise Generation (CNG).
-
enableConnectionService(
{required bool enabled}) → Future< int> - Enables or disables ConnectionService at runtime (Android only).
-
enableVAD(
{required bool enable}) → Future< int> - Enables or disables Voice Activity Detection (VAD).
-
hangUp(
{required int sessionId}) → Future< int> - Terminates an active call.
-
hold(
{required int sessionId}) → Future< int> - Puts a call on hold.
-
initialize(
{required TransportType transport, required String localIP, required int localSIPPort, required PortsipLogLevel logLevel, required String logFilePath, required int maxCallLines, required String sipAgent, required int audioDeviceLayer, required int videoDeviceLayer, required String tlsCertificatesRootPath, required String tlsCipherList, required bool verifyTLSCertificate, required String dnsServers, int ptime = 20, int maxPtime = 60}) → Future< int> - Initializes the PortSIP SDK with the provided configuration.
-
makeCall(
{required String callee, required bool sendSdp, required bool videoCall}) → Future< int> - Initiates an outgoing call to the specified callee.
-
muteSession(
{required int sessionId, required bool muteIncomingAudio, required bool muteOutgoingAudio, required bool muteIncomingVideo, required bool muteOutgoingVideo}) → Future< int> - Mutes or unmutes audio/video streams for a call session.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
register(
{required SipAccount account}) → Future< int> - Configures the SIP account credentials and server settings.
-
registerServer(
{int registerTimeout = 120, int registerRetryTimes = 3}) → Future< int> - Registers with the SIP server.
-
sendDtmf(
{required int sessionId, required int dtmf, required bool playDtmfTone, int dtmfMethod = 0, int dtmfDuration = 160}) → Future< int> - Sends a DTMF (Dual-Tone Multi-Frequency) tone during a call.
-
setAudioCodecs(
{required List< AudioCodec> audioCodecs}) → Future<int> - Configures audio codecs for the SIP session.
-
setLicenseKey(
{required String licenseKey}) → Future< int> - Sets the PortSIP license key.
-
setLogsEnabled(
{required bool enabled}) → void - Enables or disables plugin debug logging.
-
setLoudspeakerStatus(
{required bool enable}) → Future< int> - Enables or disables the loudspeaker (speakerphone).
-
setSrtpPolicy(
{required int policy}) → Future< int> - Sets the SRTP (Secure Real-time Transport Protocol) policy.
-
toString(
) → String -
A string representation of this object.
inherited
-
unHold(
{required int sessionId}) → Future< int> - Resumes a call that was previously put on hold.
-
unRegister(
) → Future< void> - Unregisters from the SIP server and releases SDK resources.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance ↔ PortsipPlatform
-
The default instance of PortsipPlatform to use.
getter/setter pair