From 2245cfb429a9182563430a68315907791cd2b45b Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Thu, 28 Oct 2010 16:31:35 +0200 Subject: [PATCH] enable auto-acceptance of "replacing" calls --- coreapi/callbacks.c | 6 +++++- mediastreamer2 | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/coreapi/callbacks.c b/coreapi/callbacks.c index 655a5547d..d4f5193f3 100644 --- a/coreapi/callbacks.c +++ b/coreapi/callbacks.c @@ -110,7 +110,6 @@ static void call_received(SalOp *h){ linphone_address_clean(from_parsed); tmp=linphone_address_as_string(from_parsed); linphone_address_destroy(from_parsed); - linphone_call_set_state(call,LinphoneCallIncomingReceived,"Incoming call"); barmesg=ortp_strdup_printf("%s %s%s",tmp,_("is contacting you"), (sal_call_autoanswer_asked(h)) ?_(" and asked autoanswer."):_(".")); if (lc->vtable.show) lc->vtable.show(lc); @@ -146,6 +145,11 @@ static void call_received(SalOp *h){ #endif ms_free(barmesg); ms_free(tmp); + + linphone_call_set_state(call,LinphoneCallIncomingReceived,"Incoming call"); + if (sal_call_get_replaces(call->op)!=NULL && lp_config_get_int(lc->config,"sip","auto_answer_replacing_calls",1)){ + linphone_core_accept_call(lc,call); + } } static void call_ringing(SalOp *h){ diff --git a/mediastreamer2 b/mediastreamer2 index 21471e316..ffacf5671 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 21471e316965e7ce61964b18793ec0cadbd37658 +Subproject commit ffacf56718c198cb80a290f7a65975916d8a9b6b