aboutsummaryrefslogtreecommitdiffstats
path: root/chan_openbsc.c
diff options
context:
space:
mode:
Diffstat (limited to 'chan_openbsc.c')
-rw-r--r--chan_openbsc.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/chan_openbsc.c b/chan_openbsc.c
index dd40501..66ac56e 100644
--- a/chan_openbsc.c
+++ b/chan_openbsc.c
@@ -472,7 +472,23 @@ static struct ast_frame *
openbsc_chan_read(struct ast_channel *chan)
{
struct openbsc_chan_priv *p = chan->tech_pvt;
- return p->rtp ? ast_rtp_read(p->rtp) : &ast_null_frame;
+ struct ast_frame *f;
+
+ if (!p->rtp)
+ return &ast_null_frame;
+
+ switch (chan->fdno) {
+ case 0:
+ f = ast_rtp_read(p->rtp);
+ break;
+
+ case 1:
+ f = ast_rtcp_read(p->rtp);
+ break;
+
+ default:
+ f = &ast_null_frame;
+ }
}
static int