osmux: Make sure RTP AMR feed to osmux is in octet-aligned mode

The Osmux implementation in libosmo-netif expects to work with RTP AMR
in octet-aligned mode. Therefore, if the peer connection received RTP
AMR in bandwidth-efficient mode, we need to convert it to octet-aligned
before feeding the packets to the osmux layer.

Related: SYS#6161
Change-Id: Ifeec44241079f7a31da12745c92bfdc4fb222f3a
diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c
index 3248cbd..72d97fd 100644
--- a/src/libosmo-mgcp/mgcp_network.c
+++ b/src/libosmo-mgcp/mgcp_network.c
@@ -717,11 +717,18 @@
 	return 0;
 }
 
-/* For AMR RTP two framing modes are defined RFC3267. There is a bandwith
+/*! Convert msg to AMR RTP framing mode specified by target_is_oa.
+ *  \param[in] endp MGCP Endpoint where this message belongs to (used for logging purposes)
+ *  \param[in] msg Message containing an AMR RTP payload (in octet-aligned or bandwidth-efficient format).
+ *  \param[in] target_is_oa the target framing mode that msg will contain after this function succeeds.
+ *  \returns The size of the new RTP AMR content on success, negative on error.
+ *
+ * For AMR RTP two framing modes are defined RFC3267. There is a bandwidth
  * efficient encoding scheme where all fields are packed together one after
  * another and an octet aligned mode where all fields are aligned to octet
- * boundaries. This function is used to convert between the two modes */
-static int amr_oa_bwe_convert(struct mgcp_endpoint *endp, struct msgb *msg,
+ * boundaries. This function is used to convert between the two modes.
+ */
+int amr_oa_bwe_convert(struct mgcp_endpoint *endp, struct msgb *msg,
 			      bool target_is_oa)
 {
 	/* NOTE: the msgb has an allocated length of RTP_BUF_SIZE, so there is