falconia submitted this change.
1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
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(-)
diff --git a/src/trau/trau_rtp_conv.c b/src/trau/trau_rtp_conv.c
index cf8d12e..5e06273 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 change 37151. To unsubscribe, or for help writing mail filters, visit settings.