aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2023-09-27 16:21:50 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2023-09-27 16:25:58 +0200
commit58d5b97831a9307737606809eeb013533dd9afb7 (patch)
tree5eb26225dc521dc7d3ae5e885bfc0354b373ab80
parent6225b5cecba79187e2f0b9dbd55a634ed9864b6b (diff)
mgw: Configure IuUP if codec set during MDCX
The mgcp client may first configure the connection to use RTP-AMR, but after setting up another call leg may find out that both legs are IuUP and hence want to forward the IuUP between the 2 connections instead. In that case, an MDCX with codec VND.3GPP.IUFP would be set. Until now, osmo-mgw didn't take that scenario into account, and it was only upgrading the rtp conn to iuup internally during CRCX. As a result, in the mentioned scenario osmo-mgw would continue to output RTP instead of IuUP after the MDCX with VND.3GPP.IUFP, which is wrong. Related: SYS#6578 Change-Id: Ic94bf90f54d8ba3e65a2cd52734867847f3a60c2
-rw-r--r--src/libosmo-mgcp/mgcp_protocol.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c
index 77957346c..809622bbd 100644
--- a/src/libosmo-mgcp/mgcp_protocol.c
+++ b/src/libosmo-mgcp/mgcp_protocol.c
@@ -1293,6 +1293,10 @@ mgcp_header_done:
error_code = rc;
goto error3;
}
+ /* Upgrade the conn type RTP_DEFAULT->RTP_IUUP if needed based on requested codec: */
+ /* TODO: "codec" probably needs to be moved from endp to conn */
+ if (conn->type == MGCP_RTP_DEFAULT && strcmp(conn->end.codec->subtype_name, "VND.3GPP.IUFP") == 0)
+ rc = mgcp_conn_iuup_init(conn);
/* check connection mode setting */
if (conn->conn->mode != MGCP_CONN_LOOPBACK