MT#15289 add "reset" flag to un-learn certain parameters

This enables switching over the endpoint of a dialogue to a new client
with potentially different capabilities

Change-Id: I973b3c5d004014cc73e6ebc3e87d03c742bc1951
mr3.8.3
Richard Fuchs 10 years ago
parent 00fa79a0dc
commit 69b7586aa4

@ -662,6 +662,17 @@ Optionally included keys are:
this opens a security hole and potentially allows RTP streams to be hijacked, either partly or
in whole.
- `reset`
This causes *rtpengine* to un-learn certain aspects of the RTP endpoints involved, such as
support for ICE or support for SRTP. For example, if `ICE=force` is given, then *rtpengine*
will initially offer ICE to the remote endpoint. However, if a subsequent answer from that
same endpoint indicates that it doesn't support ICE, then no more ICE offers will be made
towards that endpoint, even if `ICE=force` is still specified. With the `reset` flag given,
this aspect will be un-learned and *rtpengine* will again offer ICE to this endpoint.
This flag is valid only in an `offer` message and is useful when the call has been
transferred to a new endpoint without change of `From` or `To` tags.
* `replace`
Similar to the `flags` list. Controls which parts of the SDP body should be rewritten.

@ -2447,6 +2447,11 @@ int monologue_offer_answer(struct call_monologue *other_ml, GQueue *streams,
* THIS side (recipient) before, then the structs will be populated with
* details already. */
if (flags && flags->opmode == OP_OFFER && flags->reset) {
MEDIA_CLEAR(media, INITIALIZED);
MEDIA_CLEAR(other_media, INITIALIZED);
}
/* deduct protocol from stream parameters received */
if (other_media->protocol != sp->protocol) {
other_media->protocol = sp->protocol;

@ -521,6 +521,8 @@ static void call_ng_process_flags(struct sdp_ng_flags *out, bencode_item_t *inpu
out->strict_source = 1;
else if (!bencode_strcmp(it, "media-handover"))
out->media_handover = 1;
else if (!bencode_strcmp(it, "reset"))
out->reset = 1;
else
ilog(LOG_WARN, "Unknown flag encountered: '"BENCODE_FORMAT"'",
BENCODE_FMT(it));

@ -32,6 +32,7 @@ struct sdp_ng_flags {
rtcp_mux_reject:1,
strict_source:1,
media_handover:1,
reset:1,
dtls_passive:1;
};

Loading…
Cancel
Save