falconia has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-abis/+/37151?usp=email ) Change subject: rtp2trau_hr16: accept both TS 101 318 and RFC 5993 payload formats ...................................................................... rtp2trau_hr16: accept both TS 101 318 and RFC 5993 payload formats OsmoBTS already accepts both payload formats for HRv1 - do likewise when interfacing to E1-based BTS. While OsmoMGW does have a vty config option to convert between TS 101 318 and RFC 5993 payload formats on the fly, it should be considered deprecated, and we should be moving toward recommended configurations with that option disabled. Change-Id: I125d57d3451b030e35a7b2b95a45e38b4581626c --- M src/trau/trau_rtp_conv.c 1 file changed, 29 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/51/37151/1 diff --git a/src/trau/trau_rtp_conv.c b/src/trau/trau_rtp_conv.c index bad63ac..e1e0391 100644 --- a/src/trau/trau_rtp_conv.c +++ b/src/trau/trau_rtp_conv.c @@ -367,8 +367,20 @@ static int rtp2trau_hr16(struct osmo_trau_frame *tf, const uint8_t *data, size_t data_len) { - if (data_len < GSM_HR_BYTES && data_len != 0) + /* accept both TS 101 318 and RFC 5993 payloads */ + switch (data_len) { + case GSM_HR_BYTES: + break; + case GSM_HR_BYTES_RTP_RFC5993: + data++; + data_len--; + break; + case 0: + /* accept no-data input */ + break; + default: return -EINVAL; + } tf->type = OSMO_TRAU16_FT_HR; -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/37151?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I125d57d3451b030e35a7b2b95a45e38b4581626c Gerrit-Change-Number: 37151 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <falcon@freecalypso.org> Gerrit-MessageType: newchange