SIP 和 Webrtc 集成 iOS

SIP and Webrtc Integration iOS

我正在尝试 将 Webrtc 与 PJSIP 集成用于 iOS。逻辑是 SIP 系统分开工作,Webrtc 系统分开工作。我在任何情况下都不会混合使用。我在链接器尝试集成 PJSIP 的 SRTP 和 Webrtc 的 SRTP 时遇到了第一个问题。 PJSIP 的 SRTP 版本要旧得多,而 Webrtc 的 SRTP 是新版本。我在链接器中使用 force_load "LibPath" 强制加载。它解决了链接器错误。我能够 建立 Webrtc 连接,接收远程视频轨道,但我无法呈现远程流 。我得到以下日志。我主要怀疑是在需要 Webrtc 的 SRTP 时加载了 PJSIP 的 SRTP。是否可以用 Webrtc 的 SRTP 库覆盖?或者您还有其他建议吗?

没有 SIP,我能够在两个设备之间建立正确的连接和流式传输,并且它在不同的项目中工作,甚至 APPRTC 的演示也能工作。

2015-06-12 18:57:41.835 [1028:134693] -[WebrtcManager peerConnection:iceGatheringChanged:] [Line 529] ICE gathering state changed: 2
testing rand_source...passed
cipher: aes cipher block chaining (cbc) mode
  instance count: 0
  self-test: 2015-06-12 18:57:42.063 [1028:134693] -[WebrtcManager peerConnection:iceConnectionChanged:] [Line 524] ICE state changed: 2
passed
cipher: aes integer counter mode
  instance count: 0
  self-test: passed
cipher: null cipher
  instance count: 0
  self-test: passed
auth func: hmac sha-1 authentication function
  instance count: 0
  self-test: passed
auth func: null authentication function
  instance count: 0
  self-test: passed
debug modules loaded:
  srtp (off)
  hmac sha-1 (off)
  aes cbc (off)
  aes icm (off)
  alloc (off)
  stat test (off)
  cipher (off)
  auth func (off)
  crypto kernel (off)
testing rand_source...passed
cipher: aes cipher block chaining (cbc) mode
  instance count: 0
  self-test: passed
cipher: aes integer counter mode
  instance count: 0
  self-test: passed
cipher: null cipher
  instance count: 0
  self-test: passed
auth func: hmac sha-1 authentication function
  instance count: 0
  self-test: passed
auth func: null authentication function
  instance count: 0
  self-test: passed
debug modules loaded:
  srtp (off)
  hmac sha-1 (off)
  aes cbc (off)
  aes icm (off)
  alloc (off)
  stat test (off)
  cipher (off)
  auth func (off)
  crypto kernel (off)

将此 pod 文件 https://github.com/chebur/pjsip 用于 iOS 的 PJSIP。

我必须在 PJSIP srtp 库中添加命名空间以避免符号冲突。现在两者并存