summaryrefslogtreecommitdiff
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2006-08-30 03:16:03 +0000
committerJoshua Colp <jcolp@digium.com>2006-08-30 03:16:03 +0000
commit12b6ec4e11f872ba59d8ffe72f479d3fd14bb00f (patch)
tree45b7b58240ee6153fe6044d3ec6d36d6c9013c93 /channels/chan_sip.c
parentda7d969ae10e89c3fb2719dbac5099e5d09c56ef (diff)
Use an API call (ast_rtp_get_bridged) to return the RTP stream we are bridged to, and also use it in chan_sip so we know to ignore the no RTP activity checking
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41316 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r--channels/chan_sip.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 5508405ad..ce231bf3b 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -14365,12 +14365,15 @@ restartsearch:
ast_mutex_lock(&sip->lock);
}
if (sip->owner) {
- ast_log(LOG_NOTICE,
- "Disconnecting call '%s' for lack of RTP activity in %ld seconds\n",
- sip->owner->name,
- (long) (t - sip->lastrtprx));
- /* Issue a softhangup */
- ast_softhangup_nolock(sip->owner, AST_SOFTHANGUP_DEV);
+ if (!(ast_rtp_get_bridged(sip->rtp))) {
+ ast_log(LOG_NOTICE,
+ "Disconnecting call '%s' for lack of RTP activity in %ld seconds\n",
+ sip->owner->name,
+ (long) (t - sip->lastrtprx));
+ /* Issue a softhangup */
+ ast_softhangup_nolock(sip->owner, AST_SOFTHANGUP_DEV);
+ } else
+ ast_log(LOG_NOTICE, "'%s' will not be disconnected in %ld seconds because it is directly bridged to another RTP stream\n", sip->owner->name, (long) (t - sip->lastrtprx));
ast_channel_unlock(sip->owner);
/* forget the timeouts for this call, since a hangup
has already been requested and we don't want to