jolly has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/33546 )
Change subject: ASCI: Add new mode for voice group/broadcast call ......................................................................
ASCI: Add new mode for voice group/broadcast call
The new mode "confecho" is similar to "sendrecv", except that it also echoes back RTP towards the sender. This is required for voice group or broadcast calls. Talker and listeners use the same timeslot, so that audio must be echoed from the talker to the listeners.
It is different from "loopback", because a loopback only echoes back RTP towards the sender, but does not forward audio through the endpoint to the other connections. Also it does not forward RTP from senders of other connections.
The current implementation of MGW does not support transcoding and mixing. This means that a sending connection must not send RTP that has been received by multiple receiving connections. The application that uses the MGW has to set the connection modes, so that only one connection receives RTP in case of a conference.
Change-Id: I0639c663e119d85bef1010c7aa45e2f133a9daf0 Related: OS#4853 --- M include/osmocom/mgcp/mgcp_common.h M src/libosmo-mgcp-client/mgcp_client.c M src/libosmo-mgcp/mgcp_msg.c 3 files changed, 31 insertions(+), 1 deletion(-)
Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved
diff --git a/include/osmocom/mgcp/mgcp_common.h b/include/osmocom/mgcp/mgcp_common.h index 07d8d37..7de45f9 100644 --- a/include/osmocom/mgcp/mgcp_common.h +++ b/include/osmocom/mgcp/mgcp_common.h @@ -47,6 +47,7 @@ MGCP_CONN_SEND_ONLY = 2, MGCP_CONN_RECV_SEND = MGCP_CONN_RECV_ONLY | MGCP_CONN_SEND_ONLY, MGCP_CONN_LOOPBACK = 4 | MGCP_CONN_RECV_SEND, + MGCP_CONN_CONFECHO = 8 | MGCP_CONN_RECV_SEND, };
#define MGCP_X_OSMO_IGN_HEADER "X-Osmo-IGN:" diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c index 78652a1..5df4560 100644 --- a/src/libosmo-mgcp-client/mgcp_client.c +++ b/src/libosmo-mgcp-client/mgcp_client.c @@ -1548,6 +1548,7 @@ { MGCP_CONN_RECV_SEND, "sendrecv" }, { MGCP_CONN_SEND_ONLY, "sendonly" }, { MGCP_CONN_RECV_ONLY, "recvonly" }, + { MGCP_CONN_CONFECHO, "confecho" }, { MGCP_CONN_LOOPBACK, "loopback" }, { 0, NULL } }; diff --git a/src/libosmo-mgcp/mgcp_msg.c b/src/libosmo-mgcp/mgcp_msg.c index 26a44c6..a46ffc2 100644 --- a/src/libosmo-mgcp/mgcp_msg.c +++ b/src/libosmo-mgcp/mgcp_msg.c @@ -75,7 +75,7 @@ }
/*! Parse connection mode. - * \param[in] mode as string (recvonly, sendrecv, sendonly or loopback) + * \param[in] mode as string (recvonly, sendrecv, sendonly confecho or loopback) * \param[in] endp pointer to endpoint (only used for log output) * \param[out] associated connection to be modified accordingly * \returns 0 on success, -1 on error */ @@ -100,6 +100,8 @@ conn->mode = MGCP_CONN_RECV_SEND; else if (strcasecmp(mode, "sendonly") == 0) conn->mode = MGCP_CONN_SEND_ONLY; + else if (strcasecmp(mode, "confecho") == 0) + conn->mode = MGCP_CONN_CONFECHO; else if (strcasecmp(mode, "loopback") == 0) conn->mode = MGCP_CONN_LOOPBACK; else {