From c2002e29a58cbb94ebed369add966929d1481076 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Tue, 4 Oct 2016 11:31:50 +0200 Subject: [PATCH] allow repair of calls when no proxy config is used or proxy config doesn't register. --- coreapi/linphonecall.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index 70dd7f2ff..82284836b 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -5046,12 +5046,17 @@ void linphone_call_repair_if_broken(LinphoneCall *call){ LinphoneCallParams *params; if (!call->broken) return; - - /*First, make sure that the proxy from which we received this call, or to which we routed this call is registered*/ - if (!call->dest_proxy || linphone_proxy_config_get_state(call->dest_proxy) != LinphoneRegistrationOk) return; - if (!call->core->media_network_reachable) return; + /*Make sure that the proxy from which we received this call, or to which we routed this call is registered first*/ + if (call->dest_proxy){ + /*in all other cases, ie no proxy config, or a proxy config for which no registration was requested, we can start the + * call repair immediately.*/ + if (linphone_proxy_config_register_enabled(call->dest_proxy) + && linphone_proxy_config_get_state(call->dest_proxy) != LinphoneRegistrationOk) return; + } + + switch (call->state){ case LinphoneCallStreamsRunning: case LinphoneCallPaused: