JsSIP Firefox - InvalidSessionDescriptionError:当商品没有设置发送时,答案试图设置recv

时间:2016-02-03 00:34:38

标签: webrtc jssip

我最近和JsSIP合作。我们尝试将会议与单向(传入)音频流连接起来,但是对于Firefox不起作用。

Firefox错误消息:

  

InvalidSessionDescriptionError:当商品没有设置发送时,答案试图设置recv

所以我们的JsSIP配置是:

mediaConstraints: {'audio': false, 'video': false},
rtcOfferConstraints: {
    offerToReceiveAudio: true,
    offerToReceiveVideo: false
},
sessionTimersExpires: 120,
pcConfig: {
    iceServers: [{'url': 'stun:stun.services.mozilla.com'}, {'url': 'stun:stun.l.google.com:19302'}]
}

以下是优惠机构

v=0
o=mozilla...THIS_IS_SDPARTA-39.0 1234582256825317267 0 IN IP4 0.0.0.0
s=-
t=0 0
a=sendrecv
a=fingerprint:sha-256 78:FF:54:2C:9A:B0:DC:2B:FC:31:83:89:17:AA:33:AF:FC:EC:C5:9E:0C:8B:E4:AA:23:47:15:09:71:DD:4D:A0
a=group:BUNDLE sdparta_0
a=ice-options:trickle
a=msid-semantic:WMS *
m=audio 44686 RTP/SAVPF 109 9 0 8
c=IN IP4 x.x.x.x
a=candidate:0 1 UDP 2122252543 x.x.x.x 44686 typ host
a=candidate:0 2 UDP 2122252542 x.x.x.x 52130 typ host
a=candidate:2 1 UDP 1686110207 x.x.x.x 44686 typ srflx raddr x.x.x.x rport 44686
a=candidate:2 2 UDP 1686110206 x.x.x.x 52130 typ srflx raddr x.x.x.x rport 52130
a=recvonly
a=end-of-candidates
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=ice-pwd:06bf8e8ece7e22f262546b874e13010e
a=ice-ufrag:d0d3aae0
a=mid:sdparta_0
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=setup:actpass

以下是答案正文:

v=0
o=matrix 1454436711 1454436712 IN IP4 x.x.x.x
s=matrix
c=IN IP4 x.x.x.x
t=0 0
a=msid-semantic: WMS PrZnRR78adkqAdzI3cJ4tKDYF1CojinZ
m=audio 22178 RTP/SAVPF 0
a=rtpmap:0 PCMU/8000
a=ptime:20
a=fingerprint:sha-256 56:34:DC:1D:D5:94:2B:F5:F0:BA:13:45:FD:A7:54:78:A0:BF:D0:BB:45:DD:FC:E9:D0:33:0B:88:12:DC:84:30
a=rtcp-mux
a=rtcp:22178 IN IP4 x.x.x.x
a=ssrc:4206958201 cname:zddhVagVdrcDuBco
a=ssrc:4206958201 msid:PrZnRR78adkqAdzI3cJ4tKDYF1CojinZ a0
a=ssrc:4206958201 mslabel:PrZnRR78adkqAdzI3cJ4tKDYF1CojinZ
a=ssrc:4206958201 label:PrZnRR78adkqAdzI3cJ4tKDYF1CojinZa0
a=ice-ufrag:DMiXmMLSDe7NmkDM
a=ice-pwd:nGT8GZUKgWdBogPSSXG5AiO4
a=candidate:9067675717 1 udp 659136 x.x.x.x 22178 typ host generation 0

P.S。在Chrome上,此配置效果很好

1 个答案:

答案 0 :(得分:0)

解决方案: a = recvonly的有效答案是a = sendonly和a = inactive。

RFC 3264:“如果媒体流是    在报价中列为recvonly,答案必须标记为    在答案中发送或不活动。 “