mgcp: Introduce a mgcp_trunk_config enum for endpoint configs

We want to support real trunks in the MGCP code and we need to
have some better book keeping for those. Move the code around.
diff --git a/openbsc/src/mgcp/mgcp_main.c b/openbsc/src/mgcp/mgcp_main.c
index 091d7bd..c8d9a62 100644
--- a/openbsc/src/mgcp/mgcp_main.c
+++ b/openbsc/src/mgcp/mgcp_main.c
@@ -126,7 +126,7 @@
 	return 0;
 }
 
-static int mgcp_change_cb(struct mgcp_config *cfg, int endpoint, int state)
+static int mgcp_change_cb(struct mgcp_trunk_config *cfg, int endpoint, int state)
 {
 	if (state != MGCP_ENDP_MDCX)
 		return 0;
@@ -172,8 +172,8 @@
 		reset_endpoints = 0;
 
 		/* is checking in_addr.s_addr == INADDR_LOOPBACK making it more secure? */
-		for (i = 1; i < cfg->number_endpoints; ++i)
-			mgcp_free_endp(&cfg->endpoints[i]);
+		for (i = 1; i < cfg->trunk.number_endpoints; ++i)
+			mgcp_free_endp(&cfg->trunk.endpoints[i]);
 	}
 
 	return 0;