Commit 3a33105b authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Allow configuration of SIP error code to be used when declining a call because...

Allow configuration of SIP error code to be used when declining a call because it has not been answered after the incoming call timeout.
parent 963322a5
......@@ -345,9 +345,9 @@ void CallPrivate::onIncomingCallSessionTimeoutCheck (const shared_ptr<CallSessio
lInfo() << "Incoming call ringing for " << elapsed << " seconds";
if (elapsed > 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));
}
}
......
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