mncc: Add support for half rate V1 frames to MNCC/RTP interface
This commit is contained in:
parent
9acbe4cefe
commit
63bfdd83ea
|
@ -2952,6 +2952,7 @@ int mncc_tx_to_cc(struct gsm_network *net, int msg_type, void *arg)
|
|||
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 @@ int mncc_tx_to_cc(struct gsm_network *net, int msg_type, void *arg)
|
|||
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;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue