From 35cd2665b787dd9f5400d94ae9267a6430c4f5af Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Mon, 9 Jun 2014 14:06:13 +0200 Subject: [PATCH] enhance multiple early media forking test to check that dialogs are ok --- coreapi/bellesip_sal/sal_op_call_transfer.c | 6 +++--- tester/call_tester.c | 10 ++++++++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/coreapi/bellesip_sal/sal_op_call_transfer.c b/coreapi/bellesip_sal/sal_op_call_transfer.c index 796966acd..5958c8745 100644 --- a/coreapi/bellesip_sal/sal_op_call_transfer.c +++ b/coreapi/bellesip_sal/sal_op_call_transfer.c @@ -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); diff --git a/tester/call_tester.c b/tester/call_tester.c index b5feb834e..7418cbba0 100644 --- a/tester/call_tester.c +++ b/tester/call_tester.c @@ -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);