diff --git a/include/osmocom/mgcp/mgcp_trunk.h b/include/osmocom/mgcp/mgcp_trunk.h index 812718147..ba2c6c474 100644 --- a/include/osmocom/mgcp/mgcp_trunk.h +++ b/include/osmocom/mgcp/mgcp_trunk.h @@ -1,6 +1,7 @@ #pragma once #include +#include #define LOGPTRUNK(trunk, cat, level, fmt, args...) \ LOGP(cat, level, "trunk:%u " fmt, \ @@ -59,8 +60,11 @@ struct mgcp_trunk { /* E1 specific */ struct { unsigned int vty_line_nr; - bool ts_in_use[31]; - struct osmo_i460_timeslot i460_ts[31]; + bool ts_in_use[NUM_E1_TS-1]; + struct osmo_i460_timeslot i460_ts[NUM_E1_TS-1]; + /* Note: on an E1 line TS 0 is devoted to framing and + * alignment and therefore only NUM_E1_TS-1 timeslots + * are available for traffic. */ } e1; }; };