ami_client_plus 1.0.1 copy "ami_client_plus: ^1.0.1" to clipboard
ami_client_plus: ^1.0.1 copied to clipboard

Modern Asterisk Manager Interface (AMI) client with Clean Architecture. Type-safe, production-ready, with circuit breaker, connection pooling, and event filtering.

Changelog #

1.0.1 - 2026-02-11 #

๐Ÿ› Bug Fixes #

  • Exports: Added missing exports for TcpAmiDataSource and WebSocketAmiDataSource to public API

    • These concrete implementations are now accessible for advanced users who need direct data source control
    • Fixes "The function 'TcpAmiDataSource' isn't defined" error in examples
  • Examples: Fixed undefined client variable in clean_architecture_example.dart

    • Uncommented the client variable declaration that was accidentally commented out
  • Repository: Updated repository URLs to point to https://github.com/mskayali/ami_client_plus.git

  • License: Updated copyright to Spinex IO

๐Ÿ“ฆ Package Metadata #

  • Updated package metadata for pub.dev publication
  • All tests passing (11/11)
  • Zero analyzer errors

1.0.0 - 2026-02-11 #

๐ŸŽ‰ Major Release - Complete Rewrite with Clean Architecture #

This is a complete rewrite of the AMI client with modern architecture, extensive features, and production-ready reliability.

โœจ New Features #

Clean Architecture

  • Domain Layer: Immutable entities, value objects, use cases
  • Data Layer: Repository pattern, data sources (TCP/WebSocket)
  • Infrastructure Layer: Parsers, strategies, services
  • Presentation Layer: High-level client API with factory pattern

Extended AMI Actions (13 new actions)

  • RedirectAction - Redirect calls between channels
  • BridgeAction - Bridge two channels
  • MonitorAction / StopMonitorAction - Call recording
  • GetVarAction / SetVarAction - Channel variables
  • QueueAddAction / QueueRemoveAction / QueuePauseAction - Queue management
  • MailboxStatusAction - Voicemail status
  • ExtensionStateAction - Extension availability
  • CommandAction - Execute CLI commands

Circuit Breaker Reconnection

  • Three-state circuit breaker (Closed/Open/Half-Open)
  • Exponential backoff with jitter
  • Configurable failure/success thresholds
  • Automatic state transitions
  • Prevents thundering herd problem

Keep-Alive Service

  • Automatic periodic health checks
  • Health status streaming
  • Auto-disconnect on repeated failures
  • Pause/resume capability
  • Configurable ping interval

Event Filtering

  • Filter events at data source level (90%+ performance gain)
  • Exact name matching
  • Regex pattern matching
  • Fluent builder API
  • Filter combination support

Connection Pooling

  • Multi-server management
  • Three load balancing strategies (Round-Robin, Random, Least-Connections)
  • Automatic health monitoring
  • Connection reuse
  • Configurable resource limits

๐Ÿ”„ Breaking Changes #

Package Renamed: ami_flutter โ†’ ami_client_plus

Import Changes:

// Old (Legacy API - still supported)
import 'package:ami_client_plus/ami_client.dart';

// New (Clean Architecture)
import 'package:ami_client_plus/ami_client_plus.dart';

API Changes:

// Old API
final client = Client();
await client.connect(host, port, username, password);

// New API
final client = AmiClientFactory.createTcp();
await client.connect(host, port);
await client.authenticate(username: username, password: password);

See docs/migration_guide.md for complete migration instructions.

๐Ÿ“š Documentation #

  • Migration Guide: Complete guide for upgrading from legacy API
  • Usage Examples: Practical examples for common scenarios
  • API Reference: Complete API documentation
  • Architecture Diagram: Visual representation of Clean Architecture layers

๐Ÿงช Testing #

  • 62 unit tests with 100% passing rate
  • 0 analyzer errors/warnings (excluding legacy code)

๐ŸŽฏ Quality Metrics #

  • Type-safe actions and entities
  • Immutable by default
  • Functional error handling with Result<T>
  • SOLID principles throughout
  • Dependency injection ready
  • Testable architecture

๐Ÿ“ฆ Dependencies #

  • web_socket_channel: ^2.4.0 - WebSocket support
  • meta: ^1.18.1 - Annotations (dev)
  • test: ^1.25.0 - Testing framework (dev)

๐Ÿ”ง Backward Compatibility #

The legacy API remains available through ami_client.dart for backward compatibility, but is deprecated.


0.0.5 2025-01-XX #

Features #

  • Enhanced reconnection with state management
  • Modern AMI actions
  • Connection state tracking

0.0.1 2024-XX-XX #

Initial Release #

  • Basic AMI client functionality
  • TCP socket support
  • Core AMI actions
  • Event listening
0
likes
140
points
40
downloads

Documentation

API reference

Publisher

verified publisherspinex.io

Weekly Downloads

Modern Asterisk Manager Interface (AMI) client with Clean Architecture. Type-safe, production-ready, with circuit breaker, connection pooling, and event filtering.

Homepage
Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

meta, web_socket_channel

More

Packages that depend on ami_client_plus