sfl::AudioZrtpSession * CallManager::getAudioZrtpSession(const std::string& callID) { // TODO: remove SIP dependency const auto call = Manager::instance().callFactory.getCall<SIPCall>(callID); if (!call) throw CallManagerException("Call id " + callID + " is not valid"); sfl::AudioZrtpSession * zSession = call->getAudioRtp().getAudioZrtpSession(); if (!zSession) throw CallManagerException("Failed to get AudioZrtpSession"); return zSession; }
sfl::AudioZrtpSession * CallManager::getAudioZrtpSession(const std::string& callID) { // IP2IP profile is associated with IP2IP profile anyway SIPVoIPLink * link = static_cast<SIPVoIPLink *>(Manager::instance().getAccountLink(SIPAccount::IP2IP_PROFILE)); if (!link) throw CallManagerException("Failed to get sip link"); auto call = link->getSipCall(callID); if (!call) throw CallManagerException("Call id " + callID + " is not valid"); sfl::AudioZrtpSession * zSession = call->getAudioRtp().getAudioZrtpSession(); if (!zSession) throw CallManagerException("Failed to get AudioZrtpSession"); return zSession; }