Commit 598caf51 authored by Nicolas Jager's avatar Nicolas Jager Committed by Guillaume Roguez

fix: conditionals for audio-only

Change-Id: Ic2796d22258e37ad531aec4e638196915e35969e
Reviewed-by: Guillaume Roguez's avatarGuillaume Roguez <guillaume.roguez@savoirfairelinux.com>
parent f8f13c8e
......@@ -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()
);
......
......@@ -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()
);
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment