mncc: Add support for half rate V1 frames to MNCC/RTP interface
diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c
index cd2a0b5..df93433 100644
--- a/openbsc/src/libmsc/gsm_04_08.c
+++ b/openbsc/src/libmsc/gsm_04_08.c
@@ -2952,6 +2952,7 @@
return tch_recv_mncc(net, data->callref, 1);
case GSM_TCHF_FRAME:
case GSM_TCHF_FRAME_EFR:
+ case GSM_TCHH_FRAME:
/* Find callref */
trans = trans_find_by_callref(net, data->callref);
if (!trans) {
@@ -2963,11 +2964,12 @@
LOGP(DMNCC, LOGL_NOTICE, "TCH frame for trans without conn\n");
return 0;
}
- if (trans->conn->lchan->type != GSM_LCHAN_TCH_F) {
+ if (trans->conn->lchan->type != GSM_LCHAN_TCH_F
+ && trans->conn->lchan->type != GSM_LCHAN_TCH_H) {
/* This should be LOGL_ERROR or NOTICE, but
* unfortuantely it happens for a couple of frames at
* the beginning of every RTP connection */
- LOGP(DMNCC, LOGL_DEBUG, "TCH frame for lchan != TCH_F\n");
+ LOGP(DMNCC, LOGL_DEBUG, "TCH frame for lchan != TCH_F/TCH_H\n");
return 0;
}
bts = trans->conn->lchan->ts->trx->bts;
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 @@
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 @@
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);