SipCall class
SIP Call entity
Represents an active or historical SIP call with all state information. This is an immutable domain model.
Constructors
- SipCall({required String id, required String accountId, required String number, required CallDirection direction, CallState state = CallState.initiated, DateTime? startTime, DateTime? connectTime, DateTime? endTime, bool isMuted = false, bool isOnHold = false, bool isSpeaker = false, String? transferTarget, String? redirectTarget, String? callerName})
-
const
- SipCall.incoming({required String id, required String accountId, required String number, String? callerName})
-
Create incoming call
factory
- SipCall.outgoing({required String id, required String accountId, required String number})
-
Create outgoing call
factory
Properties
- accountId → String
-
Account ID this call belongs to
final
- callerName → String?
-
Caller display name (for incoming calls)
final
- connectTime → DateTime?
-
Call connect time (when answered)
final
- direction → CallDirection
-
Call direction
final
- durationSeconds → int
-
Call duration in seconds (calculated)
no setter
- endTime → DateTime?
-
Call end time (when terminated)
final
- formattedDuration → String
-
Format duration as MM:SS
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Unique call identifier
final
- isActive → bool
-
Whether call is active (not terminated or failed)
no setter
- isConnected → bool
-
Whether call is connected
no setter
- isMuted → bool
-
Whether microphone is muted
final
- isOnHold → bool
-
Whether call is on hold
final
- isSpeaker → bool
-
Whether speaker is enabled
final
- number → String
-
Phone number or SIP URI
final
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setter
- redirectTarget → String?
-
Redirect target number (if redirected)
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- startTime → DateTime?
-
Call start time (when initiated/received)
final
- state → CallState
-
Current call state
final
- stateDisplayName → String
-
Get state display name
no setter
- stringify → bool?
-
If set to
true, thetoStringmethod will be overridden to output this instance'sprops.no setterinherited - transferTarget → String?
-
Transfer target number (if transferring)
final
Methods
-
canTransitionTo(
CallState newState) → bool - Validate call state transition
-
copyWith(
{String? id, String? accountId, String? number, CallDirection? direction, CallState? state, DateTime? startTime, DateTime? connectTime, DateTime? endTime, bool? isMuted, bool? isOnHold, bool? isSpeaker, String? transferTarget, String? redirectTarget, String? callerName}) → SipCall - Create a copy with updated fields
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String - A string representation of this object.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited