Commit 35cd2665 authored by Simon Morlat's avatar Simon Morlat
Browse files

enhance multiple early media forking test to check that dialogs are ok

parent ae0ca2f3
......@@ -122,9 +122,9 @@ int sal_call_set_referer(SalOp *h, SalOp *refered_call){
SalOp *sal_call_get_replaces(SalOp *op){
if (op && op->replaces){
belle_sip_dialog_t* dialog=belle_sip_provider_find_dialog(op->base.root->prov
,belle_sip_header_replaces_get_call_id(op->replaces)
,belle_sip_header_replaces_get_from_tag(op->replaces)
,belle_sip_header_replaces_get_to_tag(op->replaces));
,belle_sip_header_replaces_get_call_id(op->replaces)
,belle_sip_header_replaces_get_from_tag(op->replaces)
,belle_sip_header_replaces_get_to_tag(op->replaces));
if (dialog) {
return (SalOp*)belle_sip_dialog_get_application_data(dialog);
......
......@@ -2265,6 +2265,7 @@ static void multiple_early_media(void) {
LinphoneCall *marie1_call;
LinphoneCall *marie2_call;
LinphoneCall *pauline_call;
LinphoneInfoMessage *info;
int dummy=0;
char ringbackpath[256];
snprintf(ringbackpath,sizeof(ringbackpath), "%s/sounds/hello8000.wav" /*use hello because rinback is too short*/, liblinphone_tester_file_prefix);
......@@ -2325,9 +2326,14 @@ static void multiple_early_media(void) {
CU_ASSERT_TRUE(linphone_call_get_audio_stats(pauline_call)->download_bandwidth>71);
CU_ASSERT_TRUE(linphone_call_get_audio_stats(marie1_call)->download_bandwidth>71);
/*send an INFO in reverse side to check that dialogs are properly established*/
info=linphone_core_create_info_message(marie1->lc);
linphone_call_send_info_message(marie1_call,info);
CU_ASSERT_TRUE(wait_for_list(lcs,&pauline->stat.number_of_inforeceived,1,2000));
linphone_core_terminate_all_calls(pauline->lc);
CU_ASSERT_TRUE(wait_for_list(lcs,&pauline->stat.number_of_LinphoneCallEnd,1,1000));
CU_ASSERT_TRUE(wait_for_list(lcs,&marie1->stat.number_of_LinphoneCallEnd,1,1000));
CU_ASSERT_TRUE(wait_for_list(lcs,&pauline->stat.number_of_LinphoneCallEnd,1,2000));
CU_ASSERT_TRUE(wait_for_list(lcs,&marie1->stat.number_of_LinphoneCallEnd,1,2000));
ms_list_free(lcs);
linphone_core_manager_destroy(marie1);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment