aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@netfilter.org>2009-12-19 23:06:41 +0100
committerHarald Welte <laforge@netfilter.org>2009-12-19 23:09:35 +0100
commitaca8f158bccfc129a9eae234339a2b9c96d6f230 (patch)
treee249d9ce032c712e31ca5e4b5a2f01d173865392
parentda7ab74298b9fdb5eb27d6575e8a15683b69889f (diff)
Add RTP support for EFR
This is just the minimal support to receive and send EFR codec RTP frames. We are missing the code to convert TRAU frames in EFR format!
-rw-r--r--openbsc/include/openbsc/mncc.h1
-rw-r--r--openbsc/src/mncc.c2
-rw-r--r--openbsc/src/rtp_proxy.c9
3 files changed, 11 insertions, 1 deletions
diff --git a/openbsc/include/openbsc/mncc.h b/openbsc/include/openbsc/mncc.h
index 16fa05365..fbf3cab1f 100644
--- a/openbsc/include/openbsc/mncc.h
+++ b/openbsc/include/openbsc/mncc.h
@@ -88,6 +88,7 @@ struct gsm_call {
#define MNCC_LCHAN_MODIFY 0x0203
#define GSM_TCHF_FRAME 0x0300
+#define GSM_TCHF_FRAME_EFR 0x0301
#define GSM_MAX_FACILITY 128
#define GSM_MAX_SSVERSION 128
diff --git a/openbsc/src/mncc.c b/openbsc/src/mncc.c
index a5efc7312..f53b15dcb 100644
--- a/openbsc/src/mncc.c
+++ b/openbsc/src/mncc.c
@@ -83,7 +83,7 @@ static struct mncc_names {
{"MNCC_FRAME_DROP", 0x0202},
{"MNCC_LCHAN_MODIFY", 0x0203},
- {"GSM_TRAU_FRAME", 0x0300},
+ {"GSM_TCH_FRAME", 0x0300},
{NULL, 0} };
diff --git a/openbsc/src/rtp_proxy.c b/openbsc/src/rtp_proxy.c
index f9207d661..551349750 100644
--- a/openbsc/src/rtp_proxy.c
+++ b/openbsc/src/rtp_proxy.c
@@ -82,6 +82,7 @@ struct rtp_x_hdr {
#define RTP_VERSION 2
#define RTP_PT_GSM_FULL 3
+#define RTP_PT_GSM_EFR 97
/* decode an rtp frame and create a new buffer with payload */
static int rtp_decode(struct msgb *msg, u_int32_t callref, struct msgb **data)
@@ -152,6 +153,9 @@ static int rtp_decode(struct msgb *msg, u_int32_t callref, struct msgb **data)
return -EINVAL;
}
break;
+ case RTP_PT_GSM_EFR:
+ msg_type = GSM_TCHF_FRAME_EFR;
+ break;
default:
DEBUGPC(DMUX, "received RTP frame with unknown payload "
"type %d\n", rtph->payload_type);
@@ -196,6 +200,11 @@ int rtp_send_frame(struct rtp_socket *rs, struct gsm_data_frame *frame)
payload_len = 33;
duration = 160;
break;
+ case GSM_TCHF_FRAME_EFR:
+ payload_type = RTP_PT_GSM_EFR;
+ payload_len = 31;
+ duration = 160;
+ break;
default:
DEBUGPC(DMUX, "unsupported message type %d\n",
frame->msg_type);