summaryrefslogtreecommitdiff
path: root/channels/chan_skinny.c
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2006-08-28 17:37:56 +0000
committerJoshua Colp <jcolp@digium.com>2006-08-28 17:37:56 +0000
commitc70ed7614aaf68c40a7c4be234730e56c8148c42 (patch)
tree8d4c60d4b38470222d45faab0253b21508f6a10a /channels/chan_skinny.c
parentd5572fac38a48a6c39df4e9d4ad1a3720dfe6baa (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: https://origsvn.digium.com/svn/asterisk/trunk@41235 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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)