From 49f938133e4451db53e3abb17d9b04012ee719d9 Mon Sep 17 00:00:00 2001
From: Andrea Gianarda <andrea.gianarda@belledonne-communications.com>
Date: Mon, 17 Feb 2025 08:29:20 +0100
Subject: [PATCH] Replace usage of getCppListFromCList(participant_infos) with
 Utils::bctbxListToCppSharedPtrList Fix typo

---
 coreapi/chat.c                                | 30 +++------
 coreapi/linphonecore.c                        | 11 ++--
 include/linphone/types.h                      |  4 +-
 plugins/example/exampleplugin.cpp             |  2 +-
 src/c-wrapper/api/c-chat-room.cpp             | 12 ++--
 src/c-wrapper/api/c-conference-info.cpp       |  2 +-
 src/c-wrapper/api/c-conference.cpp            | 14 ++---
 src/call/call-log.cpp                         |  3 +-
 src/chat/chat-room/abstract-chat-room.h       |  2 +-
 src/chat/chat-room/basic-chat-room.cpp        |  4 +-
 src/chat/chat-room/basic-chat-room.h          |  2 +-
 src/chat/chat-room/chat-room.cpp              |  8 +--
 src/chat/chat-room/chat-room.h                |  2 +-
 src/conference/client-conference.cpp          | 19 +++---
 src/conference/client-conference.h            | 10 +--
 src/conference/conference-context.cpp         |  2 +-
 src/conference/conference-context.h           |  6 +-
 src/conference/conference-interface.h         |  4 +-
 src/conference/conference-scheduler.cpp       |  8 +--
 src/conference/conference.cpp                 | 10 +--
 src/conference/conference.h                   | 10 +--
 src/conference/server-conference.cpp          | 12 ++--
 src/conference/server-conference.h            |  8 +--
 src/conference/session/call-session.cpp       |  3 +-
 src/conference/session/media-session.cpp      |  4 +-
 src/conference/sip-conference-scheduler.cpp   |  2 +-
 src/core/core-chat-room.cpp                   | 61 ++++++++++---------
 src/core/core-p.h                             | 10 +--
 src/core/core.cpp                             | 11 ++--
 src/core/core.h                               |  2 +-
 src/nat/ice-service.h                         |  2 +-
 tester/audio_bypass_tester.c                  |  2 +-
 tester/call_single_tester.c                   |  8 +--
 tester/call_video_tester.cpp                  |  4 +-
 tester/conference-event-tester.cpp            |  2 +-
 tester/local-chat-tester.cpp                  |  2 +
 tester/local-conference-edition-tester.cpp    |  6 +-
 tester/message_tester.c                       |  2 +-
 tester/stun_tester.c                          |  2 +-
 tester/tester.c                               |  2 +-
 tools/lpsendmsg.c                             |  2 +-
 .../core/tools/service/CoreService.java       |  2 +-
 42 files changed, 148 insertions(+), 166 deletions(-)

diff --git a/coreapi/chat.c b/coreapi/chat.c
index 2a1df989d0..0088ab5365 100644
--- a/coreapi/chat.c
+++ b/coreapi/chat.c
@@ -61,7 +61,7 @@ LinphoneChatRoom *linphone_core_create_client_group_chat_room(LinphoneCore *lc,
 	return linphone_core_create_client_group_chat_room_2(lc, subject, fallback, FALSE);
 }
 
-// Deprecated see linphone_core_create_chat_room_6
+// Deprecated see linphone_core_create_chat_room_7
 LinphoneChatRoom *linphone_core_create_client_group_chat_room_2(LinphoneCore *lc,
                                                                 const char *subject,
                                                                 bool_t fallback,
@@ -71,7 +71,7 @@ LinphoneChatRoom *linphone_core_create_client_group_chat_room_2(LinphoneCore *lc
 	    ->toC();
 }
 
-// Deprecated see linphone_core_create_chat_room_6
+// Deprecated see linphone_core_create_chat_room_7
 LinphoneChatRoom *linphone_core_create_chat_room(LinphoneCore *lc,
                                                  const LinphoneChatRoomParams *params,
                                                  const LinphoneAddress *localAddr,
@@ -84,7 +84,7 @@ LinphoneChatRoom *linphone_core_create_chat_room(LinphoneCore *lc,
 	return result;
 }
 
-// Deprecated see linphone_core_create_chat_room_6
+// Deprecated see linphone_core_create_chat_room_7
 LinphoneChatRoom *linphone_core_create_chat_room_2(LinphoneCore *lc,
                                                    const LinphoneChatRoomParams *params,
                                                    const char *subject,
@@ -96,7 +96,7 @@ LinphoneChatRoom *linphone_core_create_chat_room_2(LinphoneCore *lc,
 	return result;
 }
 
-// Deprecated see linphone_core_create_chat_room_6
+// Deprecated see linphone_core_create_chat_room_7
 LinphoneChatRoom *
 linphone_core_create_chat_room_3(LinphoneCore *lc, const char *subject, const bctbx_list_t *participants) {
 	LinphoneChatRoomParams *params = linphone_core_create_default_chat_room_params(lc);
@@ -106,7 +106,7 @@ linphone_core_create_chat_room_3(LinphoneCore *lc, const char *subject, const bc
 	return result;
 }
 
-// Deprecated see linphone_core_create_chat_room_6
+// Deprecated see linphone_core_create_chat_room_7
 LinphoneChatRoom *linphone_core_create_chat_room_4(LinphoneCore *lc,
                                                    const LinphoneChatRoomParams *params,
                                                    const LinphoneAddress *localAddr,
@@ -117,7 +117,7 @@ LinphoneChatRoom *linphone_core_create_chat_room_4(LinphoneCore *lc,
 	return result;
 }
 
-// Deprecated see linphone_core_create_chat_room_6
+// Deprecated see linphone_core_create_chat_room_7
 LinphoneChatRoom *linphone_core_create_chat_room_5(LinphoneCore *lc, const LinphoneAddress *participant) {
 	bctbx_list_t *paricipants = bctbx_list_prepend(NULL, (LinphoneAddress *)participant);
 	LinphoneChatRoomParams *params = linphone_core_create_default_chat_room_params(lc);
@@ -141,13 +141,8 @@ LinphoneChatRoom *linphone_core_create_chat_room_7(LinphoneCore *lc,
 	CoreLogContextualizer logContextualizer(lc);
 	shared_ptr<LinphonePrivate::ConferenceParams> conferenceParams =
 	    params ? LinphonePrivate::ConferenceParams::toCpp(params)->clone()->toSharedPtr() : nullptr;
-	// If a participant has an invalid address, the pointer to its address is NULL.
-	// For the purpose of building an std::list from a bctbx_list_t, replace it by an empty Address (that is invalid)
-	std::list<std::shared_ptr<const LinphonePrivate::Address>> participantsList;
-	for (const bctbx_list_t *elem = participants; elem != NULL; elem = elem->next) {
-		const LinphoneAddress *data = static_cast<const LinphoneAddress *>(bctbx_list_get_data(elem));
-		participantsList.push_back(LinphonePrivate::Address::toCpp(data)->getSharedFromThis());
-	}
+	const list<std::shared_ptr<LinphonePrivate::Address>> participantsList =
+	    LinphonePrivate::Utils::bctbxListToCppSharedPtrList<LinphoneAddress, Address>(participants);
 	shared_ptr<const LinphonePrivate::Address> localAddress =
 	    localAddr ? LinphonePrivate::Address::toCpp(localAddr)->getSharedFromThis()
 	              : L_GET_PRIVATE_FROM_C_OBJECT(lc)->getDefaultLocalAddress(nullptr, false);
@@ -178,13 +173,8 @@ LinphoneChatRoom *linphone_core_search_chat_room_2(const LinphoneCore *lc,
 	CoreLogContextualizer logContextualizer(lc);
 	shared_ptr<LinphonePrivate::ConferenceParams> conferenceParams =
 	    params ? LinphonePrivate::ConferenceParams::toCpp(params)->clone()->toSharedPtr() : nullptr;
-	// If a participant has an invalid address, the pointer to its address is NULL.
-	// For the purpose of building an std::list from a bctbx_list_t, replace it by an empty Address (that is invalid)
-	std::list<std::shared_ptr<const LinphonePrivate::Address>> participantsList;
-	for (const bctbx_list_t *elem = participants; elem != NULL; elem = elem->next) {
-		const LinphoneAddress *data = static_cast<const LinphoneAddress *>(bctbx_list_get_data(elem));
-		participantsList.push_back(LinphonePrivate::Address::toCpp(data)->getSharedFromThis());
-	}
+	const list<std::shared_ptr<LinphonePrivate::Address>> participantsList =
+	    LinphonePrivate::Utils::bctbxListToCppSharedPtrList<LinphoneAddress, Address>(participants);
 	shared_ptr<const LinphonePrivate::Address> localAddress =
 	    localAddr ? LinphonePrivate::Address::toCpp(localAddr)->getSharedFromThis() : nullptr;
 	shared_ptr<const LinphonePrivate::Address> remoteAddress =
diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c
index 490035b012..420a1e99e7 100644
--- a/coreapi/linphonecore.c
+++ b/coreapi/linphonecore.c
@@ -9488,12 +9488,11 @@ LinphoneConference *linphone_core_search_conference(const LinphoneCore *lc,
 	CoreLogContextualizer logContextualizer(lc);
 	shared_ptr<LinphonePrivate::ConferenceParams> conferenceParams =
 	    params ? LinphonePrivate::ConferenceParams::toCpp(params)->clone()->toSharedPtr() : nullptr;
-	// If a participant has an invalid address, the pointer to its address is NULL.
-	// For the purpose of building an std::list from a bctbx_list_t, replace it by an empty Address (that is invalid)
-	std::list<std::shared_ptr<const LinphonePrivate::Address>> participantsList;
-	for (const bctbx_list_t *elem = participants; elem != NULL; elem = elem->next) {
-		const LinphoneAddress *data = static_cast<const LinphoneAddress *>(bctbx_list_get_data(elem));
-		participantsList.push_back(LinphonePrivate::Address::toCpp(data)->getSharedFromThis());
+	list<std::shared_ptr<LinphonePrivate::Address>> participantsList;
+	if (participants) {
+		participantsList =
+		    LinphonePrivate::Utils::bctbxListToCppSharedPtrList<LinphoneAddress, LinphonePrivate::Address>(
+		        participants);
 	}
 	shared_ptr<const LinphonePrivate::Address> localAddress =
 	    localAddr ? LinphonePrivate::Address::getSharedFromThis(localAddr) : nullptr;
diff --git a/include/linphone/types.h b/include/linphone/types.h
index 6bb33430dc..2fbda5a93d 100644
--- a/include/linphone/types.h
+++ b/include/linphone/types.h
@@ -719,7 +719,7 @@ typedef enum _LinphoneLogCollectionState {
 } LinphoneLogCollectionState;
 
 /**
- * @brief Used to notify if log collection upload have been succesfully delivered or not.
+ * @brief Used to notify if log collection upload have been successfully delivered or not.
  * @ingroup initializing
  */
 typedef enum _LinphoneCoreLogCollectionUploadState {
@@ -1353,7 +1353,7 @@ typedef struct _LinphoneRange LinphoneRange;
 
 /**
  * @brief Status code returned by some functions to
- * notify whether the execution has been succesfully
+ * notify whether the execution has been successfully
  * done or not.
  * @ingroup misc
  */
diff --git a/plugins/example/exampleplugin.cpp b/plugins/example/exampleplugin.cpp
index 02294c0071..f5056d53f1 100644
--- a/plugins/example/exampleplugin.cpp
+++ b/plugins/example/exampleplugin.cpp
@@ -34,7 +34,7 @@ extern "C" {
 #endif
 PLUGIN_EXPORT void liblinphone_exampleplugin_init(LinphoneCore *core) {
 	lInfo() << "Example plugin for core " << std::string(linphone_core_get_identity(core))
-	        << " has been succesfully loaded";
+	        << " has been successfully loaded";
 }
 
 #ifdef __cplusplus
diff --git a/src/c-wrapper/api/c-chat-room.cpp b/src/c-wrapper/api/c-chat-room.cpp
index ce37eedb65..56f5aeb612 100644
--- a/src/c-wrapper/api/c-chat-room.cpp
+++ b/src/c-wrapper/api/c-chat-room.cpp
@@ -469,11 +469,8 @@ void linphone_chat_room_add_participant(LinphoneChatRoom *chat_room, LinphoneAdd
 bool_t linphone_chat_room_add_participants(LinphoneChatRoom *chat_room, const bctbx_list_t *addresses) {
 	LinphonePrivate::ChatRoomLogContextualizer logContextualizer(chat_room);
 	if (linphone_chat_room_can_handle_participants(chat_room)) {
-		std::list<std::shared_ptr<const LinphonePrivate::Address>> addressList;
-		for (const bctbx_list_t *elem = addresses; elem != NULL; elem = elem->next) {
-			const LinphoneAddress *data = static_cast<const LinphoneAddress *>(bctbx_list_get_data(elem));
-			addressList.push_back(LinphonePrivate::Address::toCpp(data)->getSharedFromThis());
-		}
+		std::list<std::shared_ptr<LinphonePrivate::Address>> addressList =
+		    LinphonePrivate::Utils::bctbxListToCppSharedPtrList<LinphoneAddress, LinphonePrivate::Address>(addresses);
 		return AbstractChatRoom::toCpp(chat_room)->getConference()->addParticipants(addressList);
 	}
 	return FALSE;
@@ -570,7 +567,7 @@ void linphone_chat_room_remove_participants(LinphoneChatRoom *chat_room, const b
 	ChatRoomLogContextualizer logContextualizer(chat_room);
 	if (linphone_chat_room_can_handle_participants(chat_room)) {
 		AbstractChatRoom::toCpp(chat_room)->getConference()->removeParticipants(
-		    Participant::getCppListFromCList(participants));
+		    Utils::bctbxListToCppSharedPtrList<LinphoneParticipant, Participant>(participants));
 	}
 }
 
@@ -644,7 +641,8 @@ void linphone_chat_room_set_participant_devices(LinphoneChatRoom *chat_room,
                                                 const bctbx_list_t *deviceIdentities) {
 #ifdef HAVE_ADVANCED_IM
 	list<shared_ptr<ParticipantDeviceIdentity>> lDevicesIdentities =
-	    ParticipantDeviceIdentity::getCppListFromCList(deviceIdentities);
+	    Utils::bctbxListToCppSharedPtrList<LinphoneParticipantDeviceIdentity,
+	                                       LinphonePrivate::ParticipantDeviceIdentity>(deviceIdentities);
 	shared_ptr<ServerChatRoom> sgcr =
 	    dynamic_pointer_cast<ServerChatRoom>(AbstractChatRoom::toCpp(chat_room)->getSharedFromThis());
 	if (sgcr)
diff --git a/src/c-wrapper/api/c-conference-info.cpp b/src/c-wrapper/api/c-conference-info.cpp
index 0ecbe58d17..8d38aa8ff2 100644
--- a/src/c-wrapper/api/c-conference-info.cpp
+++ b/src/c-wrapper/api/c-conference-info.cpp
@@ -87,7 +87,7 @@ void linphone_conference_info_set_participant_infos(LinphoneConferenceInfo *conf
 void linphone_conference_info_add_participant_infos(LinphoneConferenceInfo *conference_info,
                                                     const bctbx_list_t *participant_infos) {
 	const std::list<std::shared_ptr<LinphonePrivate::ParticipantInfo>> participantInfos =
-	    ParticipantInfo::getCppListFromCList(participant_infos);
+	    Utils::bctbxListToCppSharedPtrList<LinphoneParticipantInfo, ParticipantInfo>(participant_infos);
 	ConferenceInfo::toCpp(conference_info)->addParticipants(participantInfos);
 }
 
diff --git a/src/c-wrapper/api/c-conference.cpp b/src/c-wrapper/api/c-conference.cpp
index f3fc8e13d2..15b6c5e258 100644
--- a/src/c-wrapper/api/c-conference.cpp
+++ b/src/c-wrapper/api/c-conference.cpp
@@ -349,11 +349,8 @@ LinphoneStatus linphone_conference_invite_participants(LinphoneConference *confe
                                                        const bctbx_list_t *addresses,
                                                        const LinphoneCallParams *params) {
 	ConferenceLogContextualizer logContextualizer(conference);
-	std::list<std::shared_ptr<const LinphonePrivate::Address>> addressList;
-	for (const bctbx_list_t *elem = addresses; elem != nullptr; elem = elem->next) {
-		const LinphoneAddress *data = static_cast<const LinphoneAddress *>(bctbx_list_get_data(elem));
-		addressList.push_back(LinphonePrivate::Address::toCpp(data)->getSharedFromThis());
-	}
+	std::list<std::shared_ptr<LinphonePrivate::Address>> addressList =
+	    LinphonePrivate::Utils::bctbxListToCppSharedPtrList<LinphoneAddress, LinphonePrivate::Address>(addresses);
 	return Conference::toCpp(conference)->inviteAddresses(addressList, params);
 }
 
@@ -365,11 +362,8 @@ LinphoneStatus linphone_conference_add_participants(LinphoneConference *conferen
 
 LinphoneStatus linphone_conference_add_participants_2(LinphoneConference *conference, const bctbx_list_t *addresses) {
 	ConferenceLogContextualizer logContextualizer(conference);
-	std::list<std::shared_ptr<const LinphonePrivate::Address>> addressList;
-	for (const bctbx_list_t *elem = addresses; elem != nullptr; elem = elem->next) {
-		const LinphoneAddress *data = static_cast<const LinphoneAddress *>(bctbx_list_get_data(elem));
-		addressList.push_back(LinphonePrivate::Address::toCpp(data)->getSharedFromThis());
-	}
+	std::list<std::shared_ptr<LinphonePrivate::Address>> addressList =
+	    LinphonePrivate::Utils::bctbxListToCppSharedPtrList<LinphoneAddress, LinphonePrivate::Address>(addresses);
 	return Conference::toCpp(conference)->addParticipants(addressList);
 }
 
diff --git a/src/call/call-log.cpp b/src/call/call-log.cpp
index 4ef7dcac3c..7d059d2032 100644
--- a/src/call/call-log.cpp
+++ b/src/call/call-log.cpp
@@ -232,8 +232,7 @@ std::shared_ptr<ConferenceInfo> CallLog::getConferenceInfo() const {
 const std::shared_ptr<AbstractChatRoom> CallLog::getChatRoom() const {
 	auto conferenceInfo = getConferenceInfo();
 	if (conferenceInfo && conferenceInfo->getCapability(LinphoneStreamTypeText)) {
-		return getCore()->getPrivate()->searchChatRoom(nullptr, nullptr, conferenceInfo->getUri(),
-		                                               std::list<std::shared_ptr<const Address>>{});
+		return getCore()->getPrivate()->searchChatRoom(nullptr, nullptr, conferenceInfo->getUri(), {});
 	}
 	return nullptr;
 }
diff --git a/src/chat/chat-room/abstract-chat-room.h b/src/chat/chat-room/abstract-chat-room.h
index 710435b6ef..2e762b32b2 100644
--- a/src/chat/chat-room/abstract-chat-room.h
+++ b/src/chat/chat-room/abstract-chat-room.h
@@ -204,7 +204,7 @@ public:
 	virtual std::shared_ptr<Address> getConferenceAddress() const = 0;
 	virtual std::shared_ptr<Participant> findParticipant(const std::shared_ptr<Address> &address) const = 0;
 	virtual std::list<std::shared_ptr<Participant>> getParticipants() const = 0;
-	virtual std::list<std::shared_ptr<const Address>> getParticipantAddresses() const = 0;
+	virtual std::list<std::shared_ptr<Address>> getParticipantAddresses() const = 0;
 
 	virtual bool canHandleParticipants() const = 0;
 	virtual std::shared_ptr<Conference> getConference() const = 0;
diff --git a/src/chat/chat-room/basic-chat-room.cpp b/src/chat/chat-room/basic-chat-room.cpp
index f9f8b87f5f..819abe5449 100644
--- a/src/chat/chat-room/basic-chat-room.cpp
+++ b/src/chat/chat-room/basic-chat-room.cpp
@@ -154,8 +154,8 @@ std::list<std::shared_ptr<Participant>> BasicChatRoom::getParticipants() const {
 	return mParticipants;
 }
 
-std::list<std::shared_ptr<const Address>> BasicChatRoom::getParticipantAddresses() const {
-	list<std::shared_ptr<const Address>> addresses;
+std::list<std::shared_ptr<Address>> BasicChatRoom::getParticipantAddresses() const {
+	list<std::shared_ptr<Address>> addresses;
 	for (auto &participant : mParticipants) {
 		addresses.push_back(participant->getAddress());
 	}
diff --git a/src/chat/chat-room/basic-chat-room.h b/src/chat/chat-room/basic-chat-room.h
index eaf752395c..b94259b7d3 100644
--- a/src/chat/chat-room/basic-chat-room.h
+++ b/src/chat/chat-room/basic-chat-room.h
@@ -58,7 +58,7 @@ public:
 	bool isMe(const std::shared_ptr<Address> &address) const override;
 	std::shared_ptr<Participant> getMe() const override;
 	std::list<std::shared_ptr<Participant>> getParticipants() const override;
-	std::list<std::shared_ptr<const Address>> getParticipantAddresses() const override;
+	std::list<std::shared_ptr<Address>> getParticipantAddresses() const override;
 
 protected:
 	explicit BasicChatRoom(const std::shared_ptr<Core> &core,
diff --git a/src/chat/chat-room/chat-room.cpp b/src/chat/chat-room/chat-room.cpp
index 25aea7b5d3..2a667361cb 100644
--- a/src/chat/chat-room/chat-room.cpp
+++ b/src/chat/chat-room/chat-room.cpp
@@ -329,9 +329,7 @@ std::shared_ptr<AbstractChatRoom> ChatRoom::getImdnChatRoom(const std::shared_pt
 	if (*peerAddress == chatRoomPeerAddress->getUriWithoutGruu()) {
 		chatRoom = getSharedFromThis();
 	} else {
-		std::list<std::shared_ptr<const Address>> emptyList;
-		chatRoom =
-		    getCore()->getPrivate()->searchChatRoom(getCurrentParams(), getLocalAddress(), peerAddress, emptyList);
+		chatRoom = getCore()->getPrivate()->searchChatRoom(getCurrentParams(), getLocalAddress(), peerAddress, {});
 		if (!chatRoom) {
 			shared_ptr<ConferenceParams> params = ConferenceParams::create(getCore());
 			params->setChatDefaults();
@@ -1038,10 +1036,10 @@ std::list<std::shared_ptr<Participant>> ChatRoom::getParticipants() const {
 	return conference->getParticipants();
 }
 
-std::list<std::shared_ptr<const Address>> ChatRoom::getParticipantAddresses() const {
+std::list<std::shared_ptr<Address>> ChatRoom::getParticipantAddresses() const {
 	const auto conference = getConference();
 	if (!conference) {
-		return std::list<std::shared_ptr<const Address>>();
+		return {};
 	}
 	return conference->getParticipantAddresses();
 }
diff --git a/src/chat/chat-room/chat-room.h b/src/chat/chat-room/chat-room.h
index 98a237f9a4..e7d4c9bd1f 100644
--- a/src/chat/chat-room/chat-room.h
+++ b/src/chat/chat-room/chat-room.h
@@ -137,7 +137,7 @@ public:
 	std::shared_ptr<Address> getConferenceAddress() const override;
 	std::shared_ptr<Participant> findParticipant(const std::shared_ptr<Address> &address) const override;
 	std::list<std::shared_ptr<Participant>> getParticipants() const override;
-	std::list<std::shared_ptr<const Address>> getParticipantAddresses() const override;
+	std::list<std::shared_ptr<Address>> getParticipantAddresses() const override;
 
 	virtual std::shared_ptr<Conference> getConference() const override;
 
diff --git a/src/conference/client-conference.cpp b/src/conference/client-conference.cpp
index ba3ddf61a9..772d254e25 100644
--- a/src/conference/client-conference.cpp
+++ b/src/conference/client-conference.cpp
@@ -566,8 +566,7 @@ void ClientConference::callFocus() {
 		                                                               Utils::toString(true));
 		linphone_call_params_enable_video(params, mConfParams->videoEnabled());
 		Conference::setUtf8Subject(mPendingSubject);
-		const std::list<std::shared_ptr<const Address>> addresses;
-		inviteAddresses(addresses, params);
+		inviteAddresses({}, params);
 		linphone_call_params_unref(params);
 	}
 }
@@ -592,7 +591,7 @@ bool ClientConference::addParticipant(BCTBX_UNUSED(const std::shared_ptr<Partici
 	return false;
 }
 
-bool ClientConference::addParticipant(const std::shared_ptr<const Address> &participantAddress) {
+bool ClientConference::addParticipant(const std::shared_ptr<Address> &participantAddress) {
 	// Search call that matches participant session
 	const std::list<std::shared_ptr<Call>> &coreCalls = getCore()->getCalls();
 	auto callIt = std::find_if(coreCalls.cbegin(), coreCalls.cend(), [&](const std::shared_ptr<Call> &c) {
@@ -603,7 +602,7 @@ bool ClientConference::addParticipant(const std::shared_ptr<const Address> &part
 		std::shared_ptr<Call> call = *callIt;
 		ret = addParticipant(call);
 	} else {
-		const list<std::shared_ptr<const Address>> addresses{participantAddress};
+		const list<std::shared_ptr<Address>> addresses{participantAddress};
 		ret = addParticipants(addresses);
 	}
 	return ret;
@@ -669,7 +668,7 @@ bool ClientConference::addParticipant(std::shared_ptr<Call> call) {
 
 // Removes own address and existing participants from the list.
 // Also removes gruu from kept addresses
-std::list<Address> ClientConference::cleanAddressesList(const list<std::shared_ptr<const Address>> &addresses) const {
+std::list<Address> ClientConference::cleanAddressesList(const list<std::shared_ptr<Address>> &addresses) const {
 	std::list<Address> cleanedList;
 	const auto &meAddress = getMe()->getAddress();
 	for (const auto &address : addresses) {
@@ -705,7 +704,7 @@ bool ClientConference::addParticipants(const std::list<std::shared_ptr<Call>> &c
 	return false;
 }
 
-bool ClientConference::addParticipants(const list<std::shared_ptr<const Address>> &addresses) {
+bool ClientConference::addParticipants(const list<std::shared_ptr<Address>> &addresses) {
 	const auto isChat = mConfParams->chatEnabled();
 	if (getMe()->isAdmin() || ((mState == ConferenceInterface::State::Instantiated) && isChat)) {
 		const auto mediaSupported = supportsMedia();
@@ -2009,7 +2008,7 @@ void ClientConference::notifyReceived(const std::shared_ptr<Event> &notifyLev, c
 #pragma GCC diagnostic pop
 #endif // _MSC_VER
 
-int ClientConference::inviteAddresses(const std::list<std::shared_ptr<const Address>> &addresses,
+int ClientConference::inviteAddresses(const std::list<std::shared_ptr<Address>> &addresses,
                                       const LinphoneCallParams *params) {
 	const auto &account = mConfParams->getAccount();
 	const auto organizer = account ? account->getAccountParams()->getIdentityAddress()
@@ -2045,7 +2044,7 @@ int ClientConference::inviteAddresses(const std::list<std::shared_ptr<const Addr
 	return 0;
 }
 
-bool ClientConference::dialOutAddresses(BCTBX_UNUSED(const std::list<std::shared_ptr<const Address>> &addressList)) {
+bool ClientConference::dialOutAddresses(BCTBX_UNUSED(const std::list<std::shared_ptr<Address>> &addressList)) {
 	lError() << *this << ": ClientConference::dialOutAddresses() not implemented";
 	return false;
 }
@@ -2551,7 +2550,7 @@ void ClientConference::onCallSessionSetTerminated(const shared_ptr<CallSession>
 		getCore()->removeConferencePendingCreation(ref);
 		if (remoteAddress == nullptr) {
 			lError() << *this
-			         << " The session to update the conference information did not succesfully establish hence it is "
+			         << " The session to update the conference information did not successfully establish hence it is "
 			            "likely that the request wasn't taken into account by the server";
 			setState(ConferenceInterface::State::CreationFailed);
 		} else if (dynamic_pointer_cast<MediaSession>(session) &&
@@ -2560,7 +2559,7 @@ void ClientConference::onCallSessionSetTerminated(const shared_ptr<CallSession>
 		           (session->getParams()->getPrivate()->getStartTime() < 0)) {
 			auto conferenceAddress = remoteAddress;
 
-			lInfo() << *this << " has been succesfully created: " << *conferenceAddress;
+			lInfo() << *this << " has been successfully created: " << *conferenceAddress;
 			const auto &meAddress = getMe()->getAddress();
 			ConferenceId conferenceId(conferenceAddress, meAddress, getCore()->createConferenceIdParams());
 			// Do not change the conference ID yet if exhuming a chatroom
diff --git a/src/conference/client-conference.h b/src/conference/client-conference.h
index a8f1777060..ac99512a6d 100644
--- a/src/conference/client-conference.h
+++ b/src/conference/client-conference.h
@@ -52,14 +52,14 @@ public:
 	                   const std::shared_ptr<CallSession> &focusSession,
 	                   SalCallOp *op = nullptr,
 	                   ConferenceListener *confListener = nullptr);
-	virtual int inviteAddresses(const std::list<std::shared_ptr<const Address>> &addresses,
+	virtual int inviteAddresses(const std::list<std::shared_ptr<Address>> &addresses,
 	                            const LinphoneCallParams *params) override;
-	virtual bool dialOutAddresses(const std::list<std::shared_ptr<const Address>> &addressList) override;
+	virtual bool dialOutAddresses(const std::list<std::shared_ptr<Address>> &addressList) override;
 	virtual bool addParticipant(const std::shared_ptr<ParticipantInfo> &info) override;
 	virtual bool addParticipants(const std::list<std::shared_ptr<Call>> &call) override;
-	virtual bool addParticipants(const std::list<std::shared_ptr<const Address>> &addresses) override;
+	virtual bool addParticipants(const std::list<std::shared_ptr<Address>> &addresses) override;
 	virtual bool addParticipant(std::shared_ptr<Call> call) override;
-	virtual bool addParticipant(const std::shared_ptr<const Address> &participantAddress) override;
+	virtual bool addParticipant(const std::shared_ptr<Address> &participantAddress) override;
 	virtual std::shared_ptr<ParticipantDevice> createParticipantDevice(std::shared_ptr<Participant> participant,
 	                                                                   std::shared_ptr<Call> call) override;
 	virtual bool finalizeParticipantAddition(std::shared_ptr<Call> call) override;
@@ -211,7 +211,7 @@ private:
 
 	void onFocusCallStateChanged(CallSession::State state, const std::string &message);
 	void onPendingCallStateChanged(std::shared_ptr<Call> call, CallSession::State callState);
-	std::list<Address> cleanAddressesList(const std::list<std::shared_ptr<const Address>> &addresses) const;
+	std::list<Address> cleanAddressesList(const std::list<std::shared_ptr<Address>> &addresses) const;
 
 	virtual void configure(SalCallOp *op) override;
 
diff --git a/src/conference/conference-context.cpp b/src/conference/conference-context.cpp
index b271549a69..8d8e289b9c 100644
--- a/src/conference/conference-context.cpp
+++ b/src/conference/conference-context.cpp
@@ -28,7 +28,7 @@ LINPHONE_BEGIN_NAMESPACE
 ConferenceContext::ConferenceContext(const std::shared_ptr<ConferenceParams> &params,
                                      const std::shared_ptr<const Address> &localAddress,
                                      const std::shared_ptr<const Address> &remoteAddress,
-                                     const std::list<std::shared_ptr<const Address>> &participants) {
+                                     const std::list<std::shared_ptr<Address>> &participants) {
 	mParams = params;
 	mParticipants = participants;
 	mLocalAddress = (localAddress) ? localAddress->getUriWithoutGruu() : Address();
diff --git a/src/conference/conference-context.h b/src/conference/conference-context.h
index 7988e7e2a8..72fa3825a6 100644
--- a/src/conference/conference-context.h
+++ b/src/conference/conference-context.h
@@ -37,7 +37,7 @@ public:
 	ConferenceContext(const std::shared_ptr<ConferenceParams> &params,
 	                  const std::shared_ptr<const Address> &localAddress,
 	                  const std::shared_ptr<const Address> &remoteAddress,
-	                  const std::list<std::shared_ptr<const Address>> &participants);
+	                  const std::list<std::shared_ptr<Address>> &participants);
 	ConferenceContext(ConferenceContext &&other) = delete;
 	ConferenceContext(const ConferenceContext &other) = delete;
 	virtual ~ConferenceContext() = default;
@@ -45,7 +45,7 @@ public:
 	inline const std::shared_ptr<const ConferenceParams> getParams() const {
 		return mParams;
 	}
-	inline const std::list<std::shared_ptr<const Address>> &getParticipants() const {
+	inline const std::list<std::shared_ptr<Address>> &getParticipants() const {
 		return mParticipants;
 	}
 	inline const Address &getLocalAddress() const {
@@ -59,7 +59,7 @@ public:
 
 private:
 	std::shared_ptr<const ConferenceParams> mParams;
-	std::list<std::shared_ptr<const Address>> mParticipants;
+	std::list<std::shared_ptr<Address>> mParticipants;
 	Address mLocalAddress;
 	Address mRemoteAddress;
 };
diff --git a/src/conference/conference-interface.h b/src/conference/conference-interface.h
index 363c032816..633fab20e9 100644
--- a/src/conference/conference-interface.h
+++ b/src/conference/conference-interface.h
@@ -148,7 +148,7 @@ public:
 	 <br>
 	 @param[in] participantAddress The address of the participant to add to this Conference.
 	*/
-	virtual bool addParticipant(const std::shared_ptr<const Address> &participantAddress) = 0;
+	virtual bool addParticipant(const std::shared_ptr<Address> &participantAddress) = 0;
 
 	/*
 	 * Same as function addParticipant(const std::shared_ptr<Address> &participantAddress), except that call to add is
@@ -171,7 +171,7 @@ public:
 	 * @param[in] addresses
 	 * @return True if everything is OK, False otherwise
 	 */
-	virtual bool addParticipants(const std::list<std::shared_ptr<const Address>> &addresses) = 0;
+	virtual bool addParticipants(const std::list<std::shared_ptr<Address>> &addresses) = 0;
 
 	/*
 	 * Add local participant to this conference, this fonction is only available for local focus. Behavior is the same
diff --git a/src/conference/conference-scheduler.cpp b/src/conference/conference-scheduler.cpp
index 173563291b..cd3587b108 100644
--- a/src/conference/conference-scheduler.cpp
+++ b/src/conference/conference-scheduler.cpp
@@ -279,13 +279,13 @@ void ConferenceScheduler::setConferenceAddress(const std::shared_ptr<Address> &c
 
 	if (getState() == State::AllocationPending) {
 		lInfo() << "[Conference Scheduler] [" << this
-		        << "] Conference has been succesfully created: " << *conferenceAddress;
+		        << "] Conference has been successfully created: " << *conferenceAddress;
 		mConferenceInfo->setUri(conferenceAddress);
 	} else {
 		const auto &uri = mConferenceInfo->getUri();
 		// No need to update the conference address during an update
 		lInfo() << "[Conference Scheduler] [" << this
-		        << "] Conference has been succesfully updated: " << (uri ? uri->toString() : std::string("sip:"));
+		        << "] Conference has been successfully updated: " << (uri ? uri->toString() : std::string("sip:"));
 	}
 
 	bool error = false;
@@ -470,9 +470,9 @@ void ConferenceScheduler::sendInvitations(shared_ptr<ConferenceParams> conferenc
 
 	// Sending the ICS once for each participant in a separated chat room each time.
 	for (auto participant : mInvitationsToSend) {
-		list<std::shared_ptr<const Address>> chatRoomParticipantList;
+		list<std::shared_ptr<Address>> chatRoomParticipantList;
 		chatRoomParticipantList.push_back(participant);
-		list<std::shared_ptr<const Address>> participantList;
+		list<std::shared_ptr<Address>> participantList;
 		std::shared_ptr<Address> remoteAddress = nullptr;
 		if (conferenceParams->getChatParams()->getBackend() == LinphonePrivate::ChatParams::Backend::FlexisipChat) {
 			participantList.push_back(participant);
diff --git a/src/conference/conference.cpp b/src/conference/conference.cpp
index 7e17b16026..195f1810ce 100644
--- a/src/conference/conference.cpp
+++ b/src/conference/conference.cpp
@@ -348,7 +348,7 @@ bool Conference::addParticipant(std::shared_ptr<Call> call) {
 	return success;
 }
 
-bool Conference::addParticipant(const std::shared_ptr<const Address> &participantAddress) {
+bool Conference::addParticipant(const std::shared_ptr<Address> &participantAddress) {
 	shared_ptr<Participant> participant = findParticipant(participantAddress);
 	if (participant) {
 		lWarning() << "Not adding participant '" << *participantAddress << "' because it is already a participant of "
@@ -369,8 +369,8 @@ std::shared_ptr<CallSession> Conference::getMainSession() const {
 	return mMe->getSession();
 }
 
-bool Conference::addParticipants(const std::list<std::shared_ptr<const Address>> &addresses) {
-	list<std::shared_ptr<const Address>> sortedAddresses(addresses);
+bool Conference::addParticipants(const std::list<std::shared_ptr<Address>> &addresses) {
+	list<std::shared_ptr<Address>> sortedAddresses(addresses);
 	sortedAddresses.sort([](const auto &addr1, const auto &addr2) { return *addr1 < *addr2; });
 	sortedAddresses.unique([](const auto &addr1, const auto &addr2) { return addr1->weakEqual(*addr2); });
 
@@ -741,8 +741,8 @@ const list<shared_ptr<Participant>> &Conference::getParticipants() const {
 	return mParticipants;
 }
 
-std::list<std::shared_ptr<const Address>> Conference::getParticipantAddresses() const {
-	list<std::shared_ptr<const Address>> addresses;
+std::list<std::shared_ptr<Address>> Conference::getParticipantAddresses() const {
+	list<std::shared_ptr<Address>> addresses;
 	for (auto &participant : mParticipants) {
 		addresses.push_back(participant->getAddress());
 	}
diff --git a/src/conference/conference.h b/src/conference/conference.h
index 59f694934a..d474bbeeb0 100644
--- a/src/conference/conference.h
+++ b/src/conference/conference.h
@@ -80,9 +80,9 @@ public:
 
 	virtual ~Conference();
 
-	virtual int inviteAddresses(const std::list<std::shared_ptr<const Address>> &addresses,
+	virtual int inviteAddresses(const std::list<std::shared_ptr<Address>> &addresses,
 	                            const LinphoneCallParams *params) = 0;
-	virtual bool dialOutAddresses(const std::list<std::shared_ptr<const Address>> &addressList) = 0;
+	virtual bool dialOutAddresses(const std::list<std::shared_ptr<Address>> &addressList) = 0;
 	virtual bool finalizeParticipantAddition(std::shared_ptr<Call> call) = 0;
 
 	std::shared_ptr<Participant> getActiveParticipant() const;
@@ -114,15 +114,15 @@ public:
 	void addInvitedParticipant(const std::shared_ptr<Participant> &participant);
 	bool addParticipant(std::shared_ptr<Call> call) override;
 	bool addParticipant(const std::shared_ptr<ParticipantInfo> &info) override;
-	bool addParticipant(const std::shared_ptr<const Address> &participantAddress) override;
-	bool addParticipants(const std::list<std::shared_ptr<const Address>> &addresses) override;
+	bool addParticipant(const std::shared_ptr<Address> &participantAddress) override;
+	bool addParticipants(const std::list<std::shared_ptr<Address>> &addresses) override;
 	virtual bool addParticipantDevice(std::shared_ptr<Call> call);
 	virtual void addParticipantDevice(const std::shared_ptr<Participant> &participant,
 	                                  const std::shared_ptr<ParticipantDeviceIdentity> &deviceInfo);
 
 	int getParticipantCount() const override;
 	const std::list<std::shared_ptr<Participant>> &getParticipants() const override;
-	std::list<std::shared_ptr<const Address>> getParticipantAddresses() const;
+	std::list<std::shared_ptr<Address>> getParticipantAddresses() const;
 	std::list<std::shared_ptr<ParticipantDevice>> getParticipantDevices(bool includeMe = true) const override;
 	std::shared_ptr<Participant> getScreenSharingParticipant() const;
 	std::shared_ptr<ParticipantDevice> getScreenSharingDevice() const;
diff --git a/src/conference/server-conference.cpp b/src/conference/server-conference.cpp
index 5d985b0b24..68489914b7 100644
--- a/src/conference/server-conference.cpp
+++ b/src/conference/server-conference.cpp
@@ -1240,7 +1240,7 @@ shared_ptr<ConferenceAvailableMediaEvent> ServerConference::notifyAvailableMedia
 	return Conference::notifyAvailableMediaChanged(creationTime, isFullState, mediaCapabilities);
 }
 
-int ServerConference::inviteAddresses(const list<std::shared_ptr<const Address>> &addresses,
+int ServerConference::inviteAddresses(const std::list<std::shared_ptr<Address>> &addresses,
                                       const LinphoneCallParams *params) {
 
 	const auto &coreCurrentCall = getCore()->getCurrentCall();
@@ -1385,7 +1385,7 @@ int ServerConference::inviteAddresses(const list<std::shared_ptr<const Address>>
 	return 0;
 }
 
-bool ServerConference::dialOutAddresses(const std::list<std::shared_ptr<const Address>> &addressList) {
+bool ServerConference::dialOutAddresses(const std::list<std::shared_ptr<Address>> &addressList) {
 	auto new_params = linphone_core_create_call_params(getCore()->getCCore(), nullptr);
 	linphone_call_params_enable_audio(new_params, mConfParams->audioEnabled());
 	linphone_call_params_enable_video(new_params, mConfParams->videoEnabled());
@@ -1763,7 +1763,7 @@ bool ServerConference::addParticipants(const std::list<std::shared_ptr<Call>> &c
 	return success;
 }
 
-bool ServerConference::addParticipants(const std::list<std::shared_ptr<const Address>> &addresses) {
+bool ServerConference::addParticipants(const std::list<std::shared_ptr<Address>> &addresses) {
 	return Conference::addParticipants(addresses);
 }
 
@@ -2017,7 +2017,7 @@ bool ServerConference::addParticipant(std::shared_ptr<Call> call) {
 
 		// If no resource list is provided in the INVITE, there is not need to call participants
 		if ((initialState == ConferenceInterface::State::CreationPending) && dialout && !isEmpty) {
-			list<std::shared_ptr<const Address>> addresses;
+			std::list<std::shared_ptr<Address>> addresses;
 			for (auto &participant : mInvitedParticipants) {
 				const auto &addr = participant->getAddress();
 				// Do not invite organizer as it is already dialing in
@@ -2035,7 +2035,7 @@ bool ServerConference::addParticipant(std::shared_ptr<Call> call) {
 	return false;
 }
 
-bool ServerConference::addParticipant(const std::shared_ptr<const Address> &participantAddress) {
+bool ServerConference::addParticipant(const std::shared_ptr<Address> &participantAddress) {
 	auto participantInfo = Factory::get()->createParticipantInfo(participantAddress);
 	// Participants invited after the start of a conference through the address can only listen to it
 	participantInfo->setRole(Participant::Role::Listener);
@@ -2061,7 +2061,7 @@ bool ServerConference::addParticipant(const std::shared_ptr<ParticipantInfo> &in
 					mInvitedParticipants.push_back(participant);
 				}
 
-				std::list<std::shared_ptr<const Address>> addressesList{participantAddress};
+				std::list<std::shared_ptr<Address>> addressesList{participantAddress};
 				return dialOutAddresses(addressesList);
 			}
 		} else {
diff --git a/src/conference/server-conference.h b/src/conference/server-conference.h
index 611252d5be..01587ac409 100644
--- a/src/conference/server-conference.h
+++ b/src/conference/server-conference.h
@@ -52,9 +52,9 @@ public:
 	                 const std::shared_ptr<ConferenceParams> params);
 	virtual ~ServerConference();
 
-	virtual int inviteAddresses(const std::list<std::shared_ptr<const Address>> &addresses,
+	virtual int inviteAddresses(const std::list<std::shared_ptr<Address>> &addresses,
 	                            const LinphoneCallParams *params) override;
-	virtual bool dialOutAddresses(const std::list<std::shared_ptr<const Address>> &addressList) override;
+	virtual bool dialOutAddresses(const std::list<std::shared_ptr<Address>> &addressList) override;
 	void inviteDevice(const std::shared_ptr<ParticipantDevice> &device);
 	void byeDevice(const std::shared_ptr<ParticipantDevice> &device);
 
@@ -64,10 +64,10 @@ public:
 	int getParticipantCount() const override;
 
 	virtual bool addParticipants(const std::list<std::shared_ptr<Call>> &call) override;
-	virtual bool addParticipants(const std::list<std::shared_ptr<const Address>> &addresses) override;
+	virtual bool addParticipants(const std::list<std::shared_ptr<Address>> &addresses) override;
 	virtual bool addParticipant(std::shared_ptr<Call> call) override;
 	virtual bool addParticipant(const std::shared_ptr<ParticipantInfo> &info) override;
-	virtual bool addParticipant(const std::shared_ptr<const Address> &participantAddress) override;
+	virtual bool addParticipant(const std::shared_ptr<Address> &participantAddress) override;
 	virtual bool finalizeParticipantAddition(std::shared_ptr<Call> call) override;
 	virtual std::shared_ptr<ParticipantDevice> createParticipantDevice(std::shared_ptr<Participant> participant,
 	                                                                   std::shared_ptr<Call> call) override;
diff --git a/src/conference/session/call-session.cpp b/src/conference/session/call-session.cpp
index 93b4c98e93..df44d285d0 100644
--- a/src/conference/session/call-session.cpp
+++ b/src/conference/session/call-session.cpp
@@ -1067,8 +1067,7 @@ bool CallSessionPrivate::reportEvents() const {
 	const auto clientConferenceGuessedAddress =
 	    (remoteContactAddress && remoteContactAddress->hasUriParam("conf-id")) ? remoteContactAddress : remoteAddress;
 	const auto &peerAddress = isInConference() ? serverConferenceGuessedAddress : clientConferenceGuessedAddress;
-	const auto conference =
-	    q->getCore()->searchConference(nullptr, nullptr, peerAddress, std::list<std::shared_ptr<const Address>>());
+	const auto conference = q->getCore()->searchConference(nullptr, nullptr, peerAddress, {});
 	ConferenceInterface::State conferenceState =
 	    (conference) ? conference->getState() : ConferenceInterface::State::Instantiated;
 	bool conferenceCreated = !((conferenceState == ConferenceInterface::State::Instantiated) ||
diff --git a/src/conference/session/media-session.cpp b/src/conference/session/media-session.cpp
index 97f1fed051..4d61e53370 100644
--- a/src/conference/session/media-session.cpp
+++ b/src/conference/session/media-session.cpp
@@ -4778,8 +4778,8 @@ void MediaSession::sendVfuRequest() {
 	} else lInfo() << "vfu request using sip disabled from config [sip,vfu_with_info]";
 }
 
-// Try to search the local conference by first looking at the contact address and if it is unsuccesfull to the to
-// address as a client may try to be calling a conference URI directly Typically, the seach using the contact address
+// Try to search the local conference by first looking at the contact address and if it is unsuccessfull to the to
+// address as a client may try to be calling a conference URI directly Typically, the search using the contact address
 // will succeed when a client creates a conference.
 const std::shared_ptr<Conference> MediaSession::getLocalConference() const {
 	L_D();
diff --git a/src/conference/sip-conference-scheduler.cpp b/src/conference/sip-conference-scheduler.cpp
index 7a55320020..354149ba83 100644
--- a/src/conference/sip-conference-scheduler.cpp
+++ b/src/conference/sip-conference-scheduler.cpp
@@ -97,7 +97,7 @@ void SIPConferenceScheduler::onCallSessionSetTerminated(const std::shared_ptr<Ca
 		         << "] The session to update the conference information of conference "
 		         << (conferenceAddress && conferenceAddress->isValid() ? conferenceAddress->toString()
 		                                                               : std::string("sip:"))
-		         << " did not succesfully establish hence it is likely that the request wasn't taken into account by "
+		         << " did not successfully establish hence it is likely that the request wasn't taken into account by "
 		            "the server";
 		setState(State::Error);
 	} else if (getState() != State::Error) {
diff --git a/src/core/core-chat-room.cpp b/src/core/core-chat-room.cpp
index bda1547a9a..769eed7b5d 100644
--- a/src/core/core-chat-room.cpp
+++ b/src/core/core-chat-room.cpp
@@ -276,7 +276,7 @@ std::shared_ptr<AbstractChatRoom>
 CorePrivate::searchChatRoom(const std::shared_ptr<ConferenceParams> &params,
                             const std::shared_ptr<const Address> &localAddress,
                             const std::shared_ptr<const Address> &remoteAddress,
-                            const std::list<std::shared_ptr<const Address>> &participants) const {
+                            const std::list<std::shared_ptr<Address>> &participants) const {
 	L_Q();
 	ConferenceContext referenceConferenceContext(params, localAddress, remoteAddress, participants);
 	const auto &chatRooms = q->getRawChatRoomList();
@@ -298,13 +298,12 @@ std::shared_ptr<AbstractChatRoom> CorePrivate::searchChatRoom(const std::string
 	if (!localAddress || !localAddress->isValid() || !peerAddress || !peerAddress->isValid()) {
 		return nullptr;
 	}
-	return searchChatRoom(nullptr, localAddress, peerAddress, std::list<std::shared_ptr<Address>>());
+	return searchChatRoom(nullptr, localAddress, peerAddress, {});
 }
 
-shared_ptr<AbstractChatRoom>
-CorePrivate::createChatRoom(const shared_ptr<ConferenceParams> &params,
-                            const std::shared_ptr<const Address> &localAddr,
-                            const std::list<std::shared_ptr<const Address>> &participants) {
+shared_ptr<AbstractChatRoom> CorePrivate::createChatRoom(const shared_ptr<ConferenceParams> &params,
+                                                         const std::shared_ptr<const Address> &localAddr,
+                                                         const std::list<std::shared_ptr<Address>> &participants) {
 	L_Q();
 	if (!params) {
 		lWarning() << "Trying to create chat room with null parameters";
@@ -323,12 +322,7 @@ CorePrivate::createChatRoom(const shared_ptr<ConferenceParams> &params,
 		lWarning() << "Tying to create chat room with unavailable backend";
 		return nullptr;
 	}
-	shared_ptr<AbstractChatRoom> chatRoom = searchChatRoom(params, localAddr, nullptr, participants);
-	if (chatRoom != nullptr) {
-		lWarning() << "Found already existing chat room that matches the given parameters, using this one "
-		           << *chatRoom;
-		return chatRoom;
-	}
+	shared_ptr<AbstractChatRoom> chatRoom;
 
 	if (params->getChatParams()->getBackend() == ChatParams::Backend::FlexisipChat) {
 #ifdef HAVE_ADVANCED_IM
@@ -339,6 +333,15 @@ CorePrivate::createChatRoom(const shared_ptr<ConferenceParams> &params,
 			return nullptr;
 		}
 
+		if (!params->isGroup() && participants.size() > 0) {
+			chatRoom = searchChatRoom(params, localAddr, nullptr, participants);
+			if (chatRoom) {
+				lWarning() << "Found already existing 1-1 chat room that matches the given parameters, using this one "
+				           << *chatRoom;
+				return chatRoom;
+			}
+		}
+
 		ConferenceId conferenceId = ConferenceId(nullptr, localAddr, q->createConferenceIdParams());
 		chatRoom = createClientChatRoom(conferenceFactoryUri, conferenceId, nullptr, params);
 
@@ -362,23 +365,28 @@ CorePrivate::createChatRoom(const shared_ptr<ConferenceParams> &params,
 		}
 
 		std::shared_ptr<const Address> remoteAddr = participants.front();
-		chatRoom = createBasicChatRoom(ConferenceId(remoteAddr, localAddr, q->createConferenceIdParams()), params);
-		insertChatRoom(chatRoom);
-		insertChatRoomWithDb(chatRoom);
+		chatRoom = searchChatRoom(params, localAddr, remoteAddr, {});
+		if (chatRoom == nullptr) {
+			std::shared_ptr<const Address> remoteAddr = participants.front();
+			chatRoom = createBasicChatRoom(ConferenceId(remoteAddr, localAddr, q->createConferenceIdParams()), params);
+			insertChatRoom(chatRoom);
+			insertChatRoomWithDb(chatRoom);
+		} else {
+			lInfo() << "Found an existing BasicChatRoom with this participant, using it instead of creating a new one";
+		}
 	}
 	return chatRoom;
 }
 
-shared_ptr<AbstractChatRoom>
-CorePrivate::createChatRoom(const shared_ptr<ConferenceParams> &params,
-                            const std::list<std::shared_ptr<const Address>> &participants) {
+shared_ptr<AbstractChatRoom> CorePrivate::createChatRoom(const shared_ptr<ConferenceParams> &params,
+                                                         const std::list<std::shared_ptr<Address>> &participants) {
 	auto defaultLocalAddress =
 	    getDefaultLocalAddress(nullptr, params->getChatParams()->getBackend() == ChatParams::Backend::FlexisipChat);
 	return createChatRoom(params, defaultLocalAddress, participants);
 }
 
-shared_ptr<AbstractChatRoom>
-CorePrivate::createChatRoom(const std::string &subject, const std::list<std::shared_ptr<const Address>> &participants) {
+shared_ptr<AbstractChatRoom> CorePrivate::createChatRoom(const std::string &subject,
+                                                         const std::list<std::shared_ptr<Address>> &participants) {
 	L_Q();
 
 	shared_ptr<ConferenceParams> params = ConferenceParams::create(q->getSharedFromThis());
@@ -397,13 +405,13 @@ CorePrivate::createChatRoom(const std::string &subject, const std::list<std::sha
 
 shared_ptr<AbstractChatRoom> CorePrivate::createChatRoom(const shared_ptr<ConferenceParams> &params,
                                                          const std::shared_ptr<Address> &localAddr,
-                                                         const std::shared_ptr<const Address> &participant) {
-	const std::list<std::shared_ptr<const Address>> &participants{participant};
+                                                         const std::shared_ptr<Address> &participant) {
+	const std::list<std::shared_ptr<Address>> &participants{participant};
 	return createChatRoom(params, localAddr, participants);
 }
 
 // Assume basic chat room creation
-shared_ptr<AbstractChatRoom> CorePrivate::createChatRoom(const std::shared_ptr<const Address> &participant) {
+shared_ptr<AbstractChatRoom> CorePrivate::createChatRoom(const std::shared_ptr<Address> &participant) {
 	return createChatRoom("", {participant});
 }
 
@@ -750,9 +758,7 @@ const bctbx_list_t *Core::getChatRoomsCList() const {
 
 shared_ptr<AbstractChatRoom> Core::findChatRoom(const ConferenceId &conferenceId, bool logIfNotFound) const {
 	L_D();
-	std::list<std::shared_ptr<const Address>> emptyList;
-	auto chatRoom =
-	    d->searchChatRoom(nullptr, conferenceId.getLocalAddress(), conferenceId.getPeerAddress(), emptyList);
+	auto chatRoom = d->searchChatRoom(nullptr, conferenceId.getLocalAddress(), conferenceId.getPeerAddress(), {});
 	if (chatRoom) {
 		lDebug() << "Found chat room in RAM for conference ID " << conferenceId << ".";
 		return chatRoom;
@@ -783,9 +789,8 @@ shared_ptr<AbstractChatRoom> Core::getOrCreateBasicChatRoom(const ConferenceId &
 	L_D();
 	ChatRoom::CapabilitiesMask capabilities({ChatRoom::Capabilities::Basic, ChatRoom::Capabilities::OneToOne});
 	auto params = ConferenceParams::fromCapabilities(capabilities, getSharedFromThis());
-	std::list<std::shared_ptr<const Address>> emptyList;
 	shared_ptr<AbstractChatRoom> chatRoom =
-	    d->searchChatRoom(params, conferenceId.getLocalAddress(), conferenceId.getPeerAddress(), emptyList);
+	    d->searchChatRoom(params, conferenceId.getLocalAddress(), conferenceId.getPeerAddress(), {});
 	if (chatRoom) {
 		return chatRoom;
 	}
diff --git a/src/core/core-p.h b/src/core/core-p.h
index fe5a3eb53f..85f474e50f 100644
--- a/src/core/core-p.h
+++ b/src/core/core-p.h
@@ -133,15 +133,15 @@ public:
 
 	std::shared_ptr<AbstractChatRoom> createChatRoom(const std::shared_ptr<ConferenceParams> &params,
 	                                                 const std::shared_ptr<const Address> &localAddr,
-	                                                 const std::list<std::shared_ptr<const Address>> &participants);
+	                                                 const std::list<std::shared_ptr<Address>> &participants);
 	std::shared_ptr<AbstractChatRoom> createChatRoom(const std::shared_ptr<ConferenceParams> &params,
-	                                                 const std::list<std::shared_ptr<const Address>> &participants);
+	                                                 const std::list<std::shared_ptr<Address>> &participants);
 	std::shared_ptr<AbstractChatRoom> createChatRoom(const std::string &subject,
-	                                                 const std::list<std::shared_ptr<const Address>> &participants);
+	                                                 const std::list<std::shared_ptr<Address>> &participants);
 	std::shared_ptr<AbstractChatRoom> createChatRoom(const std::shared_ptr<ConferenceParams> &params,
 	                                                 const std::shared_ptr<Address> &localAddr,
-	                                                 const std::shared_ptr<const Address> &participant);
-	std::shared_ptr<AbstractChatRoom> createChatRoom(const std::shared_ptr<const Address> &participant);
+	                                                 const std::shared_ptr<Address> &participant);
+	std::shared_ptr<AbstractChatRoom> createChatRoom(const std::shared_ptr<Address> &participant);
 
 	std::shared_ptr<AbstractChatRoom> searchChatRoom(const std::string identifier) const;
 	std::shared_ptr<AbstractChatRoom> searchChatRoom(const std::shared_ptr<ConferenceParams> &params,
diff --git a/src/core/core.cpp b/src/core/core.cpp
index 38aac92a22..57b3bd0ac1 100644
--- a/src/core/core.cpp
+++ b/src/core/core.cpp
@@ -347,7 +347,7 @@ void CorePrivate::deleteConferenceInfo(const std::shared_ptr<Address> &conferenc
 #ifdef HAVE_DB_STORAGE
 	mainDb->deleteConferenceInfo(conferenceAddress);
 #endif // HAVE_DB_STORAGE
-	auto chatRoom = searchChatRoom(nullptr, nullptr, conferenceAddress, std::list<std::shared_ptr<const Address>>());
+	auto chatRoom = searchChatRoom(nullptr, nullptr, conferenceAddress, {});
 	if (chatRoom) {
 		chatRoom->deleteFromDb();
 	}
@@ -1976,11 +1976,10 @@ void Core::deleteConference(const shared_ptr<const Conference> &conference) {
 	deleteConference(conferenceId);
 }
 
-std::shared_ptr<Conference>
-Core::searchConference(const std::shared_ptr<ConferenceParams> &params,
-                       const std::shared_ptr<const Address> &localAddress,
-                       const std::shared_ptr<const Address> &remoteAddress,
-                       const std::list<std::shared_ptr<const Address>> &participants) const {
+std::shared_ptr<Conference> Core::searchConference(const std::shared_ptr<ConferenceParams> &params,
+                                                   const std::shared_ptr<const Address> &localAddress,
+                                                   const std::shared_ptr<const Address> &remoteAddress,
+                                                   const std::list<std::shared_ptr<Address>> &participants) const {
 	L_D();
 	ConferenceContext referenceConferenceContext(params, localAddress, remoteAddress, participants);
 	const auto it = std::find_if(
diff --git a/src/core/core.h b/src/core/core.h
index 15f7f41267..1063ad5feb 100644
--- a/src/core/core.h
+++ b/src/core/core.h
@@ -252,7 +252,7 @@ public:
 	std::shared_ptr<Conference> searchConference(const std::shared_ptr<ConferenceParams> &params,
 	                                             const std::shared_ptr<const Address> &localAddress,
 	                                             const std::shared_ptr<const Address> &remoteAddress,
-	                                             const std::list<std::shared_ptr<const Address>> &participants) const;
+	                                             const std::list<std::shared_ptr<Address>> &participants) const;
 	std::shared_ptr<Conference> searchConference(const std::shared_ptr<const Address> &conferenceAddress) const;
 	std::shared_ptr<Conference> searchConference(const std::string identifier) const;
 
diff --git a/src/nat/ice-service.h b/src/nat/ice-service.h
index 95b034692a..a97d4fd508 100644
--- a/src/nat/ice-service.h
+++ b/src/nat/ice-service.h
@@ -40,7 +40,7 @@ public:
 
 	bool isActive() const;
 
-	/* Returns true if ICE has completed succesfully. */
+	/* Returns true if ICE has completed successfully. */
 	bool hasCompleted() const;
 
 	/* Returns true if ICE is running. */
diff --git a/tester/audio_bypass_tester.c b/tester/audio_bypass_tester.c
index 74b0ff7edd..3e882dbe72 100644
--- a/tester/audio_bypass_tester.c
+++ b/tester/audio_bypass_tester.c
@@ -428,7 +428,7 @@ static void only_enable_payload(LinphoneCore *lc, const char *mime, int rate, in
 
 /*
  * set some conservative jitter buffer params to be more robust to late ticks.
- * This is important so that the audio comparison is succesful*/
+ * This is important so that the audio comparison is successful*/
 static void set_jitter_buffer_params(LinphoneCore *lc) {
 	int jitter_buffer_ms = 300;
 	linphone_config_set_int(linphone_core_get_config(lc), "rtp", "jitter_buffer_min_size", jitter_buffer_ms);
diff --git a/tester/call_single_tester.c b/tester/call_single_tester.c
index df4be7a389..c9746f9588 100644
--- a/tester/call_single_tester.c
+++ b/tester/call_single_tester.c
@@ -5862,7 +5862,7 @@ static void call_state_changed_3(BCTBX_UNUSED(LinphoneCore *lc),
 	ms_free(from);
 }
 
-static void call_with_transport_change_base(bool_t succesfull_call) {
+static void call_with_transport_change_base(bool_t successfull_call) {
 	LinphoneSipTransports sip_tr;
 	LinphoneCoreManager *marie;
 	LinphoneCoreManager *pauline;
@@ -5896,14 +5896,14 @@ static void call_with_transport_change_base(bool_t succesfull_call) {
 		}
 	}
 
-	if (succesfull_call) {
+	if (successfull_call) {
 		BC_ASSERT_TRUE(call(marie, pauline));
 		end_call(marie, pauline);
 	} else linphone_core_invite(marie->lc, "nexiste_pas");
 
-	if (succesfull_call) BC_ASSERT_TRUE(wait_for(marie->lc, pauline->lc, &marie->stat.number_of_LinphoneCallEnd, 1));
+	if (successfull_call) BC_ASSERT_TRUE(wait_for(marie->lc, pauline->lc, &marie->stat.number_of_LinphoneCallEnd, 1));
 	BC_ASSERT_TRUE(wait_for(marie->lc, pauline->lc, &marie->stat.number_of_LinphoneCallReleased, 1));
-	if (succesfull_call) {
+	if (successfull_call) {
 		BC_ASSERT_TRUE(wait_for(marie->lc, pauline->lc, &pauline->stat.number_of_LinphoneCallEnd, 1));
 		BC_ASSERT_TRUE(wait_for(marie->lc, pauline->lc, &pauline->stat.number_of_LinphoneCallReleased, 1));
 	}
diff --git a/tester/call_video_tester.cpp b/tester/call_video_tester.cpp
index 4e43e911fe..2a96caeeb2 100644
--- a/tester/call_video_tester.cpp
+++ b/tester/call_video_tester.cpp
@@ -356,10 +356,10 @@ _request_video(LinphoneCoreManager *caller, LinphoneCoreManager *callee, bool_t
 }
 
 /*
- * This function requests the addon of a video stream, initiated by "callee" and potentiall accepted by "caller",
+ * This function requests the addon of a video stream, initiated by "callee" and potentially accepted by "caller",
  * and asserts a number of things after this is done.
  * However the video addon may fail due to video policy, so that there is no insurance that video is actually added.
- * This function returns TRUE if video was succesfully added, FALSE otherwise or if video is already there.
+ * This function returns TRUE if video was successfully added, FALSE otherwise or if video is already there.
  **/
 bool_t request_video(LinphoneCoreManager *caller, LinphoneCoreManager *callee, bool_t accept_with_params) {
 	stats initial_caller_stat = caller->stat;
diff --git a/tester/conference-event-tester.cpp b/tester/conference-event-tester.cpp
index 0d806d9c31..7a558d5beb 100644
--- a/tester/conference-event-tester.cpp
+++ b/tester/conference-event-tester.cpp
@@ -880,7 +880,7 @@ public:
 
 	// Addressing compilation error -Werror=overloaded-virtual
 	using LinphonePrivate::Conference::addParticipant;
-	bool addParticipant(const std::shared_ptr<const Address> &addr) override {
+	bool addParticipant(const std::shared_ptr<Address> &addr) override {
 		bool status = Conference::addParticipant(addr);
 		std::shared_ptr<Participant> p = findParticipant(addr);
 		p->addDevice(addr);
diff --git a/tester/local-chat-tester.cpp b/tester/local-chat-tester.cpp
index 8c88b9c4df..deec756b55 100644
--- a/tester/local-chat-tester.cpp
+++ b/tester/local-chat-tester.cpp
@@ -2973,6 +2973,8 @@ static void multidomain_group_chat_room(void) {
 		initialMichelleStats = michelle.getStats();
 		participantsAddresses = bctbx_list_append(NULL, linphone_address_ref(paulineAddr.toC()));
 		participantsAddresses = bctbx_list_append(participantsAddresses, linphone_address_ref(michelleAddr.toC()));
+		ms_message("%s creates chat on conference server %s", linphone_core_get_identity(marie.getLc()),
+		           focusAuth1DotExampleDotOrgFactoryAddress.toString().c_str());
 		LinphoneChatRoom *marieCrfocusAuth1DotExampleDotOrg =
 		    create_chat_room_client_side(coresList, marie.getCMgr(), &initialMarieStats, participantsAddresses,
 		                                 initialSubject, FALSE, LinphoneChatRoomEphemeralModeDeviceManaged);
diff --git a/tester/local-conference-edition-tester.cpp b/tester/local-conference-edition-tester.cpp
index 6634f46be1..185782622d 100644
--- a/tester/local-conference-edition-tester.cpp
+++ b/tester/local-conference-edition-tester.cpp
@@ -879,9 +879,9 @@ static void edit_simple_conference_base(bool_t from_organizer,
 			if (conf_info) {
 				linphone_conference_info_set_subject(conf_info, subject);
 				linphone_conference_info_set_description(conf_info, description2);
-				// If the edition is not succesfull, the conference information is not updated
-				// It bring about that if Marie joined the conference, the old conference information information stays
-				// in the database and it has Marie as a participant
+				// If the edition is not successfull, the conference information is not updated
+				// It bring about that if Marie joined the conference, the old conference information stays in the
+				// database and it has Marie as a participant
 				size_t ics_participant_number = 0;
 				if (add) {
 					linphone_conference_info_add_participant(conf_info, michelle.getCMgr()->identity);
diff --git a/tester/message_tester.c b/tester/message_tester.c
index c99011a278..ef155b9700 100644
--- a/tester/message_tester.c
+++ b/tester/message_tester.c
@@ -4610,7 +4610,7 @@ static int message_tester_before_suite(void) {
 	command = bctbx_strdup_printf("mkdir -p %s/.local/share/linphone", home);
 	err = system(command);
 	if (err != -1 && WIFEXITED(err) && WEXITSTATUS(err) == 0) {
-		bctbx_message("%s done succesfully.", command);
+		bctbx_message("%s done successfully.", command);
 	} else {
 		bctbx_error("%s failed. Some tests may fail.", command);
 	}
diff --git a/tester/stun_tester.c b/tester/stun_tester.c
index 26466c2a43..26389709ed 100644
--- a/tester/stun_tester.c
+++ b/tester/stun_tester.c
@@ -436,7 +436,7 @@ static void relayed_ice_turn_to_ice_with_dtls_srtp(void) {
 }
 
 /* specific test that checks that in the case of a call with DTLS-SRTP, ICE, and TURN
- * the handshake is started immediately after ICE has succesfully verified the relay pair.
+ * the handshake is started immediately after ICE has successfully verified the relay pair.
  */
 static void _ice_turn_dtls_call(const CallConfig *config) {
 	LinphoneCoreManager *marie;
diff --git a/tester/tester.c b/tester/tester.c
index 20002d2631..d8392b84c4 100644
--- a/tester/tester.c
+++ b/tester/tester.c
@@ -161,7 +161,7 @@ const int x3dhServer_creationTimeout = 20000;     // in ms, use this value for d
                                                   //
 int liblinphonetester_transport_timeout = 9000; /*milliseconds. it is set to such low value to workaround a problem with
             our Freebox v6 when connecting to Ipv6 addresses. It was found that the freebox sometimes block SYN-ACK
-            packets, which prevents connection to be succesful. Thanks to the timeout, it will fallback to IPv4*/
+            packets, which prevents connection to be successful. Thanks to the timeout, it will fallback to IPv4*/
 char *message_external_body_url = NULL;
 static const char *notify_content = "<somexml2>blabla</somexml2>";
 
diff --git a/tools/lpsendmsg.c b/tools/lpsendmsg.c
index 36df15de78..74ce7846ed 100644
--- a/tools/lpsendmsg.c
+++ b/tools/lpsendmsg.c
@@ -63,7 +63,7 @@ static void on_msg_state_changed(BCTBX_UNUSED(LinphoneChatMessage *msg), Linphon
 			running = FALSE;
 			break;
 		case LinphoneChatMessageStateDelivered:
-			printf("Message transmitted succesfully.\n");
+			printf("Message transmitted successfully.\n");
 			running = FALSE;
 			break;
 		case LinphoneChatMessageStateDeliveredToUser:
diff --git a/wrappers/java/classes/org/linphone/core/tools/service/CoreService.java b/wrappers/java/classes/org/linphone/core/tools/service/CoreService.java
index 9f2695393b..c6c4d5e3ae 100644
--- a/wrappers/java/classes/org/linphone/core/tools/service/CoreService.java
+++ b/wrappers/java/classes/org/linphone/core/tools/service/CoreService.java
@@ -209,7 +209,7 @@ public class CoreService extends Service {
                         Log.i("[Core Service] Core Manager found, adding our listener");
                         core.addListener(mListener);
                         mIsListenerAdded = true;
-                        Log.i("[Core Service] CoreListener succesfully added to the Core");
+                        Log.i("[Core Service] CoreListener successfully added to the Core");
 
                         if (core.getCallsNb() > 0) {
                             Log.w("[Core Service] Core listener added while at least one call active !");
-- 
GitLab