Commit f203f821 authored by Guillaume Beraudo's avatar Guillaume Beraudo
Browse files

Reject incoming calls from people already in call with.

Note that the other call will change state to paused by other.
parent 65dc7621
......@@ -108,6 +108,21 @@ static bool_t is_duplicate_call(LinphoneCore *lc, const LinphoneAddress *from, c
static bool_t already_a_call_with_remote_address(const LinphoneCore *lc, const LinphoneAddress *remote) {
ms_warning(" searching for already_a_call_with_remote_address.");
MSList *elem;
const LinphoneCall *call=(LinphoneCall*)elem->data;
const LinphoneAddress *cRemote=linphone_call_get_remote_address(call);
if (linphone_address_weak_equal(cRemote,remote)) {
ms_warning("already_a_call_with_remote_address found.");
return TRUE;
return FALSE;
static bool_t already_a_call_pending(LinphoneCore *lc){
MSList *elem;
......@@ -161,7 +176,7 @@ static void call_received(SalOp *h){
if (already_a_call_pending(lc)){
if (already_a_call_with_remote_address(lc,from_addr) || already_a_call_pending(lc)){
ms_warning("Receiving another call while one is ringing or initiated, refusing this one with busy message.");
......@@ -623,5 +623,6 @@ public interface LinphoneCore {
LinphoneCall findCallFromUri(String uri);
int getMaxCalls();
boolean isMyself(String uri);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment