8xFF / atm0s-media-server

Decentralized, Global-Scale Media Server written in Rust (WebRTC/Whip/Whep/Rtmp/Sip)
https://8xff.github.io/media-docs/
MIT License
235 stars 17 forks source link

Feat/rtp transport for SIP #359

Closed marverlous811 closed 4 months ago

marverlous811 commented 4 months ago

Pull Request

Description

I added the RTP transport for the SIP call—it is a transport for processing the raw RTP packet without Webrtc. I also added a server using the ng-control protocol, such as an RTP engine, for request calling from the SIP server.

Checklist

Additional Notes

Some problems I faced:

codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 9.40841% with 1271 lines in your changes missing coverage. Please review.

Project coverage is 39.94%. Comparing base (b63e5cf) to head (a49b745).

Files Patch % Lines
packages/media_codecs/src/opus/opus_wrap.rs 0.00% 376 Missing :warning:
packages/transport_rtpengine/src/transport.rs 0.00% 190 Missing :warning:
packages/media_runner/src/worker.rs 0.00% 91 Missing :warning:
packages/media_codecs/src/pcma.rs 42.30% 90 Missing :warning:
bin/src/ng_controller.rs 0.00% 81 Missing :warning:
packages/protocol/src/protobuf/cluster_gateway.rs 0.00% 60 Missing :warning:
packages/transport_rtpengine/src/worker.rs 0.00% 59 Missing :warning:
packages/protocol/src/transport/rtpengine.rs 0.00% 37 Missing :warning:
bin/src/server/gateway/local_rpc_handler.rs 0.00% 32 Missing :warning:
bin/src/http/api_token.rs 0.00% 30 Missing :warning:
... and 19 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #359 +/- ## ========================================== - Coverage 42.81% 39.94% -2.87% ========================================== Files 134 149 +15 Lines 14534 15890 +1356 ========================================== + Hits 6223 6348 +125 - Misses 8311 9542 +1231 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

giangndm commented 4 months ago

@marverlous811

  • I generate the answer SDP by fixing the media session and using the public IP of the current node. But I think it is another way to generate a more generic SDP

You can use local-ip-address lib to get current node IP. May be with sip we only need single default IP

  • For the transmitted RTP packet flow, I will convert the UDP data to an RTP packet and send it to the Media Endpoint. Is my way okay?

You need transcode it to opus, which is used to send over cluster

giangndm commented 4 months ago

NodeJs sample is moved to separated repo:

https://github.com/8xFF/atm0s-media-sip-call-sample