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.

example/README.md

AMI Client Plus Examples #

This directory contains standalone examples demonstrating the ami_client_plus package.

Running the Examples #

1. Install dependencies #

cd example
dart pub get

2. Configure Asterisk connection #

Edit the example files to match your Asterisk server configuration:

  • Host (default: 127.0.0.1)
  • Port (default: 5038)
  • Username (default: admin)
  • Password (default: secret)

3. Run an example #

# Basic Clean Architecture example
dart run clean_architecture_example.dart

# Advanced features (circuit breaker, keep-alive)
dart run advanced_features_example.dart

Examples Overview #

clean_architecture_example.dart #

Complete demo showing:

  • TCP connection setup
  • Authentication
  • Sending actions (Ping, Status)
  • Extended actions (QueueAdd)
  • Event listening
  • Graceful disconnection

advanced_features_example.dart #

Advanced features demo:

  • Keep-alive service with health monitoring
  • Event filtering
  • Circuit breaker reconnection
  • Status streaming

Prerequisites #

You need a running Asterisk server with:

  • AMI enabled in /etc/asterisk/manager.conf
  • Valid manager credentials
  • Network access to the server

Example manager.conf:

[general]
enabled = yes
port = 5038
bindaddr = 0.0.0.0

[admin]
secret = secret
read = all
write = all

Troubleshooting #

Connection refused: Ensure Asterisk is running and AMI is enabled Authentication failed: Check username/password in manager.conf No events received: Verify manager user has read permissions

0
likes
140
points
39
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