diff --git a/daemon/call.c b/daemon/call.c index 3fa19f715..75f5a9b7f 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -1588,6 +1588,8 @@ static void __generate_crypto(const sdp_ng_flags *flags, struct call_media *this if (!this->protocol || !this->protocol->srtp || MEDIA_ISSET(this, PASSTHRU)) { crypto_params_sdes_queue_clear(cpq); + // reorder received SDES suites towards offerer based on preference + reorder_sdes_preferences(offered_cpq, offered_order); /* clear crypto for the this leg b/c we are in passthrough mode */ MEDIA_CLEAR(this, DTLS); MEDIA_CLEAR(this, SDES); diff --git a/t/auto-daemon-tests.pl b/t/auto-daemon-tests.pl index eed12bc89..0d7ee501c 100755 --- a/t/auto-daemon-tests.pl +++ b/t/auto-daemon-tests.pl @@ -17372,6 +17372,54 @@ SDP new_call; +offer('SDES offerer preferences <> RTP', { ICE => 'remove', SDES => [ 'offerer_pref:AES_256_CM_HMAC_SHA1_32;AES_256_CM_HMAC_SHA1_80' ], 'transport-protocol' => 'RTP/AVP' }, < RTP', { ICE => 'remove' }, < 'remove', DTLS => 'off', SDES => [ 'offerer_pref:AES_256_CM_HMAC_SHA1_32;AES_256_CM_HMAC_SHA1_80' ] }, <