summaryrefslogtreecommitdiffstats
path: root/openbsc/src/libtrau
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2014-01-17 19:06:38 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-03-20 22:36:16 +0100
commit63bfdd83ea94bef8f6b1a2756e80e7b2e8b46250 (patch)
tree9e8573b119876ef29c79f50ed5bb24f84d9008d7 /openbsc/src/libtrau
parent9acbe4cefee2afa6625ee646e9cc96d04c8d1018 (diff)
mncc: Add support for half rate V1 frames to MNCC/RTP interface
Diffstat (limited to 'openbsc/src/libtrau')
-rw-r--r--openbsc/src/libtrau/rtp_proxy.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/openbsc/src/libtrau/rtp_proxy.c b/openbsc/src/libtrau/rtp_proxy.c
index 94a5b2f..143bfa0 100644
--- a/openbsc/src/libtrau/rtp_proxy.c
+++ b/openbsc/src/libtrau/rtp_proxy.c
@@ -183,6 +183,15 @@ static int rtp_decode(struct msgb *msg, uint32_t callref, struct msgb **data)
return -EINVAL;
}
break;
+ case RTP_PT_GSM_HALF:
+ msg_type = GSM_TCHH_FRAME;
+ if (payload_len != RTP_LEN_GSM_HALF) {
+ DEBUGPC(DLMUX, "received RTP half rate frame with "
+ "payload length != %d (len = %d)\n",
+ RTP_LEN_GSM_HALF, payload_len);
+ return -EINVAL;
+ }
+ break;
default:
DEBUGPC(DLMUX, "received RTP frame with unknown payload "
"type %d\n", rtph->payload_type);
@@ -250,6 +259,11 @@ int rtp_send_frame(struct rtp_socket *rs, struct gsm_data_frame *frame)
payload_len = RTP_LEN_GSM_EFR;
duration = RTP_GSM_DURATION;
break;
+ case GSM_TCHH_FRAME:
+ payload_type = RTP_PT_GSM_HALF;
+ payload_len = RTP_LEN_GSM_HALF;
+ duration = RTP_GSM_DURATION;
+ break;
default:
DEBUGPC(DLMUX, "unsupported message type %d\n",
frame->msg_type);