diff --git a/src/account/account.cpp b/src/account/account.cpp index b8d394264ffbcc686dcdda2e9fc9a56e4a268ead..28afcef7f9d8a72a6df4000f073a2d8b8f9370d7 100644 --- a/src/account/account.cpp +++ b/src/account/account.cpp @@ -1946,18 +1946,22 @@ void Account::handleResponseConferenceInformation(void *ctx, const HttpResponse info->setCcmpUri(confInfo->getEntity()); auto &confDescription = confInfo->getConferenceDescription(); if (confDescription.present()) { - auto &subject = confDescription.get().getSubject(); + auto &description = confDescription->getFreeText(); + if (description.present() && !description.get().empty()) { + info->setDescription(description.get()); + } + auto &subject = confDescription->getSubject(); if (subject.present() && !subject.get().empty()) { info->setSubject(subject.get()); } - auto &confUris = confDescription.get().getConfUris(); + auto &confUris = confDescription->getConfUris(); auto &uris = confUris->getEntry(); for (auto &uri : uris) { info->setUri(Address::create(uri.getUri())); } - const auto &availableMedia = confDescription.get().getAvailableMedia(); + const auto &availableMedia = confDescription->getAvailableMedia(); if (availableMedia.present()) { - for (auto &mediaEntry : availableMedia.get().getEntry()) { + for (auto &mediaEntry : availableMedia->getEntry()) { const std::string &mediaType = mediaEntry.getType(); const LinphoneMediaDirection mediaDirection = XmlUtils::mediaStatusToMediaDirection(mediaEntry.getStatus().get()); @@ -1974,7 +1978,7 @@ void Account::handleResponseConferenceInformation(void *ctx, const HttpResponse info->setCapability(streamType, (mediaDirection == LinphoneMediaDirectionSendRecv)); } } - auto &anySequence(confDescription.get().getAny()); + auto &anySequence(confDescription->getAny()); for (const auto &anyElement : anySequence) { auto name = xsd::cxx::xml::transcode<char>(anyElement.getLocalName()); auto nodeName = xsd::cxx::xml::transcode<char>(anyElement.getNodeName()); diff --git a/src/conference/ccmp-conference-scheduler.cpp b/src/conference/ccmp-conference-scheduler.cpp index 97f079034c75469d3f89e991045c41fd4f456c72..7f12a2baea6d8b4d08dedf6945e725661ff4cf7a 100644 --- a/src/conference/ccmp-conference-scheduler.cpp +++ b/src/conference/ccmp-conference-scheduler.cpp @@ -117,6 +117,11 @@ void CCMPConferenceScheduler::createOrUpdateConference(const std::shared_ptr<Con confDescr.setSubject(subject); } + const std::string &description = conferenceInfo->getUtf8Description(); + if (!description.empty()) { + confDescr.setFreeText(description); + } + // Media ConferenceMediaType mediaType; ConferenceMediumType audio("audio", "AUTO_GENERATE_2"); diff --git a/src/conference/server-conference.cpp b/src/conference/server-conference.cpp index 55ffe1121db3fb42c338dd29afe134dcb9c6aa24..f8257a351188ed17f83f60c6df26d708b0d97026 100644 --- a/src/conference/server-conference.cpp +++ b/src/conference/server-conference.cpp @@ -815,9 +815,9 @@ void ServerConference::confirmCreation() { << " has no groupchat capability set: " << linphoneSpecs; setState(ConferenceInterface::State::CreationFailed); auto errorInfo = linphone_error_info_new(); - linphone_error_info_set(errorInfo, nullptr, LinphoneReasonNotAcceptable, 488, - "\"groupchat\" capability has not been found in remote contact address", - "\"groupchat\" capability has not been found in remote contact address"); + std::string reason = "\"groupchat\" capability has not been found in remote contact address "; + reason += remoteContactAddress->toString(); + linphone_error_info_set(errorInfo, NULL, LinphoneReasonForbidden, 403, reason.c_str(), reason.c_str()); session->decline(errorInfo); linphone_error_info_unref(errorInfo); } @@ -1799,8 +1799,9 @@ bool ServerConference::addParticipant(std::shared_ptr<Call> call) { lError() << "Unable to add " << *call << " because " << *this << " will start at " << startTime << " and now it is " << now; LinphoneErrorInfo *ei = linphone_error_info_new(); - linphone_error_info_set(ei, NULL, LinphoneReasonForbidden, 403, "Conference not started yet", - "Conference not started yet"); + std::string reason = "Conference will start on "; + reason += startTime; + linphone_error_info_set(ei, NULL, LinphoneReasonForbidden, 403, reason.c_str(), reason.c_str()); call->terminate(ei); linphone_error_info_unref(ei); return false; @@ -1810,8 +1811,9 @@ bool ServerConference::addParticipant(std::shared_ptr<Call> call) { lError() << "Unable to add " << *call << " because " << *this << " is already terminated at " << endTime << " and now it is " << now; LinphoneErrorInfo *ei = linphone_error_info_new(); - linphone_error_info_set(ei, NULL, LinphoneReasonForbidden, 403, "Conference already terminated", - "Conference already terminated"); + std::string reason = "Conference already ended on "; + reason += endTime; + linphone_error_info_set(ei, NULL, LinphoneReasonForbidden, 403, reason.c_str(), reason.c_str()); call->terminate(ei); linphone_error_info_unref(ei); return false; diff --git a/tester/tester.c b/tester/tester.c index 1c255e5a495851b3605873cd319d759c113345ba..ce182e978e39e9395579e90cf9ad1952f19e507e 100644 --- a/tester/tester.c +++ b/tester/tester.c @@ -5954,8 +5954,21 @@ void check_conference_info_in_db(LinphoneCoreManager *mgr, bool_t chat_enabled) { LinphoneConferenceInfo *info = linphone_core_find_conference_information_from_uri(mgr->lc, confAddr); if (BC_ASSERT_PTR_NOT_NULL(info)) { + bool_t is_conference_server = linphone_core_conference_server_enabled(mgr->lc); + // DB conference scheduler sets the description on the server as well whereas CCMP and SIP conference scheduler + // do not set it. Hence copy the description from the retrieved info and verifiy that it is the same as the one + // passed as argument should not be NULL + const char *actual_description = NULL; + if (!!is_conference_server) { + actual_description = linphone_conference_info_get_description(info); + if (actual_description) { + BC_ASSERT_STRING_EQUAL(description, actual_description); + } + } else { + actual_description = description; + } check_conference_info_members(info, uid, confAddr, organizer, participantList, start_time, duration, subject, - description, sequence, state, security_level, skip_participant_info, + actual_description, sequence, state, security_level, skip_participant_info, audio_enabled, video_enabled, chat_enabled); linphone_conference_info_unref(info); } @@ -6076,8 +6089,15 @@ void compare_conference_infos(const LinphoneConferenceInfo *info1, const char *description1 = linphone_conference_info_get_description(info1); const char *description2 = linphone_conference_info_get_description(info2); - if (description1 && description2) { - BC_ASSERT_STRING_EQUAL(description1, description2); + // Dial out conferences do not have a description set. It may happen that the reference conference information + // has one as it is built by the tester + if (duration1_m > 0) { + if (description1 && description2) { + BC_ASSERT_STRING_EQUAL(description1, description2); + } else { + BC_ASSERT_PTR_NULL(description1); + BC_ASSERT_PTR_NULL(description2); + } } const unsigned int ics_sequence1 = linphone_conference_info_get_ics_sequence(info1);