mgcp: Implement RSIP based on a trunk level

Implement the RSIP spec extension to work on the specified
trunk instead of hardcoding it to the virtual trunk.
diff --git a/openbsc/src/libmgcp/mgcp_protocol.c b/openbsc/src/libmgcp/mgcp_protocol.c
index 1d26850..44a3b87 100644
--- a/openbsc/src/libmgcp/mgcp_protocol.c
+++ b/openbsc/src/libmgcp/mgcp_protocol.c
@@ -831,8 +831,20 @@
 
 static struct msgb *handle_rsip(struct mgcp_config *cfg, struct msgb *msg)
 {
+	struct mgcp_msg_ptr data_ptrs[6];
+	const char *trans_id;
+	struct mgcp_endpoint *endp;
+	int found;
+
+	found = mgcp_analyze_header(cfg, msg, data_ptrs, ARRAY_SIZE(data_ptrs),
+				    &trans_id, &endp);
+	if (found != 0) {
+		LOGP(DMGCP, LOGL_ERROR, "Failed to find the endpoint.\n");
+		return NULL;
+	}
+
 	if (cfg->reset_cb)
-		cfg->reset_cb(cfg);
+		cfg->reset_cb(endp->tcfg);
 	return NULL;
 }