asterisk-rs-agi
Async Rust FastAGI server for Asterisk Gateway Interface.
AGI allows external programs to control Asterisk dialplan execution over a TCP connection (FastAGI, port 4573). This crate provides a typed, async server built on Tokio that dispatches incoming AGI sessions to a user-defined handler.
Features:
AgiHandlertrait using async fn in trait (RPITIT)- 47 typed AGI commands (
answer,stream_file,get_data,hangup, etc.) AgiChannelfor sending commands and reading responses within a sessionAgiRequestwith parsedagi_*environment variables- Configurable concurrency via
max_connections
Install
Usage
use ;
;
async
See examples/agi_server.rs for a more complete example.
Part of asterisk-rs
This crate is part of the asterisk-rs workspace.
MSRV
The minimum supported Rust version is 1.83.
License
Licensed under either of Apache License, Version 2.0 or MIT License at your option.