从浏览器到Android的WebRTC调用

时间:2019-08-19 14:11:25

标签: android webrtc

我在将WebRTC呼叫从浏览器连接到Android Native App时遇到问题。只是为了澄清一下,当我们从Android拨号到Web浏览器时,它可以正常工作并且呼叫已连接。

以下是从浏览器拨号时的SDK浏览器

  

v = 0

     

o = mozilla ... THIS_IS_SDPARTA-67.0.2 3998696948364254257 0 IN IP4   0.0.0.0

     

s =-

     

t = 0 0

     

a = sendrecv

     

a =指纹:sha-256   DB:52:AF:5F:F1:55:DC:C6:AF:AA:2D:4F:83:BC:78:58:EE:DA:81:E2:BA:81:34:C1:B9: 14:5B:D8:B0:40:07:5D

     

a = group:BUNDLE 0 1

     

a = ice-options:trickle

     

a = msid-semantic:WMS *

     

m =音频57545 UDP / TLS / RTP / SAVPF 109 9 0 8 101

     

c = IN IP4 176.9.75.12

     

a =候选:0 1 UDP 2122252543 192.168.1.101 63270典型主机

     

a =候选:11 1 TCP 2105524479 192.168.1.101 9 typ host tcptype   活跃

     

a =候选:0 2 UDP 2122252542 192.168.1.101 51377典型主机

     

a =候选:11 2 TCP 2105524478 192.168.1.101 9 typ host tcptype   活跃

     

a =候选:1 1 UDP 1686052863 110.38.9.108 63270 typ srflx raddr   192.168.1.101端口63270

     

a =候选:2 1 UDP 92217343 176.9.75.12 57545典型继电器raddr   176.9.75.12端口57545

     

a =候选:1 2 UDP 1686052862 110.38.9.108 51377 typ srflx raddr   192.168.1.101端口51377

     

a =候选:2 2 UDP 92217342 5.9.205.188 59742典型继电器raddr   5.9.205.188端口59742

     

a = sendrecv

     

a =候选人名单

     

a = extmap:1 urn:ietf:params:rtp-hdrext:ssrc音频级别

     

a = extmap:2 / recvonly缸:ietf:params:rtp-hdrext:csrc音频级别

     

a = extmap:3缸:ietf:params:rtp-hdrext:sdes:mid

     

a = fmtp:109 maxplaybackrate = 48000; stereo = 1; useinbandfec = 1

     

a = fmtp:101 0-15

     

a = ice-pwd:ad76ac59889d2dbfc17c7197a5bf7fbc

     

a = ice-ufrag:4a27971e

     

a = mid:0

     

a = msid:{403cebe3-98f3-804c-8711-63078fdeecd1}   {58497120-df50-c04f-929b-d0d3f2311ee6}

     

a = rtcp:59742输入IP4 5.9.205.188

     

a = rtcp-mux

     

a = rtpmap:109 opus / 48000/2

     

a = rtpmap:9 G722 / 8000/1

     

a = rtpmap:0 PCMU / 8000

     

a = rtpmap:8 PCMA / 8000

     

a = rtpmap:101电话事件/ 8000

     

a = setup:actpass

     

a = ssrc:430883687 cname:{dc7d4aa2-5678-c745-ab1b-16660383829b}

     

m =视频52189 UDP / TLS / RTP / SAVPF 12012112697

     

c = IN IP4 176.9.75.12

     

a =候选:0 1 UDP 2122252543 192.168.1.101 52775典型主机

     

a =候选:11 1 TCP 2105524479 192.168.1.101 9 typ host tcptype   活跃

     

a =候选:0 2 UDP 2122252542 192.168.1.101 62134典型主机

     

a =候选:11 2 TCP 2105524478 192.168.1.101 9 typ host tcptype   活跃

     

a =候选:1 1 UDP 1686052863 110.38.9.108 52775 typ srflx raddr   192.168.1.101端口52775

     

a =候选:2 1 UDP 92217343 176.9.75.12 52189典型继电器raddr   176.9.75.12端口52189

     

a =候选:1 2 UDP 1686052862 110.38.9.108 62134 typ srflx raddr   192.168.1.101端口62134

     

a =候选:2 2 UDP 92217342 5.9.205.188 60881典型继电器raddr   5.9.205.188端口60881

     

a = sendrecv

     

a =候选人名单

     

a = extmap:3缸:ietf:params:rtp-hdrext:sdes:mid

     

a = extmap:4 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time

     

a = extmap:5缸:ietf:params:rtp-hdrext:toffset

     

a = fmtp:126   profile-level-id = 42e01f; level-asymmetry-allowed = 1; packetization-mode = 1

     

a = fmtp:97 profile-level-id = 42e01f; level-asymmetry-allowed = 1

     

a = fmtp:120 max-fs = 12288; max-fr = 60

     

a = fmtp:121 max-fs = 12288; max-fr = 60

     

a = ice-pwd:ad76ac59889d2dbfc17c7197a5bf7fbc

     

a = ice-ufrag:4a27971e

     

a = mid:1

     

a = msid:{403cebe3-98f3-804c-8711-63078fdeecd1}   {ec535e56-859b-0040-af22-dfc9a46de640}

     

a = rtcp:60881 IN IP4 5.9.205.188

     

a = rtcp-fb:120小问题

     

a = rtcp-fb:120 nack pli

     

a = rtcp-fb:120 ccm fir

     

a = rtcp-fb:120 goog-remb

     

a = rtcp-fb:121小问题

     

a = rtcp-fb:121 nack pli

     

a = rtcp-fb:121 ccm fir

     

a = rtcp-fb:121 goog-remb

     

a = rtcp-fb:126小问题

     

a = rtcp-fb:126 nack pli

     

a = rtcp-fb:126 ccm fir

     

a = rtcp-fb:126 goog-remb

     

a = rtcp-fb:97小问题

     

a = rtcp-fb:97 nack pli

     

a = rtcp-fb:97 ccm fir

     

a = rtcp-fb:97 goog-remb

     

a = rtcp-mux

     

a = rtpmap:120 VP8 / 90000

     

a = rtpmap:121 VP9 / 90000

     

a = rtpmap:126 H264 / 90000

     

a = rtpmap:97 H264 / 90000

     

a = setup:actpass

     

a = ssrc:2007361327 cname:{dc7d4aa2-5678-c745-ab1b-16660383829b}

以下是接受呼叫时来自Android的SDP

  

v = 0

     

o =-7552000228569576067 2 IN IP4 127.0.0.1

     

s =-

     

t = 0 0

     

a = group:BUNDLE 0 1

     

a = msid语义:WMS ARDAMS

     

m =音频9 UDP / TLS / RTP / SAVPF 109 9 0 8 101

     

c = IN IP4 0.0.0.0

     

a = rtcp:9 IN IP4 0.0.0.0

     

a =候选:0 1 UDP 2122252543 192.168.1.101 63270典型主机

     

a =候选:11 1 TCP 2105524479 192.168.1.101 9 typ host tcptype   活跃

     

a =候选:0 2 UDP 2122252542 192.168.1.101 51377典型主机

     

a =候选:11 2 TCP 2105524478 192.168.1.101 9 typ host tcptype   活跃

     

a =候选:1 1 UDP 1686052863 110.38.9.108 63270 typ srflx raddr   192.168.1.101端口63270

     

a =候选:2 1 UDP 92217343 176.9.75.12 57545典型继电器raddr   176.9.75.12端口57545

     

a =候选:1 2 UDP 1686052862 110.38.9.108 51377 typ srflx raddr   192.168.1.101端口51377

     

a =候选:2 2 UDP 92217342 5.9.205.188 59742典型继电器raddr   5.9.205.188端口59742

     

a = ice-ufrag:Pmla

     

a = ice-pwd:CAEYOQZF7 + JSa / YT4tDXWqFv

     

a = ice-options:滴流重命名

     

a =指纹:sha-256   58:DB:E8:47:30:8D:FD:04:3B:C0:6A:E1:68:6A:31:C2:C4:00:4A:51:74:6B:24:9C:13: E1:3F:BB:B0:AB:14:7B

     

a = setup:active

     

a = mid:0

     

a = extmap:1 urn:ietf:params:rtp-hdrext:ssrc音频级别

     

a = sendrecv

     

a = rtcp-mux

     

a = rtpmap:109 opus / 48000/2

     

a = fmtp:109 minptime = 10; useinbandfec = 1

     

a = rtpmap:9 G722 / 8000

     

a = rtpmap:0 PCMU / 8000

     

a = rtpmap:8 PCMA / 8000

     

a = rtpmap:101电话事件/ 8000

     

a = ssrc:1539343785 cname:bTZH1y7Pwq / SmE4A

     

a = ssrc:1539343785 msid:ARDAMS ARDAMSa0

     

a = ssrc:1539343785 mslabel:ARDAMS

     

a = ssrc:1539343785标签:ARDAMSa0

     

m =视频9 UDP / TLS / RTP / SAVPF 126120121

     

c = IN IP4 0.0.0.0

     

a = rtcp:9 IN IP4 0.0.0.0

     

a =候选:0 1 UDP 2122252543 192.168.1.101 52775典型主机

     

a =候选:11 1 TCP 2105524479 192.168.1.101 9 typ host tcptype   活跃

     

a =候选:0 2 UDP 2122252542 192.168.1.101 62134典型主机

     

a =候选:11 2 TCP 2105524478 192.168.1.101 9 typ host tcptype   活跃

     

a =候选:1 1 UDP 1686052863 110.38.9.108 52775 typ srflx raddr   192.168.1.101端口52775

     

a =候选:2 1 UDP 92217343 176.9.75.12 52189典型继电器raddr   176.9.75.12端口52189

     

a =候选:1 2 UDP 1686052862 110.38.9.108 62134 typ srflx raddr   192.168.1.101端口62134

     

a =候选:2 2 UDP 92217342 5.9.205.188 60881典型继电器raddr   5.9.205.188端口60881

     

a = ice-ufrag:Pmla

     

a = ice-pwd:CAEYOQZF7 + JSa / YT4tDXWqFv

     

a = ice-options:滴流重命名

     

a =指纹:sha-256   58:DB:E8:47:30:8D:FD:04:3B:C0:6A:E1:68:6A:31:C2:C4:00:4A:51:74:6B:24:9C:13: E1:3F:BB:B0:AB:14:7B

     

a = setup:active

     

a = mid:1

     

a = extmap:5缸:ietf:params:rtp-hdrext:toffset

     

a = extmap:4 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time

     

a = sendrecv

     

a = rtcp-mux

     

a = rtpmap:126 H264 / 90000

     

a = rtcp-fb:126 goog-remb

     

a = rtcp-fb:126 ccm fir

     

a = rtcp-fb:126小问题

     

a = rtcp-fb:126 nack pli

     

a = fmtp:126   允许级别不对称= 1;打包模式= 1;配置文件级别ID = 42e01f

     

a = rtpmap:120 VP8 / 90000

     

a = rtcp-fb:120 goog-remb

     

a = rtcp-fb:120 ccm fir

     

a = rtcp-fb:120小问题

     

a = rtcp-fb:120 nack pli

     

a = rtpmap:121 VP9 / 90000

     

a = rtcp-fb:121 goog-remb

     

a = rtcp-fb:121 ccm fir

     

a = rtcp-fb:121小问题

     

a = rtcp-fb:121 nack pli

     

a = ssrc:1992667211 cname:bTZH1y7Pwq / SmE4A

     

a = ssrc:1992667211 msid:ARDAMS ARDAMSv0

     

a = ssrc:1992667211 mslabel:ARDAMS

     

a = ssrc:1992667211标签:ARDAMSv0

1 个答案:

答案 0 :(得分:0)

我的直觉(根据经验)是告诉您拨打和接听电话的工作流程不同。确保在拨打电话时要创建要约,在接听电话时要创建接听。确保将SDP正确设置为本地或远程。

除此之外...

您得到任何错误吗?

您的对等连接是否进入连接或已连接状态?

您收到onAddStream回调吗?