diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 72d59360ce..39b4559f43 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -4643,7 +4643,9 @@ static int update_call_counter(struct sip_pvt *fup, int event) sip_pvt_lock(fup); ast_mutex_lock(pu_lock); if (ast_test_flag(&fup->flags[0], SIP_INC_RINGING)) { - (*inringing)--; + if (*inringing > 0) { + (*inringing)--; + } ast_clear_flag(&fup->flags[0], SIP_INC_RINGING); } ast_mutex_unlock(pu_lock);