diff --git a/src/conference/session/call-session.cpp b/src/conference/session/call-session.cpp index 551a3b248cd2d3bee224739fad0d8a26f3f12729..7c5052d43c0a6342c5f209213ca1f2608b0dc640 100644 --- a/src/conference/session/call-session.cpp +++ b/src/conference/session/call-session.cpp @@ -1142,7 +1142,7 @@ std::shared_ptr<Address> CallSessionPrivate::getFixedContact() const { if (addr && (account->getOp() || (account->getDependency() != nullptr) || linphone_core_conference_server_enabled(q->getCore()->getCCore()))) { /* If using a account, use the contact address as guessed with the REGISTERs */ - lInfo() << "Contact " << *addr << " has been fixed using account"; + lInfo() << "Contact " << *addr << " has been fixed using account " << *account; result = addr->clone()->toSharedPtr(); return result; } diff --git a/tester/CMakeLists.txt b/tester/CMakeLists.txt index 998c0d9cb7eec894f83b486baa6853ca6b628348..1855e4df8a6bf0a730dc6d0ab1519c411b3f0be6 100644 --- a/tester/CMakeLists.txt +++ b/tester/CMakeLists.txt @@ -145,6 +145,7 @@ set(RC_FILES rcfiles/claire_rc rcfiles/claire_sips_rc rcfiles/chloe_rc + rcfiles/chloe_dual_proxy_rc rcfiles/conference_focus_rc rcfiles/empty_rc rcfiles/friends_rc diff --git a/tester/local-conference-edition-tester.cpp b/tester/local-conference-edition-tester.cpp index 185782622dc796bcf982364c37f4d517b67f813f..9aa36257da7ffa7fdc2d448b1b36073c84663a5c 100644 --- a/tester/local-conference-edition-tester.cpp +++ b/tester/local-conference-edition-tester.cpp @@ -781,10 +781,7 @@ static void edit_simple_conference_base(bool_t from_organizer, BC_ASSERT_EQUAL(linphone_conference_get_participant_count(pconference), no_participants, int, "%0d"); BC_ASSERT_STRING_EQUAL(linphone_conference_get_subject(pconference), initialSubject); - LinphoneParticipant *me = linphone_conference_get_me(pconference); - BC_ASSERT_TRUE(linphone_participant_is_admin(me) == - ((mgr == marie.getCMgr()) || (mgr == focus.getCMgr()))); - BC_ASSERT_TRUE(linphone_address_weak_equal(linphone_participant_get_address(me), mgr->identity)); + check_conference_me(pconference, ((mgr == marie.getCMgr()) || (mgr == focus.getCMgr()))); bctbx_list_t *participants = linphone_conference_get_participant_list(pconference); for (bctbx_list_t *itp = participants; itp; itp = bctbx_list_next(itp)) { LinphoneParticipant *p = (LinphoneParticipant *)bctbx_list_get_data(itp); diff --git a/tester/local-conference-tester-functions.cpp b/tester/local-conference-tester-functions.cpp index 8f7e62c1c9d0608b722e9c1196e3740fae18846a..0fe956a59fabab2e4a77bfe5a705cfd1b65c7321 100644 --- a/tester/local-conference-tester-functions.cpp +++ b/tester/local-conference-tester-functions.cpp @@ -168,6 +168,19 @@ static bool check_conference_info_by_participant(LinphoneCoreManager *mgr, return found_in_all_participants; } +void check_conference_me(LinphoneConference *conference, bool_t is_admin) { + LinphoneParticipant *me = linphone_conference_get_me(conference); + BC_ASSERT_TRUE(linphone_participant_is_admin(me) == is_admin); + LinphoneAccount *account = linphone_conference_get_account(conference); + BC_ASSERT_PTR_NOT_NULL(account); + if (account) { + const LinphoneAccountParams *account_params = linphone_account_get_params(account); + const LinphoneAddress *account_identity_address = linphone_account_params_get_identity_address(account_params); + BC_ASSERT_PTR_NOT_NULL(account_identity_address); + BC_ASSERT_TRUE(linphone_address_weak_equal(linphone_participant_get_address(me), account_identity_address)); + } +} + LinphoneAddress * create_conference_on_server(Focus &focus, ClientConference &organizer, @@ -1886,10 +1899,7 @@ void create_conference_base(time_t start_time, } BC_ASSERT_EQUAL(linphone_conference_get_participant_count(pconference), no_participants, int, "%0d"); BC_ASSERT_STRING_EQUAL(linphone_conference_get_subject(pconference), initialSubject); - LinphoneParticipant *me = linphone_conference_get_me(pconference); - BC_ASSERT_TRUE(linphone_participant_is_admin(me) == - ((mgr == marie.getCMgr()) || (mgr == focus.getCMgr()))); - BC_ASSERT_TRUE(linphone_address_weak_equal(linphone_participant_get_address(me), mgr->identity)); + check_conference_me(pconference, ((mgr == marie.getCMgr()) || (mgr == focus.getCMgr()))); bctbx_list_t *participants = linphone_conference_get_participant_list(pconference); for (bctbx_list_t *itp = participants; itp; itp = bctbx_list_next(itp)) { LinphoneParticipant *p = (LinphoneParticipant *)bctbx_list_get_data(itp); @@ -2165,10 +2175,7 @@ void create_conference_base(time_t start_time, bctbx_list_free_with_data(devices, (void (*)(void *))linphone_participant_device_unref); } BC_ASSERT_STRING_EQUAL(linphone_conference_get_subject(pconference), initialSubject); - LinphoneParticipant *me = linphone_conference_get_me(pconference); - BC_ASSERT_TRUE(linphone_participant_is_admin(me) == - ((mgr == marie.getCMgr()) || (mgr == focus.getCMgr()))); - BC_ASSERT_TRUE(linphone_address_weak_equal(linphone_participant_get_address(me), mgr->identity)); + check_conference_me(pconference, ((mgr == marie.getCMgr()) || (mgr == focus.getCMgr()))); bctbx_list_t *participants = linphone_conference_get_participant_list(pconference); for (bctbx_list_t *itp = participants; itp; itp = bctbx_list_next(itp)) { LinphoneParticipant *p = (LinphoneParticipant *)bctbx_list_get_data(itp); @@ -6024,8 +6031,7 @@ void create_conference_with_screen_sharing_chat_base(time_t start_time, int nb_members = 0; for (auto remaining_mgr : remaining_members) { remaining_members_stats.push_back(remaining_mgr->stat); - LinphoneCall *pcall = - linphone_core_get_call_by_remote_address2(remaining_mgr->lc, focus.getCMgr()->identity); + LinphoneCall *pcall = linphone_core_get_call_by_remote_address2(remaining_mgr->lc, confAddr); BC_ASSERT_PTR_NOT_NULL(pcall); if (pcall) { const LinphoneCallParams *call_cparams = linphone_call_get_current_params(pcall); @@ -6038,7 +6044,7 @@ void create_conference_with_screen_sharing_chat_base(time_t start_time, int participant_calls_nb = static_cast<int>(bctbx_list_size(participant_calls)); BC_ASSERT_EQUAL(participant_calls_nb, 1, int, "%d"); - LinphoneCall *call = linphone_core_get_call_by_remote_address2(mgr->lc, focus.getCMgr()->identity); + LinphoneCall *call = linphone_core_get_call_by_remote_address2(mgr->lc, confAddr); BC_ASSERT_PTR_NOT_NULL(call); if (call) { ms_message("%s is terminating call with %s", linphone_core_get_identity(mgr->lc), @@ -6139,7 +6145,6 @@ void create_conference_with_screen_sharing_chat_base(time_t start_time, BC_ASSERT_TRUE(wait_for_list(coresList, &focus.getStats().number_of_LinphoneConferenceStateDeleted, 1, liblinphone_tester_sip_timeout)); - for (auto mgr : members) { size_t expected_call_logs = (mgr == pauline.getCMgr()) ? 2 : 1; const bctbx_list_t *call_logs = linphone_core_get_call_logs(mgr->lc); @@ -6189,11 +6194,35 @@ void create_conference_with_late_participant_addition_base(time_t start_time, bool_t accept, bool_t one_addition, LinphoneConferenceSecurityLevel security_level) { - Focus focus("chloe_rc"); + Focus focus("chloe_dual_proxy_rc"); { // to make sure focus is destroyed after clients. bool_t enable_lime = (security_level == LinphoneConferenceSecurityLevelEndToEnd ? TRUE : FALSE); - - ClientConference marie("marie_rc", focus.getConferenceFactoryAddress(), enable_lime); + // Create conference on the server using an account that is not the default one + LinphoneAccount *focus_default_account = linphone_core_get_default_account(focus.getLc()); + LinphoneAccount *focus_conference_account = NULL; + const bctbx_list_t *focus_accounts = linphone_core_get_account_list(focus.getLc()); + for (const bctbx_list_t *focus_account_it = focus_accounts; focus_account_it != NULL; + focus_account_it = focus_account_it->next) { + LinphoneAccount *account = (LinphoneAccount *)(bctbx_list_get_data(focus_account_it)); + if (account != focus_default_account) { + focus_conference_account = account; + break; + } + } + + BC_ASSERT_PTR_NOT_NULL(focus_conference_account); + if (!focus_conference_account) { + // Fallback to default account just to execute the test. Nonetheless the goal of this test is of using a non + // default account + focus_conference_account = focus_default_account; + } + + const LinphoneAccountParams *focus_account_params = linphone_account_get_params(focus_conference_account); + const LinphoneAddress *factory_uri = + linphone_account_params_get_conference_factory_address(focus_account_params); + Address focus_conference_factory = *Address::toCpp(factory_uri); + // Change the conference factory of Marie only + ClientConference marie("marie_rc", focus_conference_factory, enable_lime); ClientConference pauline("pauline_rc", focus.getConferenceFactoryAddress(), enable_lime); ClientConference laure("laure_tcp_rc", focus.getConferenceFactoryAddress(), enable_lime); ClientConference michelle("michelle_rc", focus.getConferenceFactoryAddress(), enable_lime); @@ -6554,10 +6583,7 @@ void create_conference_with_late_participant_addition_base(time_t start_time, bctbx_list_free_with_data(devices, (void (*)(void *))linphone_participant_device_unref); } BC_ASSERT_STRING_EQUAL(linphone_conference_get_subject(pconference), initialSubject); - LinphoneParticipant *me = linphone_conference_get_me(pconference); - BC_ASSERT_TRUE(linphone_participant_is_admin(me) == - ((mgr == marie.getCMgr()) || (mgr == focus.getCMgr()))); - BC_ASSERT_TRUE(linphone_address_weak_equal(linphone_participant_get_address(me), mgr->identity)); + check_conference_me(pconference, ((mgr == marie.getCMgr()) || (mgr == focus.getCMgr()))); bctbx_list_t *participants = linphone_conference_get_participant_list(pconference); for (bctbx_list_t *itp = participants; itp; itp = bctbx_list_next(itp)) { LinphoneParticipant *p = (LinphoneParticipant *)bctbx_list_get_data(itp); @@ -6634,12 +6660,10 @@ void create_conference_with_late_participant_addition_base(time_t start_time, liblinphone_tester_sip_timeout)); } - LinphoneCall *berthe_call = - linphone_core_get_call_by_remote_address2(berthe.getLc(), focus.getCMgr()->identity); + LinphoneCall *berthe_call = linphone_core_get_call_by_remote_address2(berthe.getLc(), confAddr); BC_ASSERT_PTR_NOT_NULL(berthe_call); - LinphoneCall *michelle_call = - linphone_core_get_call_by_remote_address2(michelle.getLc(), focus.getCMgr()->identity); + LinphoneCall *michelle_call = linphone_core_get_call_by_remote_address2(michelle.getLc(), confAddr); BC_ASSERT_PTR_NOT_NULL(michelle_call); int participant_added = ((one_addition) ? 1 : 2); @@ -6990,7 +7014,7 @@ void create_conference_with_late_participant_addition_base(time_t start_time, focus_stat = focus.getStats(); for (auto mgr : members) { - LinphoneCall *call = linphone_core_get_call_by_remote_address2(mgr->lc, focus.getCMgr()->identity); + LinphoneCall *call = linphone_core_get_call_by_remote_address2(mgr->lc, confAddr); BC_ASSERT_PTR_NOT_NULL(call); if (call) { ms_message("%s is terminating call with %s", linphone_core_get_identity(mgr->lc), @@ -7048,13 +7072,13 @@ void create_conference_with_late_participant_addition_base(time_t start_time, BC_ASSERT_PTR_NULL(pconference); } + const LinphoneAddress *focus_identity = linphone_account_params_get_identity_address(focus_account_params); for (auto mgr : members) { size_t expected_call_logs = (mgr == pauline.getCMgr()) ? 2 : 1; const bctbx_list_t *call_logs = linphone_core_get_call_logs(mgr->lc); BC_ASSERT_EQUAL(bctbx_list_size(call_logs), expected_call_logs, size_t, "%zu"); - bctbx_list_t *mgr_focus_call_log = - linphone_core_get_call_history_2(mgr->lc, focus.getCMgr()->identity, mgr->identity); + bctbx_list_t *mgr_focus_call_log = linphone_core_get_call_history_2(mgr->lc, focus_identity, mgr->identity); BC_ASSERT_PTR_NOT_NULL(mgr_focus_call_log); if (mgr_focus_call_log) { BC_ASSERT_EQUAL(bctbx_list_size(mgr_focus_call_log), expected_call_logs, size_t, "%zu"); @@ -9006,10 +9030,7 @@ void two_overlapping_conferences_base(bool_t same_organizer, bool_t dialout) { bctbx_list_free_with_data(devices, (void (*)(void *))linphone_participant_device_unref); } BC_ASSERT_STRING_EQUAL(linphone_conference_get_subject(pconference), subject1); - LinphoneParticipant *me = linphone_conference_get_me(pconference); - BC_ASSERT_TRUE(linphone_participant_is_admin(me) == - ((mgr == marie.getCMgr()) || (mgr == focus.getCMgr()))); - BC_ASSERT_TRUE(linphone_address_weak_equal(linphone_participant_get_address(me), mgr->identity)); + check_conference_me(pconference, ((mgr == marie.getCMgr()) || (mgr == focus.getCMgr()))); bctbx_list_t *participants = linphone_conference_get_participant_list(pconference); for (bctbx_list_t *itp = participants; itp; itp = bctbx_list_next(itp)) { LinphoneParticipant *p = (LinphoneParticipant *)bctbx_list_get_data(itp); @@ -9300,12 +9321,7 @@ void two_overlapping_conferences_base(bool_t same_organizer, bool_t dialout) { bctbx_list_free_with_data(devices, (void (*)(void *))linphone_participant_device_unref); } BC_ASSERT_STRING_EQUAL(linphone_conference_get_subject(pconference), subject2); - - LinphoneParticipant *me = linphone_conference_get_me(pconference); - - BC_ASSERT_TRUE(linphone_participant_is_admin(me) == - ((mgr == organizer2.getCMgr()) || (mgr == focus.getCMgr()))); - BC_ASSERT_TRUE(linphone_address_weak_equal(linphone_participant_get_address(me), mgr->identity)); + check_conference_me(pconference, ((mgr == organizer2.getCMgr()) || (mgr == focus.getCMgr()))); bctbx_list_t *participants = linphone_conference_get_participant_list(pconference); for (bctbx_list_t *itp = participants; itp; itp = bctbx_list_next(itp)) { LinphoneParticipant *p = (LinphoneParticipant *)bctbx_list_get_data(itp); @@ -9946,10 +9962,7 @@ void create_one_participant_conference_toggle_video_base(LinphoneConferenceLayou bctbx_list_free_with_data(devices, (void (*)(void *))linphone_participant_device_unref); } BC_ASSERT_STRING_EQUAL(linphone_conference_get_subject(pconference), initialSubject); - LinphoneParticipant *me = linphone_conference_get_me(pconference); - BC_ASSERT_TRUE(linphone_participant_is_admin(me) == - ((mgr == marie.getCMgr()) || (mgr == focus.getCMgr()))); - BC_ASSERT_TRUE(linphone_address_weak_equal(linphone_participant_get_address(me), mgr->identity)); + check_conference_me(pconference, ((mgr == marie.getCMgr()) || (mgr == focus.getCMgr()))); bctbx_list_t *participants = linphone_conference_get_participant_list(pconference); for (bctbx_list_t *itp = participants; itp; itp = bctbx_list_next(itp)) { LinphoneParticipant *p = (LinphoneParticipant *)bctbx_list_get_data(itp); @@ -10884,10 +10897,7 @@ void create_conference_with_active_call_base(bool_t dialout) { bctbx_list_free_with_data(devices, (void (*)(void *))linphone_participant_device_unref); } BC_ASSERT_STRING_EQUAL(linphone_conference_get_subject(pconference), initialSubject); - LinphoneParticipant *me = linphone_conference_get_me(pconference); - BC_ASSERT_TRUE(linphone_participant_is_admin(me) == - ((mgr == marie.getCMgr()) || (mgr == focus.getCMgr()))); - BC_ASSERT_TRUE(linphone_address_weak_equal(linphone_participant_get_address(me), mgr->identity)); + check_conference_me(pconference, ((mgr == marie.getCMgr()) || (mgr == focus.getCMgr()))); bctbx_list_t *participants = linphone_conference_get_participant_list(pconference); for (bctbx_list_t *itp = participants; itp; itp = bctbx_list_next(itp)) { LinphoneParticipant *p = (LinphoneParticipant *)bctbx_list_get_data(itp); @@ -12369,10 +12379,7 @@ void create_conference_dial_out_base(LinphoneConferenceLayout layout, bctbx_list_free_with_data(devices, (void (*)(void *))linphone_participant_device_unref); } BC_ASSERT_STRING_EQUAL(linphone_conference_get_subject(pconference), initialSubject); - LinphoneParticipant *me = linphone_conference_get_me(pconference); - BC_ASSERT_TRUE(linphone_participant_is_admin(me) == - ((mgr == marie.getCMgr()) || (mgr == focus.getCMgr()))); - BC_ASSERT_TRUE(linphone_address_weak_equal(linphone_participant_get_address(me), mgr->identity)); + check_conference_me(pconference, ((mgr == marie.getCMgr()) || (mgr == focus.getCMgr()))); bctbx_list_t *participants = linphone_conference_get_participant_list(pconference); for (bctbx_list_t *itp = participants; itp; itp = bctbx_list_next(itp)) { LinphoneParticipant *p = (LinphoneParticipant *)bctbx_list_get_data(itp); @@ -12930,10 +12937,7 @@ void create_conference_with_audio_only_participants_base(LinphoneConferenceSecur } BC_ASSERT_EQUAL(linphone_conference_get_participant_count(pconference), no_participants, int, "%0d"); BC_ASSERT_STRING_EQUAL(linphone_conference_get_subject(pconference), initialSubject); - LinphoneParticipant *me = linphone_conference_get_me(pconference); - BC_ASSERT_TRUE(linphone_participant_is_admin(me) == - ((mgr == marie.getCMgr()) || (mgr == focus.getCMgr()))); - BC_ASSERT_TRUE(linphone_address_weak_equal(linphone_participant_get_address(me), mgr->identity)); + check_conference_me(pconference, ((mgr == marie.getCMgr()) || (mgr == focus.getCMgr()))); bctbx_list_t *participants = linphone_conference_get_participant_list(pconference); for (bctbx_list_t *itp = participants; itp; itp = bctbx_list_next(itp)) { LinphoneParticipant *p = (LinphoneParticipant *)bctbx_list_get_data(itp); @@ -13088,10 +13092,7 @@ void create_conference_with_audio_only_participants_base(LinphoneConferenceSecur } BC_ASSERT_EQUAL(linphone_conference_get_participant_count(pconference), no_participants, int, "%0d"); BC_ASSERT_STRING_EQUAL(linphone_conference_get_subject(pconference), initialSubject); - LinphoneParticipant *me = linphone_conference_get_me(pconference); - BC_ASSERT_TRUE(linphone_participant_is_admin(me) == - ((mgr == marie.getCMgr()) || (mgr == focus.getCMgr()))); - BC_ASSERT_TRUE(linphone_address_weak_equal(linphone_participant_get_address(me), mgr->identity)); + check_conference_me(pconference, ((mgr == marie.getCMgr()) || (mgr == focus.getCMgr()))); bctbx_list_t *participants = linphone_conference_get_participant_list(pconference); for (bctbx_list_t *itp = participants; itp; itp = bctbx_list_next(itp)) { LinphoneParticipant *p = (LinphoneParticipant *)bctbx_list_get_data(itp); @@ -13641,10 +13642,7 @@ void create_simple_conference_dial_out_with_some_calls_declined_base(LinphoneRea } } BC_ASSERT_STRING_EQUAL(linphone_conference_get_subject(pconference), initialSubject); - LinphoneParticipant *me = linphone_conference_get_me(pconference); - BC_ASSERT_TRUE(linphone_participant_is_admin(me) == - ((mgr == marie.getCMgr()) || (mgr == focus.getCMgr()))); - BC_ASSERT_TRUE(linphone_address_weak_equal(linphone_participant_get_address(me), mgr->identity)); + check_conference_me(pconference, ((mgr == marie.getCMgr()) || (mgr == focus.getCMgr()))); bctbx_list_t *participants_list = linphone_conference_get_participant_list(pconference); if (reason == LinphoneReasonBusy) { no_participants += declining_participants.size(); @@ -14097,10 +14095,7 @@ void change_active_speaker_base(bool transfer_mode) { bctbx_list_free_with_data(devices, (void (*)(void *))linphone_participant_device_unref); } BC_ASSERT_STRING_EQUAL(linphone_conference_get_subject(pconference), initialSubject); - LinphoneParticipant *me = linphone_conference_get_me(pconference); - BC_ASSERT_TRUE(linphone_participant_is_admin(me) == - ((mgr == marie.getCMgr()) || (mgr == focus.getCMgr()))); - BC_ASSERT_TRUE(linphone_address_weak_equal(linphone_participant_get_address(me), mgr->identity)); + check_conference_me(pconference, ((mgr == marie.getCMgr()) || (mgr == focus.getCMgr()))); bctbx_list_t *participants = linphone_conference_get_participant_list(pconference); for (bctbx_list_t *itp = participants; itp; itp = bctbx_list_next(itp)) { LinphoneParticipant *p = (LinphoneParticipant *)bctbx_list_get_data(itp); diff --git a/tester/local-conference-tester-functions.h b/tester/local-conference-tester-functions.h index 57792b8cb86b3f4b13ae7a5b1ab36ce9f7a3c674..a18290ce8861c593c7ecd351967ca89aaeec8023 100644 --- a/tester/local-conference-tester-functions.h +++ b/tester/local-conference-tester-functions.h @@ -250,15 +250,18 @@ private: linphone_core_enable_rtp_bundle(getLc(), TRUE); linphone_core_set_conference_cleanup_period(getLc(), 1); - LinphoneAccount *account = linphone_core_get_default_account(getLc()); - const LinphoneAccountParams *account_params = linphone_account_get_params(account); - LinphoneAccountParams *new_account_params = linphone_account_params_clone(account_params); - linphone_account_params_enable_rtp_bundle(new_account_params, TRUE); - Address factoryAddress = getIdentity(); - linphone_account_params_set_conference_factory_address(new_account_params, factoryAddress.toC()); - linphone_account_set_params(account, new_account_params); - linphone_account_params_unref(new_account_params); - BC_ASSERT_TRUE(linphone_account_params_rtp_bundle_enabled(linphone_account_get_params(account))); + const bctbx_list_t *accounts = linphone_core_get_account_list(getLc()); + for (const bctbx_list_t *account_it = accounts; account_it != NULL; account_it = account_it->next) { + LinphoneAccount *account = (LinphoneAccount *)(bctbx_list_get_data(account_it)); + const LinphoneAccountParams *account_params = linphone_account_get_params(account); + LinphoneAccountParams *new_account_params = linphone_account_params_clone(account_params); + linphone_account_params_enable_rtp_bundle(new_account_params, TRUE); + linphone_account_params_set_conference_factory_address( + new_account_params, linphone_account_params_get_identity_address(account_params)); + linphone_account_set_params(account, new_account_params); + linphone_account_params_unref(new_account_params); + BC_ASSERT_TRUE(linphone_account_params_rtp_bundle_enabled(linphone_account_get_params(account))); + } linphone_core_cbs_set_subscription_state_changed(cbs, linphone_subscription_state_change); linphone_core_cbs_set_chat_room_state_changed(cbs, server_core_chat_room_state_changed); @@ -404,6 +407,8 @@ void create_one_participant_conference_toggle_video_base(LinphoneConferenceLayou void create_conference_with_active_call_base(bool_t is_dialout); +void check_conference_me(LinphoneConference *conference, bool_t is_me); + LinphoneAddress * create_conference_on_server(Focus &focus, ClientConference &organizer, diff --git a/tester/local-ice-conference-tester.cpp b/tester/local-ice-conference-tester.cpp index fff3ebe3fc8e70310010305a82b88ea150282d85..d51c1fd8c40124480cd4c0b597ba539ed334f95f 100644 --- a/tester/local-ice-conference-tester.cpp +++ b/tester/local-ice-conference-tester.cpp @@ -344,10 +344,7 @@ static void abort_call_to_ice_conference(void) { bctbx_list_free_with_data(devices, (void (*)(void *))linphone_participant_device_unref); } BC_ASSERT_STRING_EQUAL(linphone_conference_get_subject(pconference), initialSubject); - LinphoneParticipant *me = linphone_conference_get_me(pconference); - BC_ASSERT_TRUE(linphone_participant_is_admin(me) == - ((mgr == marie.getCMgr()) || (mgr == focus.getCMgr()))); - BC_ASSERT_TRUE(linphone_address_weak_equal(linphone_participant_get_address(me), mgr->identity)); + check_conference_me(pconference, ((mgr == marie.getCMgr()) || (mgr == focus.getCMgr()))); bctbx_list_t *participants = linphone_conference_get_participant_list(pconference); for (bctbx_list_t *itp = participants; itp; itp = bctbx_list_next(itp)) { LinphoneParticipant *p = (LinphoneParticipant *)bctbx_list_get_data(itp); diff --git a/tester/local-impromptu-conference-tester.cpp b/tester/local-impromptu-conference-tester.cpp index 47536c26aef2a3db259e770e81590a450ebcf130..7a8c12cdca7cd893fbeaea8b5ecbaa1cafe19bc7 100644 --- a/tester/local-impromptu-conference-tester.cpp +++ b/tester/local-impromptu-conference-tester.cpp @@ -772,10 +772,7 @@ static void create_conference_dial_out_with_video_activation_and_layout_change(v bctbx_list_free_with_data(devices, (void (*)(void *))linphone_participant_device_unref); } BC_ASSERT_STRING_EQUAL(linphone_conference_get_subject(pconference), initialSubject); - LinphoneParticipant *me = linphone_conference_get_me(pconference); - BC_ASSERT_TRUE(linphone_participant_is_admin(me) == - ((mgr == marie.getCMgr()) || (mgr == focus.getCMgr()))); - BC_ASSERT_TRUE(linphone_address_weak_equal(linphone_participant_get_address(me), mgr->identity)); + check_conference_me(pconference, ((mgr == marie.getCMgr()) || (mgr == focus.getCMgr()))); bctbx_list_t *participants = linphone_conference_get_participant_list(pconference); for (bctbx_list_t *itp = participants; itp; itp = bctbx_list_next(itp)) { LinphoneParticipant *p = (LinphoneParticipant *)bctbx_list_get_data(itp); diff --git a/tester/local-scheduled-conference-tester.cpp b/tester/local-scheduled-conference-tester.cpp index 3dc702ba51e78db8f33bc30a1d0966bf34089d20..e6fb504dce159824b9d4f65600ea4c8aee973d29 100644 --- a/tester/local-scheduled-conference-tester.cpp +++ b/tester/local-scheduled-conference-tester.cpp @@ -3971,10 +3971,7 @@ static void create_conference_with_codec_mismatch_base(bool_t organizer_codec_mi } BC_ASSERT_EQUAL(linphone_conference_get_participant_count(pconference), no_participants, int, "%0d"); BC_ASSERT_STRING_EQUAL(linphone_conference_get_subject(pconference), initialSubject); - LinphoneParticipant *me = linphone_conference_get_me(pconference); - BC_ASSERT_TRUE(linphone_participant_is_admin(me) == - ((mgr == marie.getCMgr()) || (mgr == focus.getCMgr()))); - BC_ASSERT_TRUE(linphone_address_weak_equal(linphone_participant_get_address(me), mgr->identity)); + check_conference_me(pconference, ((mgr == marie.getCMgr()) || (mgr == focus.getCMgr()))); bctbx_list_t *participants = linphone_conference_get_participant_list(pconference); for (bctbx_list_t *itp = participants; itp; itp = bctbx_list_next(itp)) { LinphoneParticipant *p = (LinphoneParticipant *)bctbx_list_get_data(itp); @@ -4330,10 +4327,7 @@ static void create_conference_with_server_restart_base(bool_t organizer_first) { } BC_ASSERT_EQUAL(linphone_conference_get_participant_count(pconference), no_participants, int, "%0d"); BC_ASSERT_STRING_EQUAL(linphone_conference_get_subject(pconference), initialSubject); - LinphoneParticipant *me = linphone_conference_get_me(pconference); - BC_ASSERT_TRUE(linphone_participant_is_admin(me) == - ((mgr == marie.getCMgr()) || (mgr == focus.getCMgr()))); - BC_ASSERT_TRUE(linphone_address_weak_equal(linphone_participant_get_address(me), mgr->identity)); + check_conference_me(pconference, ((mgr == marie.getCMgr()) || (mgr == focus.getCMgr()))); bctbx_list_t *participants = linphone_conference_get_participant_list(pconference); for (bctbx_list_t *itp = participants; itp; itp = bctbx_list_next(itp)) { LinphoneParticipant *p = (LinphoneParticipant *)bctbx_list_get_data(itp); @@ -4634,10 +4628,7 @@ static void create_simple_conference_with_update_deferred(void) { bctbx_list_free_with_data(devices, (void (*)(void *))linphone_participant_device_unref); } BC_ASSERT_STRING_EQUAL(linphone_conference_get_subject(pconference), initialSubject); - LinphoneParticipant *me = linphone_conference_get_me(pconference); - BC_ASSERT_TRUE(linphone_participant_is_admin(me) == - ((mgr == marie.getCMgr()) || (mgr == focus.getCMgr()))); - BC_ASSERT_TRUE(linphone_address_weak_equal(linphone_participant_get_address(me), mgr->identity)); + check_conference_me(pconference, ((mgr == marie.getCMgr()) || (mgr == focus.getCMgr()))); bctbx_list_t *participants = linphone_conference_get_participant_list(pconference); for (bctbx_list_t *itp = participants; itp; itp = bctbx_list_next(itp)) { LinphoneParticipant *p = (LinphoneParticipant *)bctbx_list_get_data(itp); @@ -5992,10 +5983,7 @@ static void create_simple_conference_in_sfu_payload_mode(void) { } BC_ASSERT_EQUAL(linphone_conference_get_participant_count(pconference), no_participants, int, "%0d"); BC_ASSERT_STRING_EQUAL(linphone_conference_get_subject(pconference), initialSubject); - LinphoneParticipant *me = linphone_conference_get_me(pconference); - BC_ASSERT_TRUE(linphone_participant_is_admin(me) == - ((mgr == marie.getCMgr()) || (mgr == focus.getCMgr()))); - BC_ASSERT_TRUE(linphone_address_weak_equal(linphone_participant_get_address(me), mgr->identity)); + check_conference_me(pconference, ((mgr == marie.getCMgr()) || (mgr == focus.getCMgr()))); bctbx_list_t *participants = linphone_conference_get_participant_list(pconference); for (bctbx_list_t *itp = participants; itp; itp = bctbx_list_next(itp)) { auto p = (LinphoneParticipant *)bctbx_list_get_data(itp); diff --git a/tester/local-transferred-conference-tester.cpp b/tester/local-transferred-conference-tester.cpp index cbe2ea252f0d51c16cbd8977821a58317e84316b..28779a0abae83651cd0ad2614b9149426647ff05 100644 --- a/tester/local-transferred-conference-tester.cpp +++ b/tester/local-transferred-conference-tester.cpp @@ -331,10 +331,7 @@ void create_transfer_conference_base(time_t start_time, } BC_ASSERT_EQUAL(linphone_conference_get_participant_count(pconference), no_participants, int, "%0d"); BC_ASSERT_STRING_EQUAL(linphone_conference_get_subject(pconference), initialSubject); - LinphoneParticipant *me = linphone_conference_get_me(pconference); - BC_ASSERT_TRUE(linphone_participant_is_admin(me) == - ((mgr == marie.getCMgr()) || (mgr == focus.getCMgr()))); - BC_ASSERT_TRUE(linphone_address_weak_equal(linphone_participant_get_address(me), mgr->identity)); + check_conference_me(pconference, ((mgr == marie.getCMgr()) || (mgr == focus.getCMgr()))); bctbx_list_t *participants = linphone_conference_get_participant_list(pconference); for (bctbx_list_t *itp = participants; itp; itp = bctbx_list_next(itp)) { LinphoneParticipant *p = (LinphoneParticipant *)bctbx_list_get_data(itp); diff --git a/tester/rcfiles/chloe_dual_proxy_rc b/tester/rcfiles/chloe_dual_proxy_rc new file mode 100644 index 0000000000000000000000000000000000000000..f6b5bfc335090b04e17b48cd50a94376470654c5 --- /dev/null +++ b/tester/rcfiles/chloe_dual_proxy_rc @@ -0,0 +1,64 @@ +[sip] +sip_port=-1 +sip_tcp_port=-1 +sip_tls_port=-1 +default_proxy=0 +ping_with_options=0 +composing_idle_timeout=1 + +[auth_info_0] +username=chloe +userid=chloe +passwd=secret +realm=sip.example.org + +[proxy_0] +reg_proxy=<sip:sip.example.org;transport=tls> +reg_route=<sip:sip.example.org;transport=tls> +reg_identity=sip:chloe@sip.example.org +reg_expires=3600 +reg_sendregister=1 +publish=0 +dial_escape_plus=0 + +[proxy_1] +reg_proxy=<sip:sip.example.org;transport=tls> +reg_route=<sip:sip.example.org;transport=tls> +reg_identity=sip:chloe2@sip.example.org +reg_expires=3600 +reg_sendregister=1 +publish=0 +dial_escape_plus=0 + +[rtp] +audio_rtp_port=-1--1 +video_rtp_port=-1--1 +text_rtp_port=-1--1 + +[video] +display=0 +capture=0 +show_local=0 +size=qcif +enabled=0 +self_view=0 +automatically_initiate=0 +automatically_accept=0 +device=StaticImage: Static picture + +[sound] +echocancellation=0 #to not overload cpu in case of VG + +[net] + +stun_server=stun.example.org + +[storage] +#this will explicitely request to not use database. We need this for a few tests where multiple cores are instanciated, so that they don't +#try to connect to the same default sqlite3 database. +uri=null +call_logs_db_uri=null +zrtp_secrets_db_uri=null + +[tester] +test_env=1