+/**
+ * Check if we do not have exceed the number of simultaneous call
+ *
+ * @ingroup call_control
+**/
+bool_t linphone_core_can_we_add_call(LinphoneCore *lc)
+{
+ if(linphone_core_get_calls_nb(lc) < NB_MAX_CALLS)
+ return TRUE;
+ return FALSE;
+}
+
+/**
+ * Unset the current call
+ *
+ * @ingroup call_control
+**/
+int linphone_core_unset_the_current_call(LinphoneCore *lc)
+{
+ if(lc->current_call == NULL)
+ return -1;
+ lc->current_call = NULL;
+ ms_message("Current call unset\n");
+ return 0;
+}
+
+/**
+ * Set the call in parameter as the new current call
+ *
+ * @ingroup call_control
+**/
+int linphone_core_set_as_current_call(LinphoneCore *lc, LinphoneCall *call)
+{
+ if(lc->current_call != NULL)
+ return -1;
+ lc->current_call = call;
+ return 0;
+}
+
+/**
+ * Add the call in the LinphoneCall list
+ *
+ * @ingroup call_control
+**/
+int linphone_core_add_call( LinphoneCore *lc, LinphoneCall *call)
+{
+ if(linphone_core_can_we_add_call(lc))
+ {
+ MSList *the_calls = lc->calls;
+ the_calls = ms_list_append(the_calls,(void *)call);
+ lc->calls = the_calls;
+ return 0;
+ }
+ return -1;
+}
+
+/**
+ * Add the call in the LinphoneCall list
+ *
+ * @ingroup call_control
+**/
+int linphone_core_del_call( LinphoneCore *lc, LinphoneCall *call)
+{
+ MSList *it;
+
+ MSList *the_calls = lc->calls;
+ if(call == linphone_core_get_current_call(lc))
+ {
+ linphone_core_unset_the_current_call(lc);
+ }
+ it=ms_list_find(the_calls,call);
+ if (it)
+ {
+ the_calls = ms_list_remove_link(the_calls,it);
+ }
+ else
+ {
+ ms_warning("could not find the call into the list\n");
+ return -1;
+ }
+ lc->calls = the_calls;
+ return 0;
+}