simple-sip-rs: A Tiny, Easy To Use, Experimental SIP Library for Rust
Disclaimer
simple-sip-rs is currently in its early stages of development and is not suitable for production use. It is designed for small, experimental projects and may have limitations or bugs.
Purpose
simple-sip-rs aims to provide a basic framework for implementing SIP (Session Initiation Protocol) functionality in Rust projects. It's a work in progress and may have limitations or bugs.
Note: simple-sip-rs is designed to be opinionated, making it easier for developers to get started with SIP in Rust. However, this also means that it may not be as flexible as other libraries.
Features
- Basic SIP message parsing and sending: Can handle simple SIP messages like INVITE, ACK, and BYE.
- Support for PCMU and Opus codecs: simple-sip-rs can handle both PCMU and opus codecs for audio communication.
- Support for Telephone events: simple-sip-rs can receive telephone events aka DTMF button presses (not send them currently).
Usage
See the examples folder for a more complete example.
use SocketAddr;
use FromStr;
use Config;
use SipManager;
async
Examples
You can run the simple CLI example by running
Limitations and Future Plans
- Limited functionality: simple-sip-rs currently supports only a subset of SIP features. More features might be implemented over time. (PRs welcome)
- Experimental status: The API may change as the library evolves. Use with caution.
- Encryption: Encryption may be added in the future, but it's not guaranteed. (PRs welcome)
- Further testing: This was tested against a FreePBX server running in the same network as the client. There might be cases that are not handled properly when operating behind NATs.
Contributing
Contributions are welcome! Please feel free to open issues or submit pull requests.