Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/rtp transport for SIP #359

Merged
merged 20 commits into from
Jul 31, 2024
Merged

Conversation

marverlous811
Copy link
Contributor

@marverlous811 marverlous811 commented Jul 20, 2024

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

  • Simple Ng Control Server
  • Rtp Transport
    • Process RPC from Ng Control
    • Generate Sdp
    • Transmit Rtp packet
    • Encode audio data
    • End Call
  • using configuration param for setting. Currently, I'm fixing all settings.
  • Gateway route to best node
  • Secure
    • Token
    • Fixed IP

Additional Notes

Some problems I faced:

  • 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

  • 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?

Copy link

codecov bot commented Jul 20, 2024

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 ⚠️
packages/transport_rtpengine/src/transport.rs 0.00% 190 Missing ⚠️
packages/media_runner/src/worker.rs 0.00% 91 Missing ⚠️
packages/media_codecs/src/pcma.rs 42.30% 90 Missing ⚠️
bin/src/ng_controller.rs 0.00% 81 Missing ⚠️
packages/protocol/src/protobuf/cluster_gateway.rs 0.00% 60 Missing ⚠️
packages/transport_rtpengine/src/worker.rs 0.00% 59 Missing ⚠️
packages/protocol/src/transport/rtpengine.rs 0.00% 37 Missing ⚠️
bin/src/server/gateway/local_rpc_handler.rs 0.00% 32 Missing ⚠️
bin/src/http/api_token.rs 0.00% 30 Missing ⚠️
... and 19 more
Additional details and impacted files
@@            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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@giangndm
Copy link
Contributor

@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
Copy link
Contributor

NodeJs sample is moved to separated repo:

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

@giangndm giangndm merged commit 69d6752 into 8xFF:master Jul 31, 2024
9 of 11 checks passed
giangndm added a commit to giangndm/8xFF-decentralized-media-server that referenced this pull request Nov 26, 2024
* add rtp engine for voip

* add answer offer sdp with fixed

* create rtp internal process for transport

* add rtp parser packet

* rewrite sdp answer function

* add sample for sip drachtio

* add simple converter

* refactor ng-controller-server

* first working without transcode

* fixed warns

* fix deny with sdp-rs

* fix deny with sdp-rs

* added token secure

* added gateway proxy

* audio transcode

* fix warns

* fix typos

* update github action

* add SIP docs

---------

Co-authored-by: Giang Minh <giang.ndm@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants