Asterisk ARI Client
A simple yet powerful library for managing the Asterisk ARI (Asterisk REST Interface). This library implements all Asterisk REST APIs and WebSocket events documented in the ARI API Documentation.
Features
- Full implementation of Asterisk REST APIs.
- WebSocket support for handling ARI events.
- Designed for simplicity and ease of use.
- Suitable for building custom telephony applications and integrations.
Installation
To use this library, add the following line to your Cargo.toml file:
[]
= "x.y.z" # Replace x.y.z with the latest version
Usage
Here's a basic example of how to use the library:
First spin the Asterisk server with ARI & HTTP enabled, or use the dockerized example. See examples/asterisk for more details.)
use channels;
use AriClient;
use Config;
use Result;
use info;
async
For detailed usage and API documentation, visit the docs.
Configuration
Ensure that your Asterisk instance is configured to enable ARI.
Update your ari.conf file with the appropriate settings, example:
[general]
enabled = yes
pretty = yes ; not mandatory.
[asterisk]
type = user
read_only = no
password = asterisk
Contributing
Contributions are welcome! If you'd like to contribute to this project, please follow these steps:
- Fork the repository.
- Create a new branch:
git checkout -b my-feature-branch. - Make your changes and commit them:
git commit -m 'Add some feature'. - Push to the branch:
git push origin my-feature-branch. - Submit a pull request.
Before submitting, ensure your code follows the project’s coding standards and passes all tests.
Development
Running Tests
To run the tests, use:
Linting
Ensure your code adheres to the Rust style guide by running:
&&
Roadmap
- Add more tests.
- Add more examples and documentation.
Issues and Feedback
If you encounter any issues, please create a new issue. Feedback and feature requests are always appreciated!
License
This project is licensed under either of the following licenses, at your option:
For more information, see the LICENSE-APACHE and LICENSE-MIT files.
Acknowledgments
Special thanks to the Asterisk community for creating such a powerful telephony platform.