summaryrefslogtreecommitdiff
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r--channels/chan_sip.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index d932dff05..bfbdba385 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -5314,7 +5314,9 @@ static int update_call_counter(struct sip_pvt *fup, int event)
sip_pvt_lock(fup);
ao2_lock(p);
if (ast_test_flag(&fup->flags[0], SIP_INC_RINGING)) {
- (*inringing)--;
+ if (*inringing > 0) {
+ (*inringing)--;
+ }
ast_clear_flag(&fup->flags[0], SIP_INC_RINGING);
}
ao2_unlock(p);