From 77be2d9b78060f758181a608029fba1b782fd44a Mon Sep 17 00:00:00 2001 From: file Date: Mon, 28 Aug 2006 17:37:56 +0000 Subject: 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 --- channels/chan_skinny.c | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) (limited to 'channels/chan_skinny.c') 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) -- cgit v1.2.3