diff --git a/src/switch_channel.c b/src/switch_channel.c index 9e2cfcfdc8..ae0634d802 100644 --- a/src/switch_channel.c +++ b/src/switch_channel.c @@ -4658,6 +4658,13 @@ static void fetch_device_stats(switch_device_record_t *drec) } else { drec->stats.ringing_out++; } + } else if (np->callstate == CCS_HANGUP) { + drec->stats.hup++; + if (np->direction == SWITCH_CALL_DIRECTION_INBOUND) { + drec->stats.hup_in++; + } else { + drec->stats.hup_out++; + } } else if (np->callstate != CCS_DOWN) { drec->stats.active++; if (np->direction == SWITCH_CALL_DIRECTION_INBOUND) {