5

I'm trying to add video track to stream and then call renegotiate() from JsSip. However, when I'm doing it from caller it works fine, but when I'm doing it from callee it's not working (session terminating). I looked into the Freeswitch logs and found next lines:

2017-05-25 07:41:02.177674 [NOTICE] switch_rtp.c:4591 Activating RTP video ICE: 1Xn5:7JJhZkbbu6MxTEpr 95.29.39.101:55140
2017-05-25 07:41:02.177674 [INFO] switch_core_media.c:3675 Activating video RTCP PORT 55140
2017-05-25 07:41:02.177674 [INFO] switch_core_media.c:3684 Skipping video RTCP ICE (Same as RTP)
2017-05-25 07:41:02.177674 [INFO] switch_core_media.c:6717 RE-SETTING video DTLS
2017-05-25 07:41:02.177674 [INFO] switch_rtp.c:3574 Activate RTP/RTCP video DTLS client
2017-05-25 07:41:02.177674 [INFO] switch_rtp.c:3723 Changing video DTLS state from OFF to HANDSHAKE
2017-05-25 07:41:02.187678 [WARNING] switch_rtp.c:970 sofia/internal/nn9s29br@2cjo9eh03237.invalid got audio stun binding response 487 Role Conflict
2017-05-25 07:41:02.187678 [WARNING] switch_rtp.c:982 audio STUN Changing role to CONTROLLED
2017-05-25 07:41:02.237684 [WARNING] switch_rtp.c:970 sofia/internal/nn9s29br@2cjo9eh03237.invalid got audio stun binding response 487 Role Conflict
2017-05-25 07:41:02.237684 [WARNING] switch_rtp.c:979 audio STUN Changing role to CONTROLLING
2017-05-25 07:41:02.257682 [NOTICE] sofia.c:1012 Hangup sofia/internal/nn9s29br@2cjo9eh03237.invalid [CS_EXCHANGE_MEDIA] [NORMAL_CLEARING]
2017-05-25 07:41:02.297671 [NOTICE] switch_ivr_bridge.c:1751 Hangup sofia/internal/1001@default [CS_EXECUTE] [NORMAL_CLEARING]
2017-05-25 07:41:02.297671 [NOTICE] switch_core_session.c:1682 Session 2 (sofia/internal/nn9s29br@2cjo9eh03237.invalid) Ended
2017-05-25 07:41:02.297671 [NOTICE] switch_core_session.c:1686 Close Channel sofia/internal/nn9s29br@2cjo9eh03237.invalid [CS_DESTROY]
2017-05-25 07:41:02.307657 [NOTICE] switch_core_session.c:1682 Session 1 (sofia/internal/1001@default) Ended
2017-05-25 07:41:02.307657 [NOTICE] switch_core_session.c:1686 Close Channel sofia/internal/1001@default [CS_DESTROY]
2017-05-25 07:46:09.617693 [NOTICE] switch_channel.c:1104 New Channel sofia/internal/trunk@xxx.xxx.xxx.xxx [804db9ee-6307-42fe-ad82-4d0d7684e6d2]

Maybe there is some config issues...

UPDATE

Reinvite offer SDP below:

type: offer, sdp: v=0
o=- 5417896742972440455 3 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE audio video
a=msid-semantic: WMS NEWUOS8D1IPpEVh9SKJSeHBtDJGuxHN0Km4Q
m=audio 58796 UDP/TLS/RTP/SAVPF 102 9 0 8 103 101 127 104 106 105 13         112 113
c=IN IP4 93.81.4.243
a=rtcp:9 IN IP4 0.0.0.0
a=candidate:2131708102 1 udp 2113937151 192.168.0.100 58796 typ host generation 0 network-cost 50
a=candidate:842163049 1 udp 1677729535 93.81.4.243 58796 typ srflx raddr 192.168.0.100 rport 58796 generation 0 network-cost 50
a=ice-ufrag:eXlC
a=ice-pwd:AyYvLjMPpRjD9MAFCKBB3j4e
a=fingerprint:sha-256 BE:B5:DF:63:F6:DC:D4:35:5A:E1:D0:02:18:AF:C7:4F:FD:70:CC:11:50:92:45:E8:0F:B6:09:72:52:5B:C4:DB
a=setup:actpass
a=mid:audio
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=sendrecv
a=rtcp-mux
a=rtpmap:102 opus/48000/2
a=fmtp:102 minptime=10;useinbandfec=1
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:103 telephone-event/48000
a=rtpmap:101 telephone-event/8000
a=rtpmap:127 ISAC/16000
a=rtpmap:104 ISAC/32000
a=rtpmap:106 CN/32000
a=rtpmap:105 CN/16000
a=rtpmap:13 CN/8000
a=rtpmap:112 telephone-event/32000
a=rtpmap:113 telephone-event/16000
a=ssrc:1711904775 cname:hP+1FLed7h34pNAH
a=ssrc:1711904775 msid:NEWUOS8D1IPpEVh9SKJSeHBtDJGuxHN0Km4Q 3f7852cd-9068-4392-a734-c94d1c631818
a=ssrc:1711904775 mslabel:NEWUOS8D1IPpEVh9SKJSeHBtDJGuxHN0Km4Q
a=ssrc:1711904775 label:3f7852cd-9068-4392-a734-c94d1c631818
m=video 51998 UDP/TLS/RTP/SAVPF 96 98 100 126 125 97 99 124 123
c=IN IP4 93.81.4.243
a=rtcp:9 IN IP4 0.0.0.0
a=candidate:2131708102 1 udp 2113937151 192.168.0.100 51998 typ host generation 0 network-cost 50
a=candidate:842163049 1 udp 1677729535 93.81.4.243 51998 typ srflx raddr 192.168.0.100 rport 51998 generation 0 network-cost 50
a=ice-ufrag:eXlC
a=ice-pwd:AyYvLjMPpRjD9MAFCKBB3j4e
a=fingerprint:sha-256 BE:B5:DF:63:F6:DC:D4:35:5A:E1:D0:02:18:AF:C7:4F:FD:70:CC:11:50:92:45:E8:0F:B6:09:72:52:5B:C4:DB
a=setup:actpass
a=mid:video
a=extmap:2 urn:ietf:params:rtp-hdrext:toffset
a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:4 urn:3gpp:video-orientation
a=extmap:5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay
a=recvonly
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:96 VP8/90000
a=rtcp-fb:96 ccm fir
a=rtcp-fb:96 nack
a=rtcp-fb:96 nack pli
a=rtpmap:98 VP9/90000
a=rtcp-fb:98 ccm fir
a=rtcp-fb:98 nack
a=rtcp-fb:98 nack pli
a=rtcp-fb:98 goog-remb
a=rtcp-fb:98 transport-cc
a=rtpmap:100 H264/90000
a=rtcp-fb:100 ccm fir
a=rtcp-fb:100 nack
a=rtcp-fb:100 nack pli
a=rtcp-fb:100 goog-remb
a=rtcp-fb:100 transport-cc
a=fmtp:100 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f
a=rtpmap:126 red/90000
a=rtpmap:125 ulpfec/90000
a=rtpmap:97 rtx/90000
a=fmtp:97 apt=96
a=rtpmap:99 rtx/90000
a=fmtp:99 apt=98
a=rtpmap:124 rtx/90000
a=fmtp:124 apt=100
a=rtpmap:123 rtx/90000
a=fmtp:123 apt=126

Reinvite answer SDP:

type: answer, sdp: v=0
o=FreeSWITCH 1495981785 1495981786 IN IP4 xxx.xxx.xxx.xxx
s=FreeSWITCH
c=IN IP4 xxx.xxx.xxx.xxx
t=0 0
a=msid-semantic: WMS IoFoWVXMBVpdoXbZZ1FM0X9KjiJsXLhw
m=audio 17400 RTP/SAVPF 102 9 0 8 103 101
a=rtpmap:102 opus/48000/2
a=fmtp:102 useinbandfec=1; maxaveragebitrate=30000;         maxplaybackrate=48000; ptime=20; minptime=10; maxptime=40; stereo=1
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:103 telephone-event/48000
a=rtpmap:101 telephone-event/8000
a=fingerprint:sha-256 D2:20:E1:7A:E0:0B:63:34:03:A3:2D:77:E7:7D:AF:F8:9C:47:D4:22:21:7C:74:C2:14:D1:27:5F:C2:0F:EF:B8
a=setup:passive
a=rtcp-mux
a=rtcp:17400 IN IP4 xxx.xxx.xxx.xxx
a=ssrc:87870097 cname:0NKMyypZjE2ys3oh
a=ssrc:87870097 msid:IoFoWVXMBVpdoXbZZ1FM0X9KjiJsXLhw a0
a=ssrc:87870097 mslabel:IoFoWVXMBVpdoXbZZ1FM0X9KjiJsXLhw
a=ssrc:87870097 label:IoFoWVXMBVpdoXbZZ1FM0X9KjiJsXLhwa0
a=ice-ufrag:VTULHUmQ2V8Pxfbn
a=ice-pwd:SL0haf6kKZI3SWbEGVfdFrTx
a=candidate:6665814401 1 udp 659136 xxx.xxx.xxx.xxx 17400 typ host generation     0
a=candidate:6665814401 2 udp 659136 xxx.xxx.xxx.xxx 17400 typ host generation 0
a=ptime:20
m=video 17728 RTP/SAVPF 96
b=AS:1024
a=rtpmap:96 VP8/90000
a=fingerprint:sha-256 D2:20:E1:7A:E0:0B:63:34:03:A3:2D:77:E7:7D:AF:F8:9C:47:D4:22:21:7C:74:C2:14:D1:27:5F:C2:0F:EF:B8
a=setup:passive
a=rtcp-mux
a=rtcp:17728 IN IP4 xxx.xxx.xxx.xxx
a=rtcp-fb:96 ccm fir
a=rtcp-fb:96 ccm tmmbr
a=rtcp-fb:96 nack
a=rtcp-fb:96 nack pli
a=ssrc:3634858696 cname:0NKMyypZjE2ys3oh
a=ssrc:3634858696 msid:IoFoWVXMBVpdoXbZZ1FM0X9KjiJsXLhw v0
a=ssrc:3634858696 mslabel:IoFoWVXMBVpdoXbZZ1FM0X9KjiJsXLhw
a=ssrc:3634858696 label:IoFoWVXMBVpdoXbZZ1FM0X9KjiJsXLhwv0
a=ice-ufrag:o27C1oHNw8FNmf8s
a=ice-pwd:JFs75HK4WB90HqLVjIoaXVNk
a=candidate:7203188173 1 udp 659136 xxx.xxx.xxx.xxx 17728 typ host generation 0
a=candidate:7203188173 2 udp 659135 xxx.xxx.xxx.xxx 17728 typ host generation 0
a=end-of-candidates

UPDATE 2

It seems working with this FS branch: FS-10089-combining-inherit_codec-and-ice. I've tested it with JsSip and 'UPDATE' method to renegotiate SDP.

morozRed
  • 176
  • 4
  • 14

0 Answers0