2017-03-09 78 views
1

根據此announcement: 「截至最新的Chrome Canary版本,默認的RTCP複用策略是」require「,而不是」協商「,這將影響Chrome的下一個版本M57。sipML5 - Negotiate rtcpMuxPolicy

我使用sipml5 API進行webrtc調用(後端是Asterisk)。當我嘗試通過webrtc擴展進行調用時,我在Chrome控制檯中出現了此錯誤,並且沒有音頻。

onSetRemoteDescriptionError 

DOMException: Failed to set remote answer sdp: Session error code: ERROR_CONTENT. 
Session error description: rtcpMuxPolicy is 'require', but media description does not contain 'a=rtcp-mux'.. 

那麼如何設置rtcpMuxPolicy在sipml5中「協商」?

  • 我的Chrome版本:58.0.3026.3 DEV(64位)
  • SIPML5 API版本:2.0.3
  • Asterisk的版本:13.11.0

回答

0

挖在很長一段時間後,從星號論壇網上我發現了以下幾點,

報價:https://issues.asterisk.org/jira/browse/ASTERISK-26732

Chrome 57 has a breaking change when it comes to interop with WebRTC gateways. They've changed their previous "negotiate", to "require" when it comes to rtcp-mux. Asterisk, as I understand it does not have rtcp multiplexing and so will break when it comes to compatibility with WebRTC across all versions of Asterisk that supports WebRTC.

參考rtcpMuxPolicy鉻:https://www.chromestatus.com/feature/5654810086866944

The rtcpMuxPolicy is used by the application to specify its preferred policy regarding use of RTP/RTCP multiplexing. When the policy is "negotiate", the ICE candidates for both RTP and RTCP will be gathered. If the remote-endpoint is capable of multiplexing RTCP, multiplex RTCP on the RTP candidates. If it is not, use both the RTP and RTCP candidates separately.

根據谷歌的小組論壇 - https://groups.google.com/forum/#!topic/discuss-webrtc/eM57DEy89MY

As of the most recent Chrome Canary build, the default RTCP multiplexing policy is "require", instead of "negotiate". This will affect the next Chrome release, M57. This means that offer/answer negotiation with an endpoint that doesn't support RTCP multiplexing will fail, resulting in the error: "ERROR_CONTENT. Session error description: Failed to setup RTCP mux filter." We can probably make this error more descriptive, but the bottom line is that setRemoteDescription will fail if the SDP does not contain "a=rtcp-mux". For any application that doesn't yet support RTCP multiplexing, you can get the old behavior by explicitly setting the RTCRtpMuxPolicy to "negotiate" in the RTCConfiguration. For example: pc = new RTCPeerConnection({rtcpMuxPolicy: "negotiate"})

總之,

  • 在Chrome RTCP的早期版本multiplxing設爲'協商'
  • S從版本57鉻開始改變rtcp multiplxing爲'require'
  • Asterisk,據我瞭解,它不支持rtcp多路複用。
  • webrtc允許RTCRtpMuxPolicy標誌選項「協商」和「要求」
  • 在Sipml5 API 2.0.3中,據我所知,沒有設置RTCRtpMuxPolicy的選項。

解決方案: 我將sipml5 API從2.0.3更新到2.1.3。現在錯誤改爲警告。

[Deprecation] The rtcpMuxPolicy option is being considered for removal and may be removed no earlier than M60, around August 2017. If you depend on it, please see https://www.chromestatus.com/features/5654810086866944 for more details. 

現在一切工作正常。

相關問題