diff --git a/coreapi/call_log.c b/coreapi/call_log.c index 2bf8d5b9f..a9ecf0149 100644 --- a/coreapi/call_log.c +++ b/coreapi/call_log.c @@ -248,6 +248,10 @@ bool_t linphone_call_log_video_enabled(LinphoneCallLog *cl) { return cl->video_enabled; } +bool_t linphone_call_log_was_conference(LinphoneCallLog *cl) { + return cl->was_conference; +} + /******************************************************************************* * Reference and user data handling functions * diff --git a/coreapi/call_log.h b/coreapi/call_log.h index 6a3ec8dab..8cae77d24 100644 --- a/coreapi/call_log.h +++ b/coreapi/call_log.h @@ -179,6 +179,13 @@ LINPHONE_PUBLIC bool_t linphone_call_log_video_enabled(LinphoneCallLog *cl); **/ LINPHONE_PUBLIC char * linphone_call_log_to_str(LinphoneCallLog *cl); +/** + * Tells whether that call was a call to a conference server + * @param[in] cl #LinphoneCallLog object + * @return TRUE if the call was a call to a conference server + */ +LINPHONE_PUBLIC bool_t linphone_call_log_was_conference(LinphoneCallLog *cl); + /******************************************************************************* * Reference and user data handling functions * diff --git a/coreapi/conference.cc b/coreapi/conference.cc index 72fe4ff4e..121114a64 100644 --- a/coreapi/conference.cc +++ b/coreapi/conference.cc @@ -611,8 +611,10 @@ int RemoteConference::addParticipant(LinphoneCall *call) { m_localParticipantStream = m_focusCall->audiostream; m_pendingCalls = ms_list_append(m_pendingCalls, linphone_call_ref(call)); m_state = ConnectingToFocus; - linphone_address_unref(addr); call->conf_ref = (LinphoneConference *)this; + LinphoneCallLog *callLog = linphone_call_get_call_log(m_focusCall); + callLog->was_conference = TRUE; + linphone_address_unref(addr); linphone_call_params_unref(params); return 0; } else return -1; diff --git a/coreapi/linphonecore_jni.cc b/coreapi/linphonecore_jni.cc index 38e7fa8a2..6212991e6 100644 --- a/coreapi/linphonecore_jni.cc +++ b/coreapi/linphonecore_jni.cc @@ -2790,6 +2790,10 @@ extern "C" jint Java_org_linphone_core_LinphoneCallLogImpl_getCallDuration(JNIEn return (jint)((LinphoneCallLog*)ptr)->duration; } +extern "C" jboolean Java_org_linphone_core_LinphoneCallLogImpl_wasConference(JNIEnv *env, jobject thiz, jlong ptr) { + return linphone_call_log_was_conference((LinphoneCallLog *)ptr); +} + /* CallStats */ extern "C" jint Java_org_linphone_core_LinphoneCallStatsImpl_getMediaType(JNIEnv *env, jobject thiz, jlong stats_ptr) { return (jint)((LinphoneCallStats *)stats_ptr)->type; diff --git a/coreapi/private.h b/coreapi/private.h index 5e63ff151..de115f84f 100644 --- a/coreapi/private.h +++ b/coreapi/private.h @@ -194,6 +194,7 @@ struct _LinphoneCallLog{ char* call_id; /**unique id of a call*/ struct _LinphoneQualityReporting reporting; bool_t video_enabled; + bool_t was_conference; /**