diff --git a/daemon/src/audio/audiortp/AudioRtpFactory.h b/daemon/src/audio/audiortp/AudioRtpFactory.h index 8aa38a83b2cb6a41e7f9b9c846cc55b6655a58da..35144c67da75d951b8358b90661793ad44117db2 100644 --- a/daemon/src/audio/audiortp/AudioRtpFactory.h +++ b/daemon/src/audio/audiortp/AudioRtpFactory.h @@ -108,15 +108,8 @@ class AudioRtpFactory */ void updateDestinationIpAddress (void); - /** - * @param None - * @return The internal audio rtp session type - * Symmetric = 0 - * Zrtp = 1 - * Sdes = 2 - */ - RtpMethod getAudioRtpType (void) const { - return _keyExchangeProtocol; + bool isSdesEnabled (void) const { + return _srtpEnabled && _keyExchangeProtocol == sfl::Sdes; } /** diff --git a/daemon/src/sip/sipvoiplink.cpp b/daemon/src/sip/sipvoiplink.cpp index ff0824d03f23b771df7852b3b0ed5f0e9cde036d..53594c6a6258e2235e8e2cc05ee28c31dcbdc1b9 100644 --- a/daemon/src/sip/sipvoiplink.cpp +++ b/daemon/src/sip/sipvoiplink.cpp @@ -1399,7 +1399,7 @@ void sdp_media_update_cb (pjsip_inv_session *inv, pj_status_t status) // We did not found any crypto context for this media, RTP fallback - if (!nego_success && call->getAudioRtp()->getAudioRtpType() == sfl::Sdes) { + if (!nego_success && call->getAudioRtp()->isSdesEnabled()) { call->getAudioRtp()->stop(); call->getAudioRtp()->setSrtpEnabled (false);