flutter_sip_ua
Pure-Dart SIP user agent and Flutter client for the dart-pbx server. The UI is modelled on InnovateAsterisk Browser-Phone with a Riverpod-driven state layer and a modular widget tree.
Repository: github.com/KellyKinyama/flutter_sip_ua
Features
- Pure-Dart SIP signalling stack (
lib/sip/) — registration, calls, MESSAGE, digest auth, SDP, RTP/RTCP helpers. - Riverpod-based state management (
lib/providers/sip_providers.dart). - Browser-Phone-style UI:
- Two-pane shell with buddy sidebar + active stream.
- Modular call screen (
lib/ui/widgets/call/). - Dialer sheet, message composer, transfer sheet.
- Light and dark themes that mirror
phone.light.css/phone.dark.css. Theme choice is persisted via SharedPreferences and toggled from the sidebar toolbar (system → light → dark).
Getting started
flutter pub get
flutter run -d windows # or chrome / android / ios / linux / macos
Tests:
flutter test
Project layout
lib/
main.dart
providers/sip_providers.dart # Riverpod facade over the SIP UA + UI state
sip/ # Pure-Dart SIP UA, SDP, transport, audio/video
ui/
theme.dart # Light/dark ThemeData built from BP palette
bp_palette.dart # Browser-Phone color tokens + ThemeExtension
home_page.dart # Two-pane shell + dialer sheet
call_page.dart # Slim call orchestrator
widgets/
buddy_sidebar.dart # Left rail incl. theme toggle
dial_pad.dart
dialer_action_row.dart
call/ # Modular call UI pieces
Links
- Source: github.com/KellyKinyama/flutter_sip_ua
- Issues: github.com/KellyKinyama/flutter_sip_ua/issues
- Browser-Phone reference: github.com/InnovateAsterisk/Browser-Phone
Libraries
- main
- providers/sip_providers
- Riverpod providers for the SIP user agent and the UI-facing state derived from its event streams.
- sip/audio/audio_sink
- sip/audio/g711
- G.711 μ-law and A-law codec — pure Dart.
- sip/audio/jitter_buffer
- sip/audio/media_session
- Media plane for SIP calls.
- sip/audio/pcm_audio_sink
- Cross-platform AudioSink that pushes decoded PCM into
flutter_pcm_sound. Works on Windows / macOS / Linux / Android / iOS. - sip/audio/rtcp
- Minimal RFC 3550 RTCP packet codec — pure Dart.
- sip/audio/rtp
- Minimal RFC 3550 RTP packet builder + parser — pure Dart.
- sip/audio/rtp_stats
- RTP send/receive bookkeeping needed to emit RFC 3550 SR/RR reports.
- sip/digest
- Client side of RFC 2617 / RFC 3261 §22.4 digest authentication.
- sip/sdp
- Tiny SDP helper — only what the SIP UA needs to negotiate G.711 audio (and optional VP8 video) against dart-pbx. Not a full RFC 4566 parser.
- sip/sip_file_logger
- Append-only SIP wire-format logger. One file per launch; every inbound and outbound message is written verbatim with a timestamp + direction header so the file can be diffed against an Asterisk / dart-pbx pcap.
- sip/sip_message
- Minimal RFC 3261 message model — enough to talk to the dart-pbx server.
- sip/sip_user_agent
- Pure-Dart SIP user agent.
- sip/transport
- SIP transports.
- sip/video/video_codec
- Pluggable video codec for VideoSession.
- sip/video/video_session
- Video media plane: RTP/RTCP transport for VP8 frames over RFC 7741.
- sip/video/vp8_rtp
- RFC 7741 — RTP payload format for VP8.
- ui/bp_palette
- ui/call_page
- ui/home_page
- ui/login_page
- ui/theme
- ui/widgets/buddy_stream
- ui/widgets/call/call_action_panels
- ui/widgets/call/call_backdrop
- ui/widgets/call/call_party_card
- ui/widgets/call/call_stats_panel
- ui/widgets/call/call_top_bar
- ui/widgets/call/transfer_sheet
- ui/widgets/dial_pad
- ui/widgets/dialer_action_row
- ui/widgets/status_chip
- ui/widgets/welcome_pane