"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tester/call_single_tester.c" between
liblinphone-4.5.0.tar.gz and liblinphone-4.5.1.tar.gz

About: Linphone is a cross-platform high-level VoIP library implementing all SIP calling and instant messaging (IM) features within a single API.

call_single_tester.c  (liblinphone-4.5.0):call_single_tester.c  (liblinphone-4.5.1)
skipping to change at line 582 skipping to change at line 582
} }
} }
} }
end_call(marie, pauline); end_call(marie, pauline);
wait_for_until(marie->lc, pauline->lc, NULL, 5, 500);// Wait betw een each session to proper ending calls wait_for_until(marie->lc, pauline->lc, NULL, 5, 500);// Wait betw een each session to proper ending calls
} }
linphone_core_manager_destroy(marie); linphone_core_manager_destroy(marie);
linphone_core_manager_destroy(pauline); linphone_core_manager_destroy(pauline);
} }
#if 0 /* TODO: activate test when the implementation is ready */
static void multiple_answers_call(void) { static void multiple_answers_call(void) {
/* Scenario is this: pauline calls marie, which is registered 2 times. /* Scenario is this: pauline calls marie, which is registered 2 times.
Both linphones answer at the same time, and only one should get the Both linphones answer at the same time, and only one should get the
call running, the other should be terminated */ call running, the other should be terminated */
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_rc" ); LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_rc" );
LinphoneCoreManager* marie1 = linphone_core_manager_new( "marie_rc" ); LinphoneCoreManager* marie1 = linphone_core_manager_new( "marie_rc" );
LinphoneCoreManager* marie2 = linphone_core_manager_new( "marie_rc" ); LinphoneCoreManager* marie2 = linphone_core_manager_new( "marie_rc" );
LinphoneCall* call1, *call2; LinphoneCall* call1, *call2;
bctbx_list_t* lcs = bctbx_list_append(NULL,pauline->lc); bctbx_list_t* lcs = bctbx_list_append(NULL,pauline->lc);
lcs = bctbx_list_append(lcs,marie1->lc); lcs = bctbx_list_append(lcs,marie1->lc);
lcs = bctbx_list_append(lcs,marie2->lc); lcs = bctbx_list_append(lcs,marie2->lc);
BC_ASSERT_TRUE(wait_for_until(pauline->lc, NULL, &pauline->stat.number_of
_LinphoneRegistrationOk, 1, 2000));
BC_ASSERT_PTR_NOT_NULL( linphone_core_invite_address(pauline->lc, marie1- >identity ) ); BC_ASSERT_PTR_NOT_NULL( linphone_core_invite_address(pauline->lc, marie1- >identity ) );
BC_ASSERT_TRUE(wait_for_list(lcs,&marie1->stat.number_of_LinphoneCallInco BC_ASSERT_TRUE(wait_for_list(lcs,&marie1->stat.number_of_LinphoneCallInco
mingReceived, 1, 2000)); mingReceived, 1, 10000));
BC_ASSERT_TRUE(wait_for_list(lcs,&marie2->stat.number_of_LinphoneCallInco BC_ASSERT_TRUE(wait_for_list(lcs,&marie2->stat.number_of_LinphoneCallInco
mingReceived, 1, 2000)); mingReceived, 1, 10000));
BC_ASSERT_TRUE(wait_for_list(lcs,&pauline->stat.number_of_LinphoneCallOut BC_ASSERT_TRUE(wait_for_list(lcs,&pauline->stat.number_of_LinphoneCallOut
goingProgress, 1, 2000)); goingProgress, 1, 5000));
// marie 1 and 2 answer at the same time // marie 1 and 2 answer at the same time
call1 = linphone_core_get_current_call(marie1->lc); call1 = linphone_core_get_current_call(marie1->lc);
call2 = linphone_core_get_current_call(marie2->lc); call2 = linphone_core_get_current_call(marie2->lc);
BC_ASSERT_PTR_NOT_NULL_FATAL(call1); if (BC_ASSERT_PTR_NOT_NULL(call1) && BC_ASSERT_PTR_NOT_NULL(call2)) {
BC_ASSERT_PTR_NOT_NULL_FATAL(call2); BC_ASSERT_EQUAL( linphone_call_accept(call1), 0, int, "%d");
ms_sleep(1); /*sleep to make sure that the 200OK of marie1 reache
s the server first*/
BC_ASSERT_EQUAL( linphone_call_accept(call2), 0, int, "%d");
BC_ASSERT_TRUE( wait_for_list(lcs, &pauline->stat.number_of_Linph
oneCallStreamsRunning, 1, 10000) );
BC_ASSERT_TRUE( wait_for_list(lcs, &marie1->stat.number_of_Linpho
neCallStreamsRunning, 1, 10000) );
BC_ASSERT_EQUAL( linphone_core_accept_call(marie1->lc, call1), 0, int, "% /*Pauline will send a bye to marie2, as its 200Ok arrived second*
d"); /
BC_ASSERT_EQUAL( linphone_core_accept_call(marie2->lc, call2), 0, int, "% BC_ASSERT_TRUE( wait_for_list(lcs, &marie2->stat.number_of_Linpho
d"); neCallEnd, 1, 10000) );
BC_ASSERT_TRUE( wait_for_list(lcs, &marie2->stat.number_of_Linpho
neCallReleased, 1, 10000) );
BC_ASSERT_TRUE( wait_for_list(lcs, &pauline->stat.number_of_LinphoneCallS liblinphone_tester_check_rtcp(pauline, marie1);
treamsRunning, 1, 2000) );
BC_ASSERT_TRUE( wait_for_list(lcs, &marie1->stat.number_of_LinphoneCallSt end_call(marie1, pauline);
reamsRunning, 1, 2000) ); }
BC_ASSERT_TRUE( wait_for_list(lcs, &marie2->stat.number_of_LinphoneCallEn
d, 1, 2000) );
linphone_core_manager_destroy(pauline); linphone_core_manager_destroy(pauline);
linphone_core_manager_destroy(marie1); linphone_core_manager_destroy(marie1);
linphone_core_manager_destroy(marie2); linphone_core_manager_destroy(marie2);
bctbx_list_free(lcs);
} }
#endif
static void multiple_answers_call_with_media_relay(void) { static void multiple_answers_call_with_media_relay(void) {
/* Scenario is this: pauline calls marie, which is registered 2 times. /* Scenario is this: pauline calls marie, which is registered 2 times.
* Both linphones answer at the same time, and only one should get the * Both linphones answer at the same time, and only one should get the
* call running, the other should be terminated */ * call running, the other should be terminated.
* In this test, the server is expected to send ACK-BYE, unlike in multi
ple_answers_call()*/
LinphoneCoreManager* pauline = linphone_core_manager_new2( "pauline_tcp_r c", FALSE); LinphoneCoreManager* pauline = linphone_core_manager_new2( "pauline_tcp_r c", FALSE);
LinphoneCoreManager* marie1 = linphone_core_manager_new2( "marie_rc", FA LSE); LinphoneCoreManager* marie1 = linphone_core_manager_new2( "marie_rc", FA LSE);
LinphoneCoreManager* marie2 = linphone_core_manager_new2( "marie_rc", FA LSE ); LinphoneCoreManager* marie2 = linphone_core_manager_new2( "marie_rc", FA LSE );
/* This tests a feature of the proxy (nta_msg_ackbye()) that doesn't work with gruu. /* This tests a feature of the proxy (nta_msg_ackbye()) that doesn't work with gruu.
* Actually nta_msg_ackbye() is deprecated because it is not the task of the proxy to handle the race conditions of 200 Ok arriving at the same time. * Actually nta_msg_ackbye() is deprecated because it is not the task of the proxy to handle the race conditions of 200 Ok arriving at the same time.
* It is the job of the user-agent, see test multiple_answers_call() abov e. * It is the job of the user-agent, see test multiple_answers_call() abov e.
*/ */
linphone_core_remove_supported_tag(pauline->lc,"gruu"); linphone_core_remove_supported_tag(pauline->lc,"gruu");
linphone_core_remove_supported_tag(marie1->lc,"gruu"); linphone_core_remove_supported_tag(marie1->lc,"gruu");
skipping to change at line 656 skipping to change at line 661
LinphoneCall* call1, *call2; LinphoneCall* call1, *call2;
bctbx_list_t* lcs = bctbx_list_append(NULL,pauline->lc); bctbx_list_t* lcs = bctbx_list_append(NULL,pauline->lc);
lcs = bctbx_list_append(lcs,marie1->lc); lcs = bctbx_list_append(lcs,marie1->lc);
lcs = bctbx_list_append(lcs,marie2->lc); lcs = bctbx_list_append(lcs,marie2->lc);
linphone_core_set_user_agent(pauline->lc, "Natted Linphone", NULL); linphone_core_set_user_agent(pauline->lc, "Natted Linphone", NULL);
linphone_core_set_user_agent(marie1->lc, "Natted Linphone", NULL); linphone_core_set_user_agent(marie1->lc, "Natted Linphone", NULL);
linphone_core_set_user_agent(marie2->lc, "Natted Linphone", NULL); linphone_core_set_user_agent(marie2->lc, "Natted Linphone", NULL);
BC_ASSERT_TRUE(wait_for_until(pauline->lc, NULL, &pauline->stat.number_of
_LinphoneRegistrationOk, 1, 2000));
BC_ASSERT_PTR_NOT_NULL( linphone_core_invite_address(pauline->lc, marie1- >identity ) ); BC_ASSERT_PTR_NOT_NULL( linphone_core_invite_address(pauline->lc, marie1- >identity ) );
BC_ASSERT_TRUE(wait_for_list(lcs,&marie1->stat.number_of_LinphoneCallInco BC_ASSERT_TRUE(wait_for_list(lcs,&marie1->stat.number_of_LinphoneCallInco
mingReceived, 1, 2000)); mingReceived, 1, 10000));
BC_ASSERT_TRUE(wait_for_list(lcs,&marie2->stat.number_of_LinphoneCallInco BC_ASSERT_TRUE(wait_for_list(lcs,&marie2->stat.number_of_LinphoneCallInco
mingReceived, 1, 2000)); mingReceived, 1, 10000));
BC_ASSERT_TRUE(wait_for_list(lcs,&pauline->stat.number_of_LinphoneCallOut goingProgress, 1, 2000)); BC_ASSERT_TRUE(wait_for_list(lcs,&pauline->stat.number_of_LinphoneCallOut goingProgress, 1, 2000));
// marie 1 and 2 answer at the same time // marie 1 and 2 answer at the same time
call1 = linphone_core_get_current_call(marie1->lc); call1 = linphone_core_get_current_call(marie1->lc);
call2 = linphone_core_get_current_call(marie2->lc); call2 = linphone_core_get_current_call(marie2->lc);
if (BC_ASSERT_PTR_NOT_NULL(call1) && BC_ASSERT_PTR_NOT_NULL(call2)) { if (BC_ASSERT_PTR_NOT_NULL(call1) && BC_ASSERT_PTR_NOT_NULL(call2)) {
BC_ASSERT_EQUAL( linphone_call_accept(call1), 0, int, "%d"); BC_ASSERT_EQUAL( linphone_call_accept(call1), 0, int, "%d");
ms_sleep(1); /*sleep to make sure that the 200OK of marie1 reache s the server first*/ ms_sleep(1); /*sleep to make sure that the 200OK of marie1 reache s the server first*/
BC_ASSERT_EQUAL( linphone_call_accept(call2), 0, int, "%d"); BC_ASSERT_EQUAL( linphone_call_accept(call2), 0, int, "%d");
BC_ASSERT_TRUE( wait_for_list(lcs, &pauline->stat.number_of_Linph BC_ASSERT_TRUE( wait_for_list(lcs, &pauline->stat.number_of_Linph
oneCallStreamsRunning, 1, 2000) ); oneCallStreamsRunning, 1, 10000) );
BC_ASSERT_TRUE( wait_for_list(lcs, &marie1->stat.number_of_Linpho BC_ASSERT_TRUE( wait_for_list(lcs, &marie1->stat.number_of_Linpho
neCallStreamsRunning, 1, 2000) ); neCallStreamsRunning, 1, 10000) );
/*the server will send a bye to marie2, as is 200Ok arrived secon d*/ /*the server will send a bye to marie2, as is 200Ok arrived secon d*/
BC_ASSERT_TRUE( wait_for_list(lcs, &marie2->stat.number_of_Linpho neCallEnd, 1, 4000) ); BC_ASSERT_TRUE( wait_for_list(lcs, &marie2->stat.number_of_Linpho neCallEnd, 1, 10000) );
end_call(marie1, pauline); end_call(marie1, pauline);
} }
linphone_core_manager_destroy(pauline); linphone_core_manager_destroy(pauline);
linphone_core_manager_destroy(marie1); linphone_core_manager_destroy(marie1);
linphone_core_manager_destroy(marie2); linphone_core_manager_destroy(marie2);
bctbx_list_free(lcs); bctbx_list_free(lcs);
} }
skipping to change at line 5212 skipping to change at line 5215
TEST_NO_TAG("Call with http proxy", call_with_http_proxy), TEST_NO_TAG("Call with http proxy", call_with_http_proxy),
TEST_NO_TAG("Call with timed-out bye", call_with_timed_out_bye), TEST_NO_TAG("Call with timed-out bye", call_with_timed_out_bye),
TEST_NO_TAG("Direct call over IPv6", direct_call_over_ipv6), TEST_NO_TAG("Direct call over IPv6", direct_call_over_ipv6),
TEST_NO_TAG("Direct call well known port", direct_call_well_known_port_ip v4), TEST_NO_TAG("Direct call well known port", direct_call_well_known_port_ip v4),
TEST_NO_TAG("Direct call well known port ipv6", direct_call_well_known_po rt_ipv6), TEST_NO_TAG("Direct call well known port ipv6", direct_call_well_known_po rt_ipv6),
TEST_NO_TAG("Call IPv6 to IPv4 without relay", v6_to_v4_call_without_rela y), TEST_NO_TAG("Call IPv6 to IPv4 without relay", v6_to_v4_call_without_rela y),
TEST_NO_TAG("IPv6 call over NAT64", v6_call_over_nat_64), TEST_NO_TAG("IPv6 call over NAT64", v6_call_over_nat_64),
TEST_NO_TAG("Outbound call with multiple proxy possible", call_outbound_w ith_multiple_proxy), TEST_NO_TAG("Outbound call with multiple proxy possible", call_outbound_w ith_multiple_proxy),
TEST_NO_TAG("Outbound call using different proxies", call_outbound_using_ different_proxies), TEST_NO_TAG("Outbound call using different proxies", call_outbound_using_ different_proxies),
TEST_NO_TAG("Audio call recording", audio_call_recording_test), TEST_NO_TAG("Audio call recording", audio_call_recording_test),
#if 0 // not yet activated because not implemented
TEST_NO_TAG("Multiple answers to a call", multiple_answers_call), TEST_NO_TAG("Multiple answers to a call", multiple_answers_call),
#endif
TEST_NO_TAG("Multiple answers to a call with media relay", multiple_answe rs_call_with_media_relay), TEST_NO_TAG("Multiple answers to a call with media relay", multiple_answe rs_call_with_media_relay),
TEST_NO_TAG("Call with media relay", call_with_media_relay), TEST_NO_TAG("Call with media relay", call_with_media_relay),
TEST_NO_TAG("Call with media relay (random ports)", call_with_media_relay _random_ports), TEST_NO_TAG("Call with media relay (random ports)", call_with_media_relay _random_ports),
TEST_NO_TAG("Simple call compatibility mode", simple_call_compatibility_m ode), TEST_NO_TAG("Simple call compatibility mode", simple_call_compatibility_m ode),
TEST_NO_TAG("Early-media call", early_media_call), TEST_NO_TAG("Early-media call", early_media_call),
TEST_NO_TAG("Early-media call with ringing", early_media_call_with_ringin g), TEST_NO_TAG("Early-media call with ringing", early_media_call_with_ringin g),
TEST_NO_TAG("Early-media call with ringing and network changing", early_m edia_call_with_ringing_and_network_changing), TEST_NO_TAG("Early-media call with ringing and network changing", early_m edia_call_with_ringing_and_network_changing),
TEST_NO_TAG("Early-media call with updated media session", early_media_ca ll_with_session_update), TEST_NO_TAG("Early-media call with updated media session", early_media_ca ll_with_session_update),
TEST_NO_TAG("Early-media call with updated codec", early_media_call_with_ codec_update), TEST_NO_TAG("Early-media call with updated codec", early_media_call_with_ codec_update),
TEST_NO_TAG("Call terminated by caller", call_terminated_by_caller), TEST_NO_TAG("Call terminated by caller", call_terminated_by_caller),
 End of changes. 15 change blocks. 
38 lines changed or deleted 39 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)