GithubHelp home page GithubHelp logo

televiska / rsip Goto Github PK

View Code? Open in Web Editor NEW
70.0 70.0 15.0 327 KB

SIP Rust library (generator & parser)

Home Page: https://docs.rs/rsip

License: Other

Rust 100.00%
rust signaling sip voip webrtc

rsip's People

Contributors

elasticrash avatar g-mpuzyna avatar vasilakisfil avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

rsip's Issues

Contributing to rsip

I am moving over here from the SIP server. I was reading over the locating sip server literature with RFC 3263. After reading through your code, you are doing a lot of nuanced things that I don't fully understand the reason for and I realized I'm not comfortable enough with Rust to contribute to the issue that was initially brought up.
I would definitely take some real easy issue if there is one. Otherwise, I am putting this on the backburner while I start the Rust portion of another personal project I'm doing. It was really cool looking through the code and see what someone who really knows their stuff is doing with the language.

Apologies if this is the wrong forum for this, I just didn't want to say I will contribute and then disappear.

example parsing header?

I'm trying to use this crate to parse SIP headers but I'm having a bit of a hard time finding how to actually go from a String or &str into a header, for example From, To.
Is there some code I can look at in order to do this?

Parse error when Request has a body

I am getting the following parser error
rsip error: could not parse part: Nom(Tag): , Nom(Alt)

When I receive, and try to parse an INVITE with a body.

This is an example of how the last part of the INVITE Request and its body looks like

.... Accept: application/sdp\r\n Content-Type: application/sdp\r\n Content-Length: 406\r\n\r\n v=0\r\n o=aculab-02360801 2108656133 265635486 IN IP4 XX.XX.XX.XX\r\n s=-\r\n c=IN IP4 XX.XX.XX.XX\r\n t=0 0\r\n m=audio 47580 RTP/AVP 120 0 18 8 9 96\r\n c=IN IP4 XX.XX.XX.XX\r\n a=rtpmap:96 telephone-event/8000\r\n a=fmtp:96 0-15\r\n a=ptime:20\r\n a=rtpmap:120 OPUS/48000/2\r\n a=fmtp:120 minptime=20; maxplaybackrate=16000; maxaveragebitrate=24000; useinbandfec=1\r\n a=rtpmap:18 G729/8000\r\n a=fmtp:18 annexb=yes\r\n a=rtpmap:9 G722/8000\r\n"

After writing a few dozens tests I realized that the issue is that it does not parse the colon : character in the attributes (https://datatracker.ietf.org/doc/html/rfc4566#section-5.13) correctly

I might try to fix the issue myself, but I thought it would be nice to raise an issue so as to be aware of it

Doesn't seem to build

When creating a new project with cargo new test then adding this as the only dependency in the cargo.toml file,I get the following error with cargo run:

error[E0391]: cycle detected when computing the supertraits of `headers::typed::TypedHeader`
  --> /rsip-0.2.0/src/headers/typed/mod.rs:25:1
   |
25 | / pub trait TypedHeader<'a>:
26 | |     std::fmt::Debug
27 | |     + std::fmt::Display
28 | |     + std::cmp::PartialEq
...  |
35 | |     type Tokenizer: Tokenize<'a>;
36 | | }
   | |_^
   |
   = note: ...which again requires computing the supertraits of `headers::typed::TypedHeader`, completing the cycle
note: cycle used when collecting item types in module `headers::typed`
  --> /rsip-0.2.0/src/headers/typed/mod.rs:25:1
   |
25 | / pub trait TypedHeader<'a>:
26 | |     std::fmt::Debug
27 | |     + std::fmt::Display
28 | |     + std::cmp::PartialEq
...  |
35 | |     type Tokenizer: Tokenize<'a>;
36 | | }
   | |_^

Any ideas?

Add Stir Shaken

I have forked the repo and trying to add stir shaken, but I my limited parsing is making it difficult.
The two new filed in sip that I am trying to add are "Identity" and "P-Asserted-Identity"
P-Asserted_Identity is
[Quoted string]Vec URLs are comma separated
Identity is
unquoted string;Vec where string is a base64 JWT, params are semicolon separated (key value pair)

I plan to use a JWT library to parse the JWT

I would like some help with the parsing, I am willing to be coding, testing and and create a PR.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.