Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

BasicAmiExample

Demonstrates the minimal setup to connect to Asterisk AMI: DI registration, connect, send a PingAction, subscribe to events, and disconnect.

Prerequisites

  • .NET 10 SDK
  • Asterisk PBX with AMI enabled (or Docker: see below)

Setup

docker compose -f docker/functional/docker-compose.functional.yml up -d

Run

dotnet run --project Examples/BasicAmiExample/

What It Shows

  • Registering Asterisk services with AddAsterisk() and IServiceCollection
  • Connecting to AMI with IAmiConnection.ConnectAsync()
  • Subscribing to the event stream via IObserver<ManagerEvent>
  • Sending a PingAction and reading the correlated response
  • Graceful disconnect with DisconnectAsync()

Key SDK Packages Used

  • Verbara.Sdk.Ami — AMI connection and actions
  • Verbara.Sdk.Hosting — DI registration (AddAsterisk)