TT#94201 change default ICE= behaviour, add new =optional flag

Change-Id: Ie510bc05879c91eb1a0c7d7351461a63056ba410
pull/1099/head
Richard Fuchs 5 years ago
parent 65cf46bc0a
commit 6ccfd14530

@ -888,10 +888,12 @@ Optionally included keys are:
type candidates, and *rtpengine* inserts itself as a `relay` candidate. It will also leave SDP
c= and m= lines unchanged.
The default behavior
(no `ICE` key present at all) is: if no ICE attributes are present, a new set is generated and the
With `optional`, if no ICE attributes are present, a new set is generated and the
media proxy lists itself as ICE candidate; otherwise, the media proxy inserts itself as a
low-priority candidate.
low-priority candidate. This used to be the default behaviour in previous versions of
*rtpengine*.
The default behaviour (no `ICE` key present at all) is the same as `default`.
This flag operates independently of the `replace` flags.

@ -935,6 +935,9 @@ static void call_ng_process_flags(struct sdp_ng_flags *out, bencode_item_t *inpu
case CSH_LOOKUP("default"):
out->ice_option = ICE_DEFAULT;
break;
case CSH_LOOKUP("optional"):
out->ice_option = ICE_OPTIONAL;
break;
case CSH_LOOKUP("force_relay"):
case CSH_LOOKUP("force-relay"):
case CSH_LOOKUP("force relay"):

@ -48,11 +48,11 @@ struct sdp_ng_flags {
GHashTable *sdes_no;
str dtls_fingerprint;
enum {
ICE_NONE = 0,
ICE_DEFAULT = 0,
ICE_REMOVE,
ICE_FORCE,
ICE_FORCE_RELAY,
ICE_DEFAULT,
ICE_OPTIONAL,
} ice_option:3;
int asymmetric:1,
protocol_accept:1,

@ -6200,7 +6200,7 @@ SDP
new_call;
offer('plain SDP, add default ICE', { }, <<SDP);
offer('plain SDP, add default ICE', { ICE => 'optional' }, <<SDP);
v=0
o=- 1545997027 1 IN IP4 198.51.100.1
s=tester
@ -6268,7 +6268,7 @@ a=sendrecv
a=rtcp:PORT
SDP
answer('plain SDP, no ICE option given', { }, <<SDP);
answer('plain SDP, no ICE option given', { ICE => 'optional' }, <<SDP);
v=0
o=- 1545997027 1 IN IP4 198.51.100.3
s=tester
@ -6291,7 +6291,7 @@ SDP
new_call;
offer('ICE SDP, default ICE option w media-address', { 'media-address' => '3.4.5.6',
flags => ['full-rtcp-attribute'], }, <<SDP);
flags => ['full-rtcp-attribute'], ICE => 'optional', }, <<SDP);
v=0
o=- 1545997027 1 IN IP4 198.51.100.1
s=tester
@ -6329,7 +6329,7 @@ SDP
new_call;
offer('ICE SDP, default ICE option', { }, <<SDP);
offer('ICE SDP, default ICE option', { ICE => 'optional' }, <<SDP);
v=0
o=- 1545997027 1 IN IP4 198.51.100.1
s=tester
@ -6365,7 +6365,7 @@ a=candidate:ICEBASE 2 UDP 2097152254 203.0.113.1 PORT typ host
a=candidate:ICEBASE 2 UDP 4294967294 2001:db8:4321::1 PORT typ host
SDP
answer('plain SDP, ICE rejected, no ICE option given', { }, <<SDP);
answer('plain SDP, ICE rejected, no ICE option given', { ICE => 'optional' }, <<SDP);
v=0
o=- 1545997027 1 IN IP4 198.51.100.3
s=tester
@ -6419,7 +6419,7 @@ 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
SDP
answer('plain SDP, ICE rejected, no ICE option given', { }, <<SDP);
answer('plain SDP, ICE rejected, no ICE option given', { ICE => 'optional' }, <<SDP);
v=0
o=- 1545997027 1 IN IP4 198.51.100.3
s=tester
@ -6479,7 +6479,7 @@ 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
SDP
answer('ICE SDP, no ICE option given', { }, <<SDP);
answer('ICE SDP, no ICE option given', { ICE => 'optional' }, <<SDP);
v=0
o=- 1545997027 1 IN IP4 198.51.100.3
s=tester

Loading…
Cancel
Save