diff --git a/src/ringdht/ringaccount.cpp b/src/ringdht/ringaccount.cpp index f33b416ecefabe2ce48cb9c4d15ef83020e15262..1759d303e1f1c1bec2868e3036e271a38e90541f 100644 --- a/src/ringdht/ringaccount.cpp +++ b/src/ringdht/ringaccount.cpp @@ -526,7 +526,8 @@ RingAccount::onConnectedOutgoingCall(SIPCall& call, const std::string& to_id, Ip sdp.setPublishedIP(addrSdp); const bool created = sdp.createOffer( getActiveAccountCodecInfoList(MEDIA_AUDIO), - getActiveAccountCodecInfoList(videoEnabled_ and call.isAudioOnly() ? MEDIA_NONE : MEDIA_VIDEO), + getActiveAccountCodecInfoList(videoEnabled_ and not call.isAudioOnly() ? MEDIA_VIDEO + : MEDIA_NONE), getSrtpKeyExchange() ); diff --git a/src/sip/sipaccount.cpp b/src/sip/sipaccount.cpp index caf6a87caf7ad7bf576ccb4b97bb4a3ad2c90c4a..ff20e246cc5234d12b2cd65cafbb55254942b56e 100644 --- a/src/sip/sipaccount.cpp +++ b/src/sip/sipaccount.cpp @@ -232,7 +232,7 @@ SIPAccount::newOutgoingCall(const std::string& toUrl, const std::map<std::string const bool created = sdp.createOffer( getActiveAccountCodecInfoList(MEDIA_AUDIO), - getActiveAccountCodecInfoList(videoEnabled_ ? MEDIA_VIDEO : MEDIA_NONE), + getActiveAccountCodecInfoList(videoEnabled_ and not call->isAudioOnly() ? MEDIA_VIDEO : MEDIA_NONE), getSrtpKeyExchange() ); diff --git a/src/sip/sipcall.cpp b/src/sip/sipcall.cpp index 776e02396302eb4a8d14f1cfa5edf554eb428f34..62dcad06cc0a8b2563c886c9b61c4c45234e4fb6 100644 --- a/src/sip/sipcall.cpp +++ b/src/sip/sipcall.cpp @@ -231,7 +231,8 @@ SIPCall::SIPSessionReinvite() sdp_->clearIce(); auto& acc = getSIPAccount(); if (not sdp_->createOffer(acc.getActiveAccountCodecInfoList(MEDIA_AUDIO), - acc.getActiveAccountCodecInfoList(acc.isVideoEnabled() ? MEDIA_VIDEO : MEDIA_NONE), + acc.getActiveAccountCodecInfoList(acc.isVideoEnabled() and not isAudioOnly() ? MEDIA_VIDEO + : MEDIA_NONE), acc.getSrtpKeyExchange(), getState() == CallState::HOLD)) return !PJ_SUCCESS;