From 3a33105bead5ce48267c5992ac80afe693d58faa Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Thu, 14 Jun 2018 17:02:57 +0200 Subject: [PATCH] Allow configuration of SIP error code to be used when declining a call because it has not been answered after the incoming call timeout. --- src/call/call.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/call/call.cpp b/src/call/call.cpp index 6ae246607..e7d0348f2 100644 --- a/src/call/call.cpp +++ b/src/call/call.cpp @@ -345,9 +345,9 @@ void CallPrivate::onIncomingCallSessionTimeoutCheck (const shared_ptr q->getCore()->getCCore()->sip_conf.inc_timeout) { lInfo() << "Incoming call timeout (" << q->getCore()->getCCore()->sip_conf.inc_timeout << ")"; - LinphoneReason declineReason = (q->getCore()->getCurrentCall() != q->getSharedFromThis()) - ? LinphoneReasonBusy : LinphoneReasonDeclined; - getActiveSession()->declineNotAnswered(declineReason); + auto config = linphone_core_get_config(q->getCore()->getCCore()); + int statusCode = linphone_config_get_int(config, "sip", "inc_timeout_status_code", 486); + getActiveSession()->declineNotAnswered(linphone_error_code_to_reason(statusCode)); } }