neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/37279?usp=email )
Change subject: fix MGCP compat with osmo-mgw <= 1.12.2: CRCX in recvonly ......................................................................
fix MGCP compat with osmo-mgw <= 1.12.2: CRCX in recvonly
Fix a recently introduced problem with MGCP to osmo-mgw: Send the first CRCX in recvonly mode, not sendrecv. osmo-hnbgw always sends an additional MDCX including sendrecv mode anyway.
osmo-mgw currently forbids sending an initial CRCX in connection mode 'sendrecv', with this error message:
DLMGCP ERROR endpoint:rtpbridge/2@mgw CI:7F4C8EDD CRCX: selected connection mode type requires an opposite end! (mgcp_protocol.c:1090)
I am submitting an osmo-mgw patch to not fail there, but we want to and can easily be compatible with current and earlier osmo-mgw:
Sending the initial CRCX in sendrecv was introduced in commit:
"drop legacy hack: do not start MGW endp in loopback mode" da7d33e2841a2be94fd3364dc44abf8068669998 I0eca75d7abf66f8b9fde9c68ec10d4265f64a189 This patch has not been part of a release yet.
The intention of that commit was to get away from loopback mode. The logical mode to pick instead indeed is sendrecv, but by that osmo-hnbgw triggers above osmo-mgw error.
Related: SYS#6974 SYS#6907 Related: osmo-mgw Ic089485543c5c97a35c7ae24fe0f622bf57d1976 Change-Id: I004f96ae36774ceb33f177c9f58f820fefa3ca14 --- M src/osmo-hnbgw/mgw_fsm.c 1 file changed, 35 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/79/37279/1
diff --git a/src/osmo-hnbgw/mgw_fsm.c b/src/osmo-hnbgw/mgw_fsm.c index 48b4899..d44a6e3 100644 --- a/src/osmo-hnbgw/mgw_fsm.c +++ b/src/osmo-hnbgw/mgw_fsm.c @@ -175,7 +175,7 @@ mgw_info = (struct mgcp_conn_peer) { .call_id = (map->rua_ctx_id << 8) | mgw_fsm_priv->rab_id, .ptime = 20, - .conn_mode = MGCP_CONN_RECV_SEND, + .conn_mode = MGCP_CONN_RECV_ONLY, }; mgw_info.codecs[0] = CODEC_IUFP; mgw_info.codecs_len = 1;