summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2013-03-26 08:21:46 +0100
committerAndreas Eversberg <jolly@eversberg.eu>2013-07-29 12:39:45 +0200
commita1bcfefbae97382ccc0bd1263143f48773ecc7b0 (patch)
tree9b070944ce03dd2cd8e173268580128f8598eb33
parenta53caa95f2fd4f54eaaec6be9f637faa5d627b7e (diff)
Fixed AMR payload type selection and handling
-rw-r--r--openbsc/src/libtrau/rtp_proxy.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/openbsc/src/libtrau/rtp_proxy.c b/openbsc/src/libtrau/rtp_proxy.c
index 8f931cf24..fb8f04055 100644
--- a/openbsc/src/libtrau/rtp_proxy.c
+++ b/openbsc/src/libtrau/rtp_proxy.c
@@ -177,6 +177,9 @@ static int rtp_decode(struct msgb *msg, uint32_t callref, struct msgb **data, in
case RTP_PT_GSM_HALF:
msg_type = GSM_TCHH_FRAME;
break;
+ case RTP_PT_AMR:
+ msg_type = GSM_TCH_FRAME_AMR;
+ break;
default:
DEBUGPC(DLMUX, "received RTP frame with unknown "
"payload type %d\n", rtph->payload_type);
@@ -312,7 +315,7 @@ int rtp_send_frame(struct rtp_socket *rs, struct gsm_data_frame *frame)
duration = 160;
break;
case GSM_TCH_FRAME_AMR:
- if ((frame->data[1] & 0x04) != 0x04)
+ if ((frame->data[2] & 0x04) != 0x04)
goto bfi;
payload_type = (dynamic_pt) ? : RTP_PT_AMR;
payload_len = frame->data[0];