asterisk_rs_ami/lib.rs
1//! Async Rust client for the Asterisk Manager Interface (AMI).
2//!
3//! AMI is a TCP-based protocol for monitoring and controlling Asterisk PBX.
4//! This crate provides a fully async client with typed actions, events,
5//! automatic reconnection, and MD5 challenge-response authentication.
6//!
7//! # Quick Start
8//!
9//! ```rust,no_run
10//! use asterisk_rs_ami::AmiClient;
11//!
12//! #[tokio::main]
13//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
14//! let client = AmiClient::builder()
15//! .host("127.0.0.1")
16//! .port(5038)
17//! .credentials("admin", "secret")
18//! .build()
19//! .await?;
20//!
21//! let response = client.ping().await?;
22//! println!("pong: {:?}", response);
23//! Ok(())
24//! }
25//! ```
26
27pub mod action;
28pub mod client;
29pub mod codec;
30pub mod connection;
31pub mod error;
32pub mod event;
33pub mod response;
34pub mod tracker;
35
36pub use client::{AmiClient, AmiClientBuilder};
37pub use error::AmiError;
38pub use event::AmiEvent;
39pub use response::EventListResponse;
40pub use tracker::{CallTracker, CompletedCall};