TT#89352 add support for trickle ICE offer

Change-Id: I772e2ee44e5c206cccdd133d426545822e22850d
pull/1346/head
Richard Fuchs 5 years ago
parent 456d7ce243
commit 08fee992d1

@ -787,6 +787,11 @@ Optionally included keys are:
as no incoming packets have been received. Useful to create an as no incoming packets have been received. Useful to create an
initial NAT mapping. Not needed when ICE is in use. initial NAT mapping. Not needed when ICE is in use.
- `trickle ICE`
Useful for `offer` messages when ICE as advertised to also advertise
support for trickle ICE.
* `generate RTCP` * `generate RTCP`
Contains a string, either `on` or `off`. If enabled for a call, Contains a string, either `on` or `off`. If enabled for a call,

@ -1401,6 +1401,9 @@ static void __ice_offer(const struct sdp_ng_flags *flags, struct call_media *thi
default: default:
break; break;
} }
if (flags->trickle_ice)
MEDIA_SET(this, TRICKLE_ICE);
} }
/* determine roles (even if we don't actually do ICE) */ /* determine roles (even if we don't actually do ICE) */

@ -837,6 +837,12 @@ static void call_ng_flags_flags(struct sdp_ng_flags *out, str *s, void *dummy) {
case CSH_LOOKUP("generate-rtcp"): case CSH_LOOKUP("generate-rtcp"):
out->generate_rtcp = 1; out->generate_rtcp = 1;
break; break;
case CSH_LOOKUP("trickle-ICE"):
out->trickle_ice = 1;
break;
case CSH_LOOKUP("trickle-ice"):
out->trickle_ice = 1;
break;
case CSH_LOOKUP("loop-protect"): case CSH_LOOKUP("loop-protect"):
out->loop_protect = 1; out->loop_protect = 1;
break; break;

@ -90,6 +90,7 @@ struct sdp_ng_flags {
rtcp_mux_demux:1, rtcp_mux_demux:1,
rtcp_mux_accept:1, rtcp_mux_accept:1,
rtcp_mux_reject:1, rtcp_mux_reject:1,
trickle_ice:1,
no_rtcp_attr:1, no_rtcp_attr:1,
full_rtcp_attr:1, full_rtcp_attr:1,
generate_rtcp:1, generate_rtcp:1,

@ -10061,6 +10061,36 @@ SDP
new_call; new_call;
offer('trickle ICE offer', { ICE => 'force', flags => ['trickle ICE'] }, <<SDP);
v=0
o=- 1545997027 1 IN IP4 198.51.100.1
s=tester
t=0 0
m=audio 2000 RTP/AVP 0
c=IN IP4 198.51.100.1
a=sendrecv
----------------------------
v=0
o=- 1545997027 1 IN IP4 198.51.100.1
s=tester
t=0 0
m=audio PORT RTP/AVP 0
c=IN IP4 203.0.113.1
a=rtpmap:0 PCMU/8000
a=sendrecv
a=rtcp:PORT
a=ice-ufrag:ICEUFRAG
a=ice-pwd:ICEPWD
a=ice-options:trickle
a=candidate:ICEBASE 1 UDP 2130706431 203.0.113.1 PORT typ host
a=candidate:ICEBASE 1 UDP 2130706175 2001:db8:4321::1 PORT typ host
a=candidate:ICEBASE 2 UDP 2130706430 203.0.113.1 PORT typ host
a=candidate:ICEBASE 2 UDP 2130706174 2001:db8:4321::1 PORT typ host
a=end-of-candidates
SDP
new_call;
offer('ICE SDP with ICE force', { ICE => 'force' }, <<SDP); offer('ICE SDP with ICE force', { ICE => 'force' }, <<SDP);
v=0 v=0
o=- 1545997027 1 IN IP4 198.51.100.1 o=- 1545997027 1 IN IP4 198.51.100.1

Loading…
Cancel
Save