diff --git a/sflphone-common/src/audio/audiortp/AudioRtpFactory.cpp b/sflphone-common/src/audio/audiortp/AudioRtpFactory.cpp index d9f88f1b55a5dbdcbd7d7c9fcf35a7aa5fda20e8..48b3c3abfd8e448a582bd15ccf9f51939a072a63 100644 --- a/sflphone-common/src/audio/audiortp/AudioRtpFactory.cpp +++ b/sflphone-common/src/audio/audiortp/AudioRtpFactory.cpp @@ -115,6 +115,7 @@ void AudioRtpFactory::initAudioRtpSession (SIPCall * ca) break; default: + _debug("Unsupported Rtp Session Exception Type!"); throw UnsupportedRtpSessionType(); } } else { @@ -186,7 +187,7 @@ void AudioRtpFactory::stop (void) _rtpSession = NULL; } catch (...) { _debugException ("Exception caught when stopping the audio rtp session"); - throw AudioRtpFactoryException(); + throw AudioRtpFactoryException("caught exception in AudioRtpFactory::stop"); } } @@ -218,7 +219,7 @@ sfl::AudioZrtpSession * AudioRtpFactory::getAudioZrtpSession() if ( (_rtpSessionType == Zrtp) && (_rtpSessionType != NULL)) { return static_cast<AudioZrtpSession *> (_rtpSession); } else { - throw AudioRtpFactoryException(); + throw AudioRtpFactoryException("_rtpSession is NULL in getAudioZrtpSession"); } } @@ -228,7 +229,7 @@ sfl::AudioZrtpSession * AudioRtpFactory::getAudioZrtpSession() static_cast<AudioSrtpSession *> (_rtpSession)->setRemoteCryptoInfo(nego); } else { - throw AudioRtpFactoryException(); + throw AudioRtpFactoryException("_rtpSession is NULL in setRemoteCryptoInfo"); } } } diff --git a/sflphone-common/src/sip/sipvoiplink.cpp b/sflphone-common/src/sip/sipvoiplink.cpp index e6f77b2f2c26eebb1fef597125c9b544859a24f2..e6fc242312753959ae01ad2ad4fd1e4fa5978fd7 100644 --- a/sflphone-common/src/sip/sipvoiplink.cpp +++ b/sflphone-common/src/sip/sipvoiplink.cpp @@ -3226,6 +3226,7 @@ void call_on_media_update (pjsip_inv_session *inv, pj_status_t status) CryptoOffer crypto_offer; call->getLocalSDP()->get_remote_sdp_crypto_from_offer(remote_sdp, crypto_offer); + bool nego_success = false; if(!crypto_offer.empty()) { @@ -3242,7 +3243,9 @@ void call_on_media_update (pjsip_inv_session *inv, pj_status_t status) if(sdesnego.negotiate()) { _debug("SDES negociation successfull \n"); nego_success = true; - call->getAudioRtp()->setRemoteCryptoInfo(sdesnego); + + if(call->getAudioRtp()->getAudioRtpType() == sfl::Sdes) + call->getAudioRtp()->setRemoteCryptoInfo(sdesnego); } else { @@ -3270,8 +3273,9 @@ void call_on_media_update (pjsip_inv_session *inv, pj_status_t status) if(nego_success && call->getAudioRtp()->getAudioRtpType() != sfl::Sdes) { - // We found a crypto context for this media bt Sdes is not - // enabled for this call, make a try using RTP only + // We found a crypto context for this media but Sdes is not + // enabled for this call, make a try using RTP only... + _debug("Sdes not initialized for this call\n"); } try {