diff --git a/tester/CMakeLists.txt b/tester/CMakeLists.txt index b074d56e2..33fc873be 100644 --- a/tester/CMakeLists.txt +++ b/tester/CMakeLists.txt @@ -81,6 +81,7 @@ set(RC_FILES rcfiles/marie_nat64_rc rcfiles/marie_quality_reporting_rc rcfiles/marie_rc + rcfiles/marie2_rc rcfiles/marie_rc_rtcp_xr rcfiles/marie_remote_404_rc rcfiles/marie_remote_default_values_rc diff --git a/tester/Makefile.am b/tester/Makefile.am index 479f5971f..62dbcff2b 100644 --- a/tester/Makefile.am +++ b/tester/Makefile.am @@ -38,6 +38,7 @@ RCFILES = \ rcfiles/marie_h264_rc\ rcfiles/marie_quality_reporting_rc\ rcfiles/marie_rc\ + rcfiles/marie2_rc\ rcfiles/marie_rc_rtcp_xr\ rcfiles/marie_remote_404_rc\ rcfiles/marie_remote_default_values_rc\ diff --git a/tester/flexisip_tester.c b/tester/flexisip_tester.c index 8e94cc012..dbccee2dd 100644 --- a/tester/flexisip_tester.c +++ b/tester/flexisip_tester.c @@ -1168,6 +1168,25 @@ static void test_subscribe_on_wrong_dialog(void) { } #endif +static void publish_subscribe(void) { + LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc"); + LinphoneCoreManager* pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc"); + LinphoneCoreManager* marie2 = NULL; + LinphoneAddress *marie_identity = linphone_address_ref(marie->identity); + + linphone_core_set_network_reachable(marie->lc, FALSE); + linphone_core_manager_destroy(marie); + + linphone_core_invite_address(pauline->lc, marie_identity); + BC_ASSERT_TRUE(wait_for_until(pauline->lc, NULL, &pauline->stat.number_of_LinphoneCallOutgoingProgress, 1, 3000)); + + marie2 = linphone_core_manager_new("marie2_rc"); + BC_ASSERT_TRUE(wait_for_until(marie2->lc, NULL, &marie2->stat.number_of_LinphoneCallIncomingReceived, 1, 3000)); + + linphone_address_unref(marie_identity); + linphone_core_manager_destroy(pauline); + linphone_core_manager_destroy(marie2); +} test_t flexisip_tests[] = { TEST_ONE_TAG("Subscribe forking", subscribe_forking, "LeaksMemory"), @@ -1199,8 +1218,9 @@ test_t flexisip_tests[] = { TEST_ONE_TAG("File transfer message external body to external body client", file_transfer_message_external_body_to_external_body_client, "LeaksMemory"), TEST_NO_TAG("DoS module trigger by sending a lot of chat messages", dos_module_trigger), #if HAVE_SIPP - TEST_NO_TAG("Subscribe on wrong dialog", test_subscribe_on_wrong_dialog) + TEST_NO_TAG("Subscribe on wrong dialog", test_subscribe_on_wrong_dialog), #endif + TEST_NO_TAG("Publish/subscribe", publish_subscribe) }; test_suite_t flexisip_test_suite = {"Flexisip", NULL, NULL, liblinphone_tester_before_each, liblinphone_tester_after_each, diff --git a/tester/rcfiles/marie2_rc b/tester/rcfiles/marie2_rc new file mode 100644 index 000000000..2c3dae8ad --- /dev/null +++ b/tester/rcfiles/marie2_rc @@ -0,0 +1,60 @@ +[sip] +sip_port=-1 +sip_tcp_port=-1 +sip_tls_port=-1 +default_proxy=0 +ping_with_options=0 + +composing_idle_timeout=1 +store_ha1_passwd=0 #used for sipp + +[auth_info_0] +username=marie +userid=marie +passwd=secret +realm=sip.example.org + + +[proxy_0] +reg_proxy=sip.example.org:5070;transport=tcp +reg_route=sip.example.org:5070;transport=tcp;lr +reg_identity="Super Marie" +reg_expires=3600 +reg_sendregister=1 +publish=0 +dial_escape_plus=0 + +[friend_0] +url="Paupoche" +pol=accept +subscribe=0 + + +[rtp] +audio_rtp_port=18070-28000 +video_rtp_port=28070-38000 +text_rtp_port=39000-49000 + +[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] +dns_srv_enabled=0 #no srv needed in general +stun_server=stun.linphone.org + +#leave this section, which is used by "Codec setup" test of "Setup" suite. +[video_codec_0] +mime=VP8 +rate=90000 +enabled=1