diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c
index 66334ea0f4e3022a7ac8062f6d6bb324dbcf2151..afdcf01b3b2773e90ab7816c907fb83cc33714da 100644
--- a/coreapi/linphonecore.c
+++ b/coreapi/linphonecore.c
@@ -4311,7 +4311,9 @@ void linphone_core_stop_dtmf_stream(LinphoneCore* lc) {
 int linphone_core_get_max_calls(LinphoneCore *lc) {
 	return lc->max_calls;
 }
-
+void linphone_core_set_max_calls(LinphoneCore *lc, int max) {
+	lc->max_calls=max;
+}
 
 typedef struct Hook{
 	LinphoneCoreIterateHook fun;
diff --git a/coreapi/linphonecore.h b/coreapi/linphonecore.h
index 0f49a4593e561decd055992ab718fc1d9a404971..245bd899b18367965c1955d910bf1ebba337270c 100644
--- a/coreapi/linphonecore.h
+++ b/coreapi/linphonecore.h
@@ -1031,6 +1031,8 @@ int linphone_core_terminate_conference(LinphoneCore *lc);
 int linphone_core_get_conference_size(LinphoneCore *lc);
 
 int linphone_core_get_max_calls(LinphoneCore *lc);
+void linphone_core_set_max_calls(LinphoneCore *lc, int max);
+
 bool_t linphone_core_sound_resources_locked(LinphoneCore *lc);
 
 #ifdef __cplusplus
diff --git a/coreapi/linphonecore_jni.cc b/coreapi/linphonecore_jni.cc
index 6da09ef6b9ae9f549d0deba7c2174b2a1c52d599..fdd035de48114c0862ebf4dbd433590ed853020f 100644
--- a/coreapi/linphonecore_jni.cc
+++ b/coreapi/linphonecore_jni.cc
@@ -1523,3 +1523,6 @@ extern "C" void Java_org_linphone_LinphoneManager_hackSpeakerState(JNIEnv*  env,
 extern "C" jint Java_org_linphone_core_LinphoneCoreImpl_getMaxCalls(JNIEnv *env,jobject thiz,jlong pCore) {
 	return (jint) linphone_core_get_max_calls((LinphoneCore *) pCore);
 }
+extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setMaxCalls(JNIEnv *env,jobject thiz,jlong pCore, jint max) {
+	linphone_core_set_max_calls((LinphoneCore *) pCore, (int) max);
+}
diff --git a/java/common/org/linphone/core/LinphoneCore.java b/java/common/org/linphone/core/LinphoneCore.java
index fcd041dc8a6c5745fef27c0abd5d7ce0aee72f0b..249dff5587774f8860fe9160fa6caf34926f5a87 100644
--- a/java/common/org/linphone/core/LinphoneCore.java
+++ b/java/common/org/linphone/core/LinphoneCore.java
@@ -623,6 +623,7 @@ public interface LinphoneCore {
 	LinphoneCall findCallFromUri(String uri);
 
 	int getMaxCalls();
+	void setMaxCalls(int max);
 	boolean isMyself(String uri);
 
 	/**