diff --git a/daemon/call.c b/daemon/call.c index c0ebf368a..bca465af7 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -1620,7 +1620,7 @@ static void __ice_offer(const struct sdp_ng_flags *flags, struct call_media *thi } } - if (flags->opmode == OP_OFFER || flags->opmode == OP_REQUEST) { + if (flags->opmode == OP_OFFER) { switch (flags->ice_lite_option) { case ICE_LITE_OFF: MEDIA_CLEAR(this, ICE_LITE_SELF); @@ -1659,6 +1659,9 @@ static void __ice_offer(const struct sdp_ng_flags *flags, struct call_media *thi default: break; } + + if (flags->trickle_ice) + MEDIA_SET(this, TRICKLE_ICE); } /* determine roles (even if we don't actually do ICE) */ @@ -1669,13 +1672,13 @@ static void __ice_offer(const struct sdp_ng_flags *flags, struct call_media *thi else if (!MEDIA_ISSET(this, INITIALIZED) || ice_restart) { if (MEDIA_ISSET(this, ICE_LITE_SELF)) MEDIA_CLEAR(this, ICE_CONTROLLING); - else if (flags->opmode == OP_OFFER) + else if (flags->opmode == OP_OFFER || flags->opmode == OP_REQUEST) MEDIA_SET(this, ICE_CONTROLLING); else MEDIA_CLEAR(this, ICE_CONTROLLING); } - if (flags->opmode == OP_OFFER || flags->opmode == OP_ANSWER) { + if (flags->opmode == OP_OFFER) { /* roles are reversed for the other side */ if (MEDIA_ISSET(other, ICE_LITE_PEER) && !MEDIA_ISSET(other, ICE_LITE_SELF)) MEDIA_SET(other, ICE_CONTROLLING); diff --git a/t/auto-daemon-tests-pubsub.pl b/t/auto-daemon-tests-pubsub.pl index a883f59c1..db9f1162b 100755 --- a/t/auto-daemon-tests-pubsub.pl +++ b/t/auto-daemon-tests-pubsub.pl @@ -3147,7 +3147,7 @@ a=candidate:keutydghfbhdcfsb 1 UDP 2130706431 198.51.100.14 6028 typ host a=candidate:keutydghfbhdcfsb 2 UDP 2130706430 198.51.100.14 6029 typ host SDP -@ret1 = rcv($sock_c, -1, qr/^\x00\x01\x00.\x21\x12\xa4\x42(............)\x80\x22\x00.rtpengine.*?\x00\x06\x00\x11q2758e93:(........)\x00\x00\x00\x80\x29\x00\x08........\x00\x24\x00\x04\x6e\xff\xff\xff\x00\x08\x00\x14....................\x80\x28\x00\x04....$/s); +@ret1 = rcv($sock_c, -1, qr/^\x00\x01\x00.\x21\x12\xa4\x42(............)\x80\x22\x00.rtpengine.*?\x00\x06\x00\x11q2758e93:(........)\x00\x00\x00\x80\x2a\x00\x08........\x00\x24\x00\x04\x6e\xff\xff\xff\x00\x08\x00\x14....................\x80\x28\x00\x04....$/s); snd($sock_b, $port_a, rtp(0, 2001, 4160, 0x3456, "\x00" x 160)); rcv($sock_a, $port_b, rtpm(0, 2001, 4160, $ssrc_a, "\x00" x 160)); snd($sock_a, $port_b, rtp(0, 4001, 7160, 0x6543, "\x00" x 160)); diff --git a/t/auto-daemon-tests-redis.pl b/t/auto-daemon-tests-redis.pl index 74fae853e..2f763fe55 100755 --- a/t/auto-daemon-tests-redis.pl +++ b/t/auto-daemon-tests-redis.pl @@ -1240,7 +1240,7 @@ $json_exp = { 'format_str' => '0 8', 'index' => '1', 'logical_intf' => 'foo', - 'media_flags' => '4', + 'media_flags' => '2097156', 'protocol' => 'RTP/AVP', 'ptime' => '0', 'tag' => '2', @@ -1251,7 +1251,7 @@ $json_exp = { 'format_str' => '0 8', 'index' => '2', 'logical_intf' => 'foo', - 'media_flags' => '4', + 'media_flags' => '2097156', 'protocol' => 'RTP/AVP', 'ptime' => '0', 'tag' => '2', @@ -1582,9 +1582,9 @@ SDP $json_exp->{'media-0'}{media_flags} = '10682380'; $json_exp->{'media-1'}{media_flags} = '8454156'; $json_exp->{'media-2'}{format_str} = '8'; -$json_exp->{'media-2'}{media_flags} = '65540'; +$json_exp->{'media-2'}{media_flags} = '2162692'; $json_exp->{'media-3'}{format_str} = '8'; -$json_exp->{'media-3'}{media_flags} = '65540'; +$json_exp->{'media-3'}{media_flags} = '2162692'; $json_exp->{'payload_types-2'}[0] = '8/PCMA/8000///0/20'; $#{$json_exp->{'payload_types-2'}} = 0; $json_exp->{'payload_types-3'}[0] = '8/PCMA/8000///0/20'; @@ -1835,7 +1835,7 @@ $json_exp = { 'format_str' => '0 8 9', 'index' => '1', 'logical_intf' => 'foo', - 'media_flags' => '4', + 'media_flags' => '2097156', 'protocol' => 'RTP/AVP', 'ptime' => '0', 'tag' => '1', @@ -2074,7 +2074,7 @@ $json_exp = { 'format_str' => '0', 'index' => '1', 'logical_intf' => 'foo', - 'media_flags' => '65540', + 'media_flags' => '2162692', 'protocol' => 'RTP/AVP', 'ptime' => '0', 'tag' => '1', @@ -2327,7 +2327,7 @@ $json_exp = { 'format_str' => '0', 'index' => '1', 'logical_intf' => 'foo', - 'media_flags' => '65540', + 'media_flags' => '2162692', 'protocol' => 'RTP/AVP', 'ptime' => '0', 'tag' => '1', @@ -2338,7 +2338,7 @@ $json_exp = { 'format_str' => '0 8 9', 'index' => '1', 'logical_intf' => 'foo', - 'media_flags' => '4', + 'media_flags' => '2097156', 'protocol' => 'RTP/AVP', 'ptime' => '0', 'tag' => '2', @@ -2586,7 +2586,7 @@ a=rtcp:PORT SDP $json_exp->{'media-2'}{format_str} = '0'; -$json_exp->{'media-2'}{media_flags} = '65540'; +$json_exp->{'media-2'}{media_flags} = '2162692'; $json_exp->{'stream-1'}{ps_flags} = '1179649'; $json_exp->{'stream-4'}{advertised_endpoint} = '198.51.100.14:6046'; $json_exp->{'stream-4'}{endpoint} = '198.51.100.14:6046'; diff --git a/t/auto-daemon-tests-websocket.py b/t/auto-daemon-tests-websocket.py index 45c9fa546..7c9a71628 100644 --- a/t/auto-daemon-tests-websocket.py +++ b/t/auto-daemon-tests-websocket.py @@ -2071,7 +2071,7 @@ class TestVideoroom(unittest.TestCase): self.assertRegex( m, re.compile( - b"^\x00\x01\x00.\x21\x12\xa4\x42(............)\x80\x22\x00.rtpengine.*?\x00\x06\x00\x0dabcd:(........)\x00\x00\x00\x80\\\x29\x00\x08........\x00\\\x24\x00\x04\x6e\xff\xff\xff\x00\x08\x00\x14....................\x80\\\x28\x00\x04....$", + b"^\x00\x01\x00.\x21\x12\xa4\x42(............)\x80\x22\x00.rtpengine.*?\x00\x06\x00\x0dabcd:(........)\x00\x00\x00\x80\\\x2a\x00\x08........\x00\\\x24\x00\x04\x6e\xff\xff\xff\x00\x08\x00\x14....................\x80\\\x28\x00\x04....$", re.DOTALL, ), )