Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

AMI API reference

The public Rust API is documented in asterisk_rs_ami. Rustdoc is the canonical inventory of actions, events, builders, errors, and methods; this guide explains how those APIs fit together without duplicating a generated symbol table.

Find the right API

  • AmiClient owns connection, authentication, subscriptions, action correlation, and shutdown.
  • action contains typed AMI actions. Use send for one response and send_collecting for Asterisk actions that terminate with a completion event.
  • AmiEvent contains modeled events and retains unknown events for forward-compatible handling.
  • AmiResponse exposes parsed response fields and output from Response: Follows.

Start with connection and authentication, then use events for subscription and lag behavior. The crate examples show complete Tokio programs.