aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_skinny.c
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2006-08-28 17:37:56 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2006-08-28 17:37:56 +0000
commit77be2d9b78060f758181a608029fba1b782fd44a (patch)
tree8d4c60d4b38470222d45faab0253b21508f6a10a /channels/chan_skinny.c
parent320436acc4a3b4685570a96fc771979ebdc6c9d4 (diff)
Merge in RTP-level packet bridging. Packet comes in, packet goes out - that's what RTP-level packet bridging is all about!
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@41235 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_skinny.c')
-rw-r--r--channels/chan_skinny.c32
1 files changed, 18 insertions, 14 deletions
diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c
index acd6ad951..b05fabb9b 100644
--- a/channels/chan_skinny.c
+++ b/channels/chan_skinny.c
@@ -1591,24 +1591,28 @@ static void do_housekeeping(struct skinnysession *s)
/* I do not believe skinny can deal with video.
Anyone know differently? */
/* Yes, it can. Currently 7985 and Cisco VT Advantage do video. */
-static struct ast_rtp *skinny_get_vrtp_peer(struct ast_channel *c)
+static enum ast_rtp_get_result skinny_get_vrtp_peer(struct ast_channel *c, struct ast_rtp **rtp)
{
- struct skinny_subchannel *sub;
- sub = c->tech_pvt;
- if (sub && sub->vrtp) {
- return sub->vrtp;
- }
- return NULL;
+ struct skinny_subchannel *sub = NULL;
+
+ if (!(sub = c->tech_pvt) || !(sub->vrtp))
+ return AST_RTP_GET_FAILED;
+
+ *rtp = sub->vrtp;
+
+ return AST_RTP_TRY_NATIVE;
}
-static struct ast_rtp *skinny_get_rtp_peer(struct ast_channel *c)
+static enum ast_rtp_get_result skinny_get_rtp_peer(struct ast_channel *c, struct ast_rtp **rtp)
{
- struct skinny_subchannel *sub;
- sub = c->tech_pvt;
- if (sub && sub->rtp) {
- return sub->rtp;
- }
- return NULL;
+ struct skinny_subchannel *sub = NULL;
+
+ if (!(sub = c->tech_pvt) || !(sub->rtp))
+ return AST_RTP_GET_FAILED;
+
+ *rtp = sub->rtp;
+
+ return AST_RTP_TRY_NATIVE;
}
static int skinny_set_rtp_peer(struct ast_channel *c, struct ast_rtp *rtp, struct ast_rtp *vrtp, int codecs, int nat_active)