diff --git a/include/linphone/call.h b/include/linphone/call.h index 6614fb16d..9cbe17ad1 100644 --- a/include/linphone/call.h +++ b/include/linphone/call.h @@ -203,9 +203,12 @@ LINPHONE_PUBLIC int linphone_call_take_preview_snapshot(LinphoneCall *call, cons **/ LINPHONE_PUBLIC LinphoneReason linphone_call_get_reason(const LinphoneCall *call); + /** * Returns full details about call errors or termination reasons. -**/ + * @param call LinphoneCall object on which we want the information error + * @return LinphoneErrorInfo object holding the reason error. + */ LINPHONE_PUBLIC const LinphoneErrorInfo *linphone_call_get_error_info(const LinphoneCall *call); /** @@ -381,7 +384,8 @@ LINPHONE_PUBLIC int linphone_call_resume(LinphoneCall *call); /** * Terminates a call. - * @param[in] call LinphoneCall object + * @param[in] call LinphoneCall object + * @param[in] ei LinphoneErrorInfo * @return 0 on success, -1 on failure **/ LINPHONE_PUBLIC int linphone_call_terminate_with_error_info(LinphoneCall *call, const LinphoneErrorInfo *ei); diff --git a/include/linphone/error_info.h b/include/linphone/error_info.h index 8336c7ae8..025a18e66 100644 --- a/include/linphone/error_info.h +++ b/include/linphone/error_info.h @@ -112,7 +112,8 @@ LINPHONE_PUBLIC int linphone_error_info_get_protocol_code(const LinphoneErrorInf LINPHONE_PUBLIC void linphone_error_info_set(LinphoneErrorInfo *ei, const char *protocol, LinphoneReason reason, int code, const char *status_string, const char *warning); /** - * [linphone_error_info_set_sub_error_info description] + * Set the sub_ei in LinphoneErrorInfo to another LinphoneErrorInfo. + * Used when there is more than one reason header. * @param[in] ei LinphoneErrorInfo object to which the other LinphoneErrorInfo will be appended as ei->sub_ei. * @param[in] appended_ei LinphoneErrorInfo to append */ diff --git a/tester/call_single_tester.c b/tester/call_single_tester.c index 5acadc44d..a63347a4a 100644 --- a/tester/call_single_tester.c +++ b/tester/call_single_tester.c @@ -1216,13 +1216,13 @@ static void call_declined_with_error(void) { if (in_call) { linphone_call_ref(in_call); linphone_call_decline_with_error(in_call, ei); - // linphone_call_terminate(in_call); BC_ASSERT_TRUE(wait_for(caller_mgr->lc,callee_mgr->lc,&callee_mgr->stat.number_of_LinphoneCallEnd,1)); BC_ASSERT_TRUE(wait_for(callee_mgr->lc,caller_mgr->lc,&caller_mgr->stat.number_of_LinphoneCallEnd,1)); rcvd_ei = linphone_call_get_error_info(out_call); sub_rcvd_ei = linphone_error_info_get_sub(rcvd_ei); + BC_ASSERT_STRING_EQUAL(linphone_error_info_get_phrase(rcvd_ei), "Decline"); BC_ASSERT_STRING_EQUAL(linphone_error_info_get_protocol(rcvd_ei), "SIP"); BC_ASSERT_STRING_EQUAL(linphone_error_info_get_phrase(sub_rcvd_ei), "J'ai plus de batterie");