BSC Call Control: Actually implement call statistics
The existing call realated statistics counters apparently were
never used. This introduces a new set of counters, two for the
MO and MT case.
diff --git a/openbsc/src/gsm_04_08.c b/openbsc/src/gsm_04_08.c
index 02854b6..42dd1b7 100644
--- a/openbsc/src/gsm_04_08.c
+++ b/openbsc/src/gsm_04_08.c
@@ -1759,6 +1759,8 @@
subscr_name(trans->subscr), trans->subscr->extension,
setup.called.number);
+ counter_inc(trans->subscr->net->stats.call.mo_setup);
+
/* indicate setup to MNCC */
mncc_recvmsg(trans->subscr->net, trans, MNCC_SETUP_IND, &setup);
@@ -1834,6 +1836,8 @@
new_cc_state(trans, GSM_CSTATE_CALL_PRESENT);
+ counter_inc(trans->subscr->net->stats.call.mt_setup);
+
return gsm48_conn_sendmsg(msg, trans->conn, trans);
}
@@ -2053,6 +2057,7 @@
}
new_cc_state(trans, GSM_CSTATE_CONNECT_REQUEST);
+ counter_inc(trans->subscr->net->stats.call.mt_connect);
return mncc_recvmsg(trans->subscr->net, trans, MNCC_SETUP_CNF, &connect);
}
@@ -2065,9 +2070,11 @@
gsm48_stop_cc_timer(trans);
new_cc_state(trans, GSM_CSTATE_ACTIVE);
+ counter_inc(trans->subscr->net->stats.call.mo_connect_ack);
memset(&connect_ack, 0, sizeof(struct gsm_mncc));
connect_ack.callref = trans->callref;
+
return mncc_recvmsg(trans->subscr->net, trans, MNCC_SETUP_COMPL_IND,
&connect_ack);
}