mgcp_endp: use define constant to define max number of E1 subslots

There are 15 possible subslots (not all at the same time) in one E1
timeslot. Lets use a define constant for that.

Change-Id: If7cb74e486946aff09e22abf8a8885bf0693f34e
Related: OS#2547
diff --git a/include/osmocom/mgcp/mgcp_endp.h b/include/osmocom/mgcp/mgcp_endp.h
index a58053a..879947b 100644
--- a/include/osmocom/mgcp/mgcp_endp.h
+++ b/include/osmocom/mgcp/mgcp_endp.h
@@ -27,6 +27,9 @@
 struct mgcp_conn;
 struct mgcp_endpoint;
 
+/* Number of E1 subslots (different variants, not all useable at the same time) */
+#define MGCP_ENDP_E1_SUBSLOTS 15
+
 #define LOGPENDP(endp, cat, level, fmt, args...) \
 LOGP(cat, level, "endpoint:%s " fmt, \
      endp ? endp->name : "none", \
diff --git a/src/libosmo-mgcp/mgcp_endp.c b/src/libosmo-mgcp/mgcp_endp.c
index 82f7732..3ac3c5d 100644
--- a/src/libosmo-mgcp/mgcp_endp.c
+++ b/src/libosmo-mgcp/mgcp_endp.c
@@ -119,7 +119,7 @@
 		endp->type = &ep_typeset.rtp;
 		endp->name = gen_e1_epname(endp, trunk->cfg->domain,
 					   trunk->trunk_nr,
-					   index / 15, index % 15);
+					   index / MGCP_ENDP_E1_SUBSLOTS, index % MGCP_ENDP_E1_SUBSLOTS);
 		break;
 	default:
 		osmo_panic("Cannot allocate unimplemented trunk type %d! %s:%d\n",
@@ -524,7 +524,7 @@
 	 * endpoint we need to verify, only the overlaps need to be checked. This is
 	 * also the reason why the related subslot number is missing from each each
 	 * line. */
-	const int8_t interlock_tab[15][16] =
+	const int8_t interlock_tab[MGCP_ENDP_E1_SUBSLOTS][15] =
 		{ { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, -1 },
 		{ 0, 3, 4, 7, 8, 9, 10, -1, -1, -1, -1, -1, -1, -1, -1 },
 		{ 0, 5, 6, 11, 12, 13, 14, -1, -1, -1, -1, -1, -1, -1, -1 },