SlideShare a Scribd company logo
Multistream support in the
Janus SIP and NoSIP plugins
Lorenzo Miniero @ Meetecho OpenSIPS Summit @ Amsterdam May 28, 2025
Janus and OpenSIPS: super cool!
Who am I?
Lorenzo Miniero
• Ph.D @ UniNA
• Chairman @ Meetecho
• Main author of Janus and imquic
Contacts and info
• lorenzo@meetecho.com
• https://fosstodon.org/@lminiero
• https://bsky.app/profile/lminiero.it
• https://www.threads.net/@lminier0
• https://www.meetecho.com
• https://lminiero.it
Just a few words on Meetecho
• Co-founded in 2009 as an academic spin-off
• University research efforts brought to the market
• Completely independent from the University
• Focus on real-time multimedia applications
• Strong perspective on standardization and open source
• Several activities
• Consulting services
• Commercial support and Janus licenses
• Streaming of live events (IETF, ACM, etc.)
• Proudly brewed in sunny Napoli, Italy
Speaking of Napoli... we did it #ag4in!
Speaking of Napoli... we did it #ag4in!
Speaking of Napoli... we did it #ag4in!
A bit of context: Janus, WebRTC and SIP
General purpose, open source WebRTC server
• https://github.com/meetecho/janus-gateway
• Demos and documentation: https://janus.conf.meetecho.com
• Community: https://janus.discourse.group/
An endpoint of behalf of WebRTC users
• Janus SIP plugin acts as a collection of SIP endpoints
• SIP stack implemented with Sofia-SIP
• WebRTC users only see the Janus API (JSON), no SIP
• No transcoding, media is only relayed
• Built-in recording (separate media legs)
• Experimental trunking support 1
1https://github.com/meetecho/janus-gateway/pull/3501
An endpoint of behalf of WebRTC users
• Janus SIP plugin acts as a collection of SIP endpoints
• SIP stack implemented with Sofia-SIP
• WebRTC users only see the Janus API (JSON), no SIP
• No transcoding, media is only relayed
• Built-in recording (separate media legs)
• Experimental trunking support 1
• Simplifies life for web developers
• No need to worry about a SIP stack (only SIP URIs)
• Basic methods/events to handle dialogs (call, answer, hangup, message, etc.)
• Allows SIP headers injection/interception in many requests
• Support for more advanced features too (e.g., hold, transfer, etc.)
1https://github.com/meetecho/janus-gateway/pull/3501
An endpoint of behalf of WebRTC users
• Janus SIP plugin acts as a collection of SIP endpoints
• SIP stack implemented with Sofia-SIP
• WebRTC users only see the Janus API (JSON), no SIP
• No transcoding, media is only relayed
• Built-in recording (separate media legs)
• Experimental trunking support 1
• Simplifies life for web developers
• No need to worry about a SIP stack (only SIP URIs)
• Basic methods/events to handle dialogs (call, answer, hangup, message, etc.)
• Allows SIP headers injection/interception in many requests
• Support for more advanced features too (e.g., hold, transfer, etc.)
• NoSIP plugin is there when you only need a media gateway
• You handle SIP, Janus deals with the media (e.g., in OpenSIPS)
1https://github.com/meetecho/janus-gateway/pull/3501
SIP plugin in Janus
https://janus.conf.meetecho.com/docs/sip
NoSIP plugin in Janus (media gw only)
https://janus.conf.meetecho.com/docs/nosip
A known limitation, though...
• In the past, PeerConnections in Janus had a well-known “limitation”
• Only one stream and m-line per media type allowed
• PeerConnections limited to 1 audio + 1 video + 1 data channel
A known limitation, though...
• In the past, PeerConnections in Janus had a well-known “limitation”
• Only one stream and m-line per media type allowed
• PeerConnections limited to 1 audio + 1 video + 1 data channel
• Limitation removed in Janus 1.x (multistream refactoring)...
• Support for multiple streams of the same type in the same PeerConnection
• Functionality added to EchoTest, Streaming and VideoRoom plugins
A known limitation, though...
• In the past, PeerConnections in Janus had a well-known “limitation”
• Only one stream and m-line per media type allowed
• PeerConnections limited to 1 audio + 1 video + 1 data channel
• Limitation removed in Janus 1.x (multistream refactoring)...
• Support for multiple streams of the same type in the same PeerConnection
• Functionality added to EchoTest, Streaming and VideoRoom plugins
• ... but SIP and NoSIP plugins still stuck with it!
• Core supported multiple streams per call, those plugins didn’t
• “Lazy” rationale: most calls don’t need multiple audio/video streams anyway
• Made adding support for new media harder, though (e.g., data channels)
From this...
https://github.com/meetecho/janus-gateway/pull/3514
... to this!
https://github.com/meetecho/janus-gateway/pull/3514
Bringing multistream to SIP/NoSIP
• Media stack in SIP and NoSIP plugins mostly the same
• Struct with hardcoded audio/video details in user object
• Sockets, ports, payload types, etc.
• Helper functions hardcoded to deal with audio/video too
Bringing multistream to SIP/NoSIP
• Media stack in SIP and NoSIP plugins mostly the same
• Struct with hardcoded audio/video details in user object
• Sockets, ports, payload types, etc.
• Helper functions hardcoded to deal with audio/video too
• Changed struct to array of generic “media” lines
• Property defines type of media (audio, video, data)
• Everything else is generic and shared
Bringing multistream to SIP/NoSIP
• Media stack in SIP and NoSIP plugins mostly the same
• Struct with hardcoded audio/video details in user object
• Sockets, ports, payload types, etc.
• Helper functions hardcoded to deal with audio/video too
• Changed struct to array of generic “media” lines
• Property defines type of media (audio, video, data)
• Everything else is generic and shared
• Had to deal with a few challenges
• File descriptors moved to hash tables (demultiplexing)
• Optional SDES-SRTP setup had to be made more flexible too
• Aligning media differences in SIP and NoSIP stacks wasn’t always easy
Argh, Sofia SIP, not you too!
• Bumped into a bit of a head scratcher in the SIP plugin
• SDP in the NoSIP plugin handled by Janus entirely
• SDP in the SIP plugin goes through Sofia SIP (NUA)
Argh, Sofia SIP, not you too!
• Bumped into a bit of a head scratcher in the SIP plugin
• SDP in the NoSIP plugin handled by Janus entirely
• SDP in the SIP plugin goes through Sofia SIP (NUA)
• By default, though, Sofia uses SOA to deal with SDP
• SOA = SDP Offer/Answer Engine
• Implements filtering of SDP as part of offer/answer
Argh, Sofia SIP, not you too!
• Bumped into a bit of a head scratcher in the SIP plugin
• SDP in the NoSIP plugin handled by Janus entirely
• SDP in the SIP plugin goes through Sofia SIP (NUA)
• By default, though, Sofia uses SOA to deal with SDP
• SOA = SDP Offer/Answer Engine
• Implements filtering of SDP as part of offer/answer
• Normally not an issue, but it breaks with multistream
• Second m-line of the same type always rejected (port=0)
• Possibly SOA was never coded to deal with multiple audio/video streams?
Argh, Sofia SIP, not you too!
• Bumped into a bit of a head scratcher in the SIP plugin
• SDP in the NoSIP plugin handled by Janus entirely
• SDP in the SIP plugin goes through Sofia SIP (NUA)
• By default, though, Sofia uses SOA to deal with SDP
• SOA = SDP Offer/Answer Engine
• Implements filtering of SDP as part of offer/answer
• Normally not an issue, but it breaks with multistream
• Second m-line of the same type always rejected (port=0)
• Possibly SOA was never coded to deal with multiple audio/video streams?
• Solution: simply disable SOA entirely, and deal with SDP in Janus
• NUTAG_MEDIA_ENABLE(0)
• SIPTAG_CONTENT_TYPE_STR(s) + SIPTAG_PAYLOAD_STR(s)
Eureka, that works!
Eureka, that works!
(about the finger, no, I don’t know why!)
What about generic data?
• Topic of my presentation last year in Valencia
• “WebRTC-to-SIP and back – It’s not all about audio and video!”
What about generic data?
• Topic of my presentation last year in Valencia
• “WebRTC-to-SIP and back – It’s not all about audio and video!”
• Non audio/video media could be gateway-ed through data channels
• e.g., Real-Time Text (T.140), MSRP, BFCP, ...
• All could be exchanged via data channels on the WebRTC side
• Before, we needed new hardcoded details for that (audio/video/XYZ)
What about generic data?
• Topic of my presentation last year in Valencia
• “WebRTC-to-SIP and back – It’s not all about audio and video!”
• Non audio/video media could be gateway-ed through data channels
• e.g., Real-Time Text (T.140), MSRP, BFCP, ...
• All could be exchanged via data channels on the WebRTC side
• Before, we needed new hardcoded details for that (audio/video/XYZ)
• Multistream support helps, but there are challenges
• Main one would be SDP asymmetry, if more protocols are used
• N m-lines on the SIP side, only one for WebRTC (data channels)
What about generic data?
• Topic of my presentation last year in Valencia
• “WebRTC-to-SIP and back – It’s not all about audio and video!”
• Non audio/video media could be gateway-ed through data channels
• e.g., Real-Time Text (T.140), MSRP, BFCP, ...
• All could be exchanged via data channels on the WebRTC side
• Before, we needed new hardcoded details for that (audio/video/XYZ)
• Multistream support helps, but there are challenges
• Main one would be SDP asymmetry, if more protocols are used
• N m-lines on the SIP side, only one for WebRTC (data channels)
• Mapping of m-lines would need to be taken care of accordingly
• Especially important for renegotiations and RTP bridging
Next steps
• Merge this!
• Currently marked as a draft PR, since it’s experimental
• Waiting for testing/feedback from the community
Next steps
• Merge this!
• Currently marked as a draft PR, since it’s experimental
• Waiting for testing/feedback from the community
• Will this actually be needed?
• How many use cases are there for multiple A/V streams in SIP?
• Could this be useful in OpenSIPS’s integration of NoSIP?
Next steps
• Merge this!
• Currently marked as a draft PR, since it’s experimental
• Waiting for testing/feedback from the community
• Will this actually be needed?
• How many use cases are there for multiple A/V streams in SIP?
• Could this be useful in OpenSIPS’s integration of NoSIP?
• We need a plan for data channels too
• See my talk @ OpenSIPS Summit 2024 in Valencia
• Porting the existing Real-Time Text (T.140) PR could be a good start
Next steps
• Merge this!
• Currently marked as a draft PR, since it’s experimental
• Waiting for testing/feedback from the community
• Will this actually be needed?
• How many use cases are there for multiple A/V streams in SIP?
• Could this be useful in OpenSIPS’s integration of NoSIP?
• We need a plan for data channels too
• See my talk @ OpenSIPS Summit 2024 in Valencia
• Porting the existing Real-Time Text (T.140) PR could be a good start
• What about RTP Over QUIC (RoQ)?
• Will there be a future for SIP Over QUIC too?
Thanks! Questions? Comments?
Contacts
• https://fosstodon.org/@lminiero
• https://bsky.app/profile/lminiero.it
• https://www.threads.net/@lminier0
• https://www.meetecho.com/blog/
• https://lminiero.it

More Related Content

PDF
WebRTC and SIP not just audio and video @ OpenSIPS 2024
PDF
Janus/SIP @ OpenSIPS 2017
PDF
SIP transfer with Janus/WebRTC @ OpenSIPS 2022
PDF
Janus/SIP @ OpenSIPS 2019
PDF
Multistream in Janus @ CommCon 2019
PDF
Janus/Asterisk @ Astricon 2017
PDF
SIP trunking in Janus @ Kamailio World 2024
PDF
Scaling WebRTC applications with Janus
WebRTC and SIP not just audio and video @ OpenSIPS 2024
Janus/SIP @ OpenSIPS 2017
SIP transfer with Janus/WebRTC @ OpenSIPS 2022
Janus/SIP @ OpenSIPS 2019
Multistream in Janus @ CommCon 2019
Janus/Asterisk @ Astricon 2017
SIP trunking in Janus @ Kamailio World 2024
Scaling WebRTC applications with Janus

Similar to Multistream in SIP and NoSIP @ OpenSIPS Summit 2025 (20)

PDF
Scaling server side web rtc applications the janus challenge by lorenzo miniero
PDF
Janus + Audio @ Open Source World
PDF
Janus @ ClueCon 2019
PDF
Write a SocialTV app @ OpenSIPS 2021
PDF
WebRTC, RED and Janus @ ClueCon21
PPTX
VozDigital DevFest 31/10/14
PDF
Mobicents Summit 2012 - Orange Mobicents WebRTC Contribution : JAIN SIP JS
PDF
WebRTC standards update (13 Nov 2013)
PDF
Boost JBoss AS7 with HTML5 WebRTC for Real Time Communications
PDF
Janus Workshop @ ClueCon 2020
PDF
An hour with WebRTC FIC UDC
PDF
Mobicents 2.0, The Java Open Source Communications Platform-FOSDEM 2011 Jean ...
PDF
Janus RTP forwarders @ FOSDEM 2020
PDF
WebRTC Summit November 2013 - WebRTC Interoperability (and why it is important)
PPTX
Kamailio World 2014 - Kamailio - The Platform for Interoperable WebRTC
PPTX
Grokking TechTalk #18B: VoIP Architecture For Telecommunications
PDF
WebRTC - Is it ready? 2013
PDF
Janus workshop @ RTC2019 Beijing
PDF
Modern VoIP in modern infrastructures
PDF
Webrtc - rich communication - quobis - victor pascual
Scaling server side web rtc applications the janus challenge by lorenzo miniero
Janus + Audio @ Open Source World
Janus @ ClueCon 2019
Write a SocialTV app @ OpenSIPS 2021
WebRTC, RED and Janus @ ClueCon21
VozDigital DevFest 31/10/14
Mobicents Summit 2012 - Orange Mobicents WebRTC Contribution : JAIN SIP JS
WebRTC standards update (13 Nov 2013)
Boost JBoss AS7 with HTML5 WebRTC for Real Time Communications
Janus Workshop @ ClueCon 2020
An hour with WebRTC FIC UDC
Mobicents 2.0, The Java Open Source Communications Platform-FOSDEM 2011 Jean ...
Janus RTP forwarders @ FOSDEM 2020
WebRTC Summit November 2013 - WebRTC Interoperability (and why it is important)
Kamailio World 2014 - Kamailio - The Platform for Interoperable WebRTC
Grokking TechTalk #18B: VoIP Architecture For Telecommunications
WebRTC - Is it ready? 2013
Janus workshop @ RTC2019 Beijing
Modern VoIP in modern infrastructures
Webrtc - rich communication - quobis - victor pascual
Ad

More from Lorenzo Miniero (20)

PDF
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
PDF
WebRTC and QUIC: how hard can it be? @ RTC.ON 2024
PDF
Getting AV1/SVC to work in the Janus WebRTC Server
PDF
WebRTC Broadcasting @ TADSummit 2023
PDF
BWE in Janus
PDF
The challenges of hybrid meetings @ CommCon 2023
PDF
Real-Time Text and WebRTC @ Kamailio World 2023
PDF
Become a rockstar using FOSS!
PDF
Janus SFU cascading @ IIT-RTC 2022
PDF
WHIP WebRTC Broadcasting @ FOSDEM 2022
PDF
WHIP and Janus @ IIT-RTC 2021
PDF
JamRTC @ Wonder WebRTC unConference
PDF
Scaling WebRTC deployments with multicast @ IETF 110 MBONED
PDF
Janus Workshop pt.2 @ ClueCon 2021
PDF
Janus + NDI @ ClueCon 2021
PDF
Can WebRTC help musicians? @ FOSDEM 2021
PDF
Virtual IETF meetings with WebRTC @ IETF 109 MOPS
PDF
Can SFUs and MCUs be friends @ IIT-RTC 2020
PDF
Insertable Streams and E2EE @ ClueCon2020
PDF
Turning live events to virtual with Janus
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
WebRTC and QUIC: how hard can it be? @ RTC.ON 2024
Getting AV1/SVC to work in the Janus WebRTC Server
WebRTC Broadcasting @ TADSummit 2023
BWE in Janus
The challenges of hybrid meetings @ CommCon 2023
Real-Time Text and WebRTC @ Kamailio World 2023
Become a rockstar using FOSS!
Janus SFU cascading @ IIT-RTC 2022
WHIP WebRTC Broadcasting @ FOSDEM 2022
WHIP and Janus @ IIT-RTC 2021
JamRTC @ Wonder WebRTC unConference
Scaling WebRTC deployments with multicast @ IETF 110 MBONED
Janus Workshop pt.2 @ ClueCon 2021
Janus + NDI @ ClueCon 2021
Can WebRTC help musicians? @ FOSDEM 2021
Virtual IETF meetings with WebRTC @ IETF 109 MOPS
Can SFUs and MCUs be friends @ IIT-RTC 2020
Insertable Streams and E2EE @ ClueCon2020
Turning live events to virtual with Janus
Ad

Recently uploaded (20)

PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPT
Teaching material agriculture food technology
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
cuic standard and advanced reporting.pdf
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Getting Started with Data Integration: FME Form 101
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
Encapsulation_ Review paper, used for researhc scholars
MYSQL Presentation for SQL database connectivity
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Group 1 Presentation -Planning and Decision Making .pptx
Dropbox Q2 2025 Financial Results & Investor Presentation
Programs and apps: productivity, graphics, security and other tools
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Reach Out and Touch Someone: Haptics and Empathic Computing
Teaching material agriculture food technology
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
cuic standard and advanced reporting.pdf
A comparative analysis of optical character recognition models for extracting...
MIND Revenue Release Quarter 2 2025 Press Release
20250228 LYD VKU AI Blended-Learning.pptx
“AI and Expert System Decision Support & Business Intelligence Systems”
Getting Started with Data Integration: FME Form 101
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Digital-Transformation-Roadmap-for-Companies.pptx

Multistream in SIP and NoSIP @ OpenSIPS Summit 2025

  • 1. Multistream support in the Janus SIP and NoSIP plugins Lorenzo Miniero @ Meetecho OpenSIPS Summit @ Amsterdam May 28, 2025
  • 2. Janus and OpenSIPS: super cool!
  • 3. Who am I? Lorenzo Miniero • Ph.D @ UniNA • Chairman @ Meetecho • Main author of Janus and imquic Contacts and info • lorenzo@meetecho.com • https://fosstodon.org/@lminiero • https://bsky.app/profile/lminiero.it • https://www.threads.net/@lminier0 • https://www.meetecho.com • https://lminiero.it
  • 4. Just a few words on Meetecho • Co-founded in 2009 as an academic spin-off • University research efforts brought to the market • Completely independent from the University • Focus on real-time multimedia applications • Strong perspective on standardization and open source • Several activities • Consulting services • Commercial support and Janus licenses • Streaming of live events (IETF, ACM, etc.) • Proudly brewed in sunny Napoli, Italy
  • 5. Speaking of Napoli... we did it #ag4in!
  • 6. Speaking of Napoli... we did it #ag4in!
  • 7. Speaking of Napoli... we did it #ag4in!
  • 8. A bit of context: Janus, WebRTC and SIP General purpose, open source WebRTC server • https://github.com/meetecho/janus-gateway • Demos and documentation: https://janus.conf.meetecho.com • Community: https://janus.discourse.group/
  • 9. An endpoint of behalf of WebRTC users • Janus SIP plugin acts as a collection of SIP endpoints • SIP stack implemented with Sofia-SIP • WebRTC users only see the Janus API (JSON), no SIP • No transcoding, media is only relayed • Built-in recording (separate media legs) • Experimental trunking support 1 1https://github.com/meetecho/janus-gateway/pull/3501
  • 10. An endpoint of behalf of WebRTC users • Janus SIP plugin acts as a collection of SIP endpoints • SIP stack implemented with Sofia-SIP • WebRTC users only see the Janus API (JSON), no SIP • No transcoding, media is only relayed • Built-in recording (separate media legs) • Experimental trunking support 1 • Simplifies life for web developers • No need to worry about a SIP stack (only SIP URIs) • Basic methods/events to handle dialogs (call, answer, hangup, message, etc.) • Allows SIP headers injection/interception in many requests • Support for more advanced features too (e.g., hold, transfer, etc.) 1https://github.com/meetecho/janus-gateway/pull/3501
  • 11. An endpoint of behalf of WebRTC users • Janus SIP plugin acts as a collection of SIP endpoints • SIP stack implemented with Sofia-SIP • WebRTC users only see the Janus API (JSON), no SIP • No transcoding, media is only relayed • Built-in recording (separate media legs) • Experimental trunking support 1 • Simplifies life for web developers • No need to worry about a SIP stack (only SIP URIs) • Basic methods/events to handle dialogs (call, answer, hangup, message, etc.) • Allows SIP headers injection/interception in many requests • Support for more advanced features too (e.g., hold, transfer, etc.) • NoSIP plugin is there when you only need a media gateway • You handle SIP, Janus deals with the media (e.g., in OpenSIPS) 1https://github.com/meetecho/janus-gateway/pull/3501
  • 12. SIP plugin in Janus https://janus.conf.meetecho.com/docs/sip
  • 13. NoSIP plugin in Janus (media gw only) https://janus.conf.meetecho.com/docs/nosip
  • 14. A known limitation, though... • In the past, PeerConnections in Janus had a well-known “limitation” • Only one stream and m-line per media type allowed • PeerConnections limited to 1 audio + 1 video + 1 data channel
  • 15. A known limitation, though... • In the past, PeerConnections in Janus had a well-known “limitation” • Only one stream and m-line per media type allowed • PeerConnections limited to 1 audio + 1 video + 1 data channel • Limitation removed in Janus 1.x (multistream refactoring)... • Support for multiple streams of the same type in the same PeerConnection • Functionality added to EchoTest, Streaming and VideoRoom plugins
  • 16. A known limitation, though... • In the past, PeerConnections in Janus had a well-known “limitation” • Only one stream and m-line per media type allowed • PeerConnections limited to 1 audio + 1 video + 1 data channel • Limitation removed in Janus 1.x (multistream refactoring)... • Support for multiple streams of the same type in the same PeerConnection • Functionality added to EchoTest, Streaming and VideoRoom plugins • ... but SIP and NoSIP plugins still stuck with it! • Core supported multiple streams per call, those plugins didn’t • “Lazy” rationale: most calls don’t need multiple audio/video streams anyway • Made adding support for new media harder, though (e.g., data channels)
  • 19. Bringing multistream to SIP/NoSIP • Media stack in SIP and NoSIP plugins mostly the same • Struct with hardcoded audio/video details in user object • Sockets, ports, payload types, etc. • Helper functions hardcoded to deal with audio/video too
  • 20. Bringing multistream to SIP/NoSIP • Media stack in SIP and NoSIP plugins mostly the same • Struct with hardcoded audio/video details in user object • Sockets, ports, payload types, etc. • Helper functions hardcoded to deal with audio/video too • Changed struct to array of generic “media” lines • Property defines type of media (audio, video, data) • Everything else is generic and shared
  • 21. Bringing multistream to SIP/NoSIP • Media stack in SIP and NoSIP plugins mostly the same • Struct with hardcoded audio/video details in user object • Sockets, ports, payload types, etc. • Helper functions hardcoded to deal with audio/video too • Changed struct to array of generic “media” lines • Property defines type of media (audio, video, data) • Everything else is generic and shared • Had to deal with a few challenges • File descriptors moved to hash tables (demultiplexing) • Optional SDES-SRTP setup had to be made more flexible too • Aligning media differences in SIP and NoSIP stacks wasn’t always easy
  • 22. Argh, Sofia SIP, not you too! • Bumped into a bit of a head scratcher in the SIP plugin • SDP in the NoSIP plugin handled by Janus entirely • SDP in the SIP plugin goes through Sofia SIP (NUA)
  • 23. Argh, Sofia SIP, not you too! • Bumped into a bit of a head scratcher in the SIP plugin • SDP in the NoSIP plugin handled by Janus entirely • SDP in the SIP plugin goes through Sofia SIP (NUA) • By default, though, Sofia uses SOA to deal with SDP • SOA = SDP Offer/Answer Engine • Implements filtering of SDP as part of offer/answer
  • 24. Argh, Sofia SIP, not you too! • Bumped into a bit of a head scratcher in the SIP plugin • SDP in the NoSIP plugin handled by Janus entirely • SDP in the SIP plugin goes through Sofia SIP (NUA) • By default, though, Sofia uses SOA to deal with SDP • SOA = SDP Offer/Answer Engine • Implements filtering of SDP as part of offer/answer • Normally not an issue, but it breaks with multistream • Second m-line of the same type always rejected (port=0) • Possibly SOA was never coded to deal with multiple audio/video streams?
  • 25. Argh, Sofia SIP, not you too! • Bumped into a bit of a head scratcher in the SIP plugin • SDP in the NoSIP plugin handled by Janus entirely • SDP in the SIP plugin goes through Sofia SIP (NUA) • By default, though, Sofia uses SOA to deal with SDP • SOA = SDP Offer/Answer Engine • Implements filtering of SDP as part of offer/answer • Normally not an issue, but it breaks with multistream • Second m-line of the same type always rejected (port=0) • Possibly SOA was never coded to deal with multiple audio/video streams? • Solution: simply disable SOA entirely, and deal with SDP in Janus • NUTAG_MEDIA_ENABLE(0) • SIPTAG_CONTENT_TYPE_STR(s) + SIPTAG_PAYLOAD_STR(s)
  • 28. (about the finger, no, I don’t know why!)
  • 29. What about generic data? • Topic of my presentation last year in Valencia • “WebRTC-to-SIP and back – It’s not all about audio and video!”
  • 30. What about generic data? • Topic of my presentation last year in Valencia • “WebRTC-to-SIP and back – It’s not all about audio and video!” • Non audio/video media could be gateway-ed through data channels • e.g., Real-Time Text (T.140), MSRP, BFCP, ... • All could be exchanged via data channels on the WebRTC side • Before, we needed new hardcoded details for that (audio/video/XYZ)
  • 31. What about generic data? • Topic of my presentation last year in Valencia • “WebRTC-to-SIP and back – It’s not all about audio and video!” • Non audio/video media could be gateway-ed through data channels • e.g., Real-Time Text (T.140), MSRP, BFCP, ... • All could be exchanged via data channels on the WebRTC side • Before, we needed new hardcoded details for that (audio/video/XYZ) • Multistream support helps, but there are challenges • Main one would be SDP asymmetry, if more protocols are used • N m-lines on the SIP side, only one for WebRTC (data channels)
  • 32. What about generic data? • Topic of my presentation last year in Valencia • “WebRTC-to-SIP and back – It’s not all about audio and video!” • Non audio/video media could be gateway-ed through data channels • e.g., Real-Time Text (T.140), MSRP, BFCP, ... • All could be exchanged via data channels on the WebRTC side • Before, we needed new hardcoded details for that (audio/video/XYZ) • Multistream support helps, but there are challenges • Main one would be SDP asymmetry, if more protocols are used • N m-lines on the SIP side, only one for WebRTC (data channels) • Mapping of m-lines would need to be taken care of accordingly • Especially important for renegotiations and RTP bridging
  • 33. Next steps • Merge this! • Currently marked as a draft PR, since it’s experimental • Waiting for testing/feedback from the community
  • 34. Next steps • Merge this! • Currently marked as a draft PR, since it’s experimental • Waiting for testing/feedback from the community • Will this actually be needed? • How many use cases are there for multiple A/V streams in SIP? • Could this be useful in OpenSIPS’s integration of NoSIP?
  • 35. Next steps • Merge this! • Currently marked as a draft PR, since it’s experimental • Waiting for testing/feedback from the community • Will this actually be needed? • How many use cases are there for multiple A/V streams in SIP? • Could this be useful in OpenSIPS’s integration of NoSIP? • We need a plan for data channels too • See my talk @ OpenSIPS Summit 2024 in Valencia • Porting the existing Real-Time Text (T.140) PR could be a good start
  • 36. Next steps • Merge this! • Currently marked as a draft PR, since it’s experimental • Waiting for testing/feedback from the community • Will this actually be needed? • How many use cases are there for multiple A/V streams in SIP? • Could this be useful in OpenSIPS’s integration of NoSIP? • We need a plan for data channels too • See my talk @ OpenSIPS Summit 2024 in Valencia • Porting the existing Real-Time Text (T.140) PR could be a good start • What about RTP Over QUIC (RoQ)? • Will there be a future for SIP Over QUIC too?
  • 37. Thanks! Questions? Comments? Contacts • https://fosstodon.org/@lminiero • https://bsky.app/profile/lminiero.it • https://www.threads.net/@lminier0 • https://www.meetecho.com/blog/ • https://lminiero.it