Crates.io | simple-sip-rs |
lib.rs | simple-sip-rs |
version | |
source | src |
created_at | 2025-02-02 08:15:40.088805 |
updated_at | 2025-02-05 15:26:35.954567 |
description | A Tiny, Easy To Use, Experimental SIP Library for Rust |
homepage | |
repository | https://github.com/seifane/simple-sip-rs |
max_upload_size | |
id | 1539363 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
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.
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, and some concept may be abstracted.
See the examples folder for a more complete example.
use std::net::SocketAddr;
use std::str::FromStr;
use simple_sip_rs::config::Config;
use simple_sip_rs::manager::SipManager;
async fn connect_and_call() {
let config = Config {
server_addr: SocketAddr::from_str("192.168.1.100:5060").unwrap(), // IP of SIP server
own_addr: SocketAddr::from_str("192.168.1.2").unwrap(), // Your IP in relation to the SIP server
username: "username".to_string(),
password: "password".to_string(),
};
let mut sip_manager = SipManager::from_config(config).await.unwrap();
sip_manager.start().await.unwrap();
let outgoing_call = sip_manager.call("1000".to_string());
}
opus
: Enables the Opus codec (default)pcmu
: Enables the PCMU codec (default)spcma
: Enables the PCMA codecYou can run the simple CLI example by running
cargo run --package simple-sip-rs --example cli -- --server-address 192.168.1.2:5060 --own-address 192.168.1.10:5060 --username username --password password
Contributions are welcome! Please feel free to open issues or submit pull requests.