From 9f5aa13142006f51f9ac5bf98ca98ebc97d69e82 Mon Sep 17 00:00:00 2001
From: Olle Johansson <oej@edvina.net>
Date: Fri, 9 Jun 2006 09:47:44 +0000
Subject: [PATCH] Rename ast_rtp_early_media to ast_rtp_early_bridge to avoid
 confusion.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33174 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 apps/app_dial.c        | 12 ++++++------
 include/asterisk/rtp.h |  4 +++-
 rtp.c                  |  2 +-
 3 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/apps/app_dial.c b/apps/app_dial.c
index 56855337b7..5361bdc6a9 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -576,8 +576,8 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct dial_l
 							       OPT_CALLEE_MONITOR | OPT_CALLER_MONITOR |
 							       OPT_CALLEE_PARK | OPT_CALLER_PARK |
 							       DIAL_NOFORWARDHTML);
-						/* Setup early media if appropriate */
-						ast_rtp_early_media(in, peer);
+						/* Setup RTP early bridge if appropriate */
+						ast_rtp_early_bridge(in, peer);
 					}
 					/* If call has been answered, then the eventual hangup is likely to be normal hangup */
 					in->hangupcause = AST_CAUSE_NORMAL_CLEARING;
@@ -606,7 +606,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct dial_l
 						ast_verbose(VERBOSE_PREFIX_3 "%s is ringing\n", c->name);
 					/* Setup early media if appropriate */
 					if (single)
-						ast_rtp_early_media(in, c);
+						ast_rtp_early_bridge(in, c);
 					if (!(*sentringing) && !ast_test_flag(outgoing, OPT_MUSICBACK)) {
 						ast_indicate(in, AST_CONTROL_RINGING);
 						(*sentringing)++;
@@ -617,7 +617,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct dial_l
 						ast_verbose (VERBOSE_PREFIX_3 "%s is making progress passing it to %s\n", c->name, in->name);
 					/* Setup early media if appropriate */
 					if (single)
-						ast_rtp_early_media(in, c);
+						ast_rtp_early_bridge(in, c);
 					if (!ast_test_flag(outgoing, OPT_RINGBACK))
 						ast_indicate(in, AST_CONTROL_PROGRESS);
 					break;
@@ -630,7 +630,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct dial_l
 					if (option_verbose > 2)
 						ast_verbose (VERBOSE_PREFIX_3 "%s is proceeding passing it to %s\n", c->name, in->name);
 					if (single)
-						ast_rtp_early_media(in, c);
+						ast_rtp_early_bridge(in, c);
 					if (!ast_test_flag(outgoing, OPT_RINGBACK))
 						ast_indicate(in, AST_CONTROL_PROCEEDING);
 					break;
@@ -1608,7 +1608,7 @@ out:
 		sentringing = 0;
 		ast_indicate(chan, -1);
 	}
-	ast_rtp_early_media(chan, NULL);
+	ast_rtp_early_bridge(chan, NULL);
 	hanguptree(outgoing, NULL);
 	pbx_builtin_setvar_helper(chan, "DIALSTATUS", status);
 	if (option_debug)
diff --git a/include/asterisk/rtp.h b/include/asterisk/rtp.h
index b7be53a1ca..3bd1051693 100644
--- a/include/asterisk/rtp.h
+++ b/include/asterisk/rtp.h
@@ -182,7 +182,9 @@ void ast_rtp_proto_unregister(struct ast_rtp_protocol *proto);
 
 int ast_rtp_make_compatible(struct ast_channel *dest, struct ast_channel *src, int media);
 
-int ast_rtp_early_media(struct ast_channel *dest, struct ast_channel *src);
+/*! \brief If possible, create an early bridge directly between the devices without
+           having to send a re-invite later */
+int ast_rtp_early_bridge(struct ast_channel *dest, struct ast_channel *src);
 
 void ast_rtp_stop(struct ast_rtp *rtp);
 
diff --git a/rtp.c b/rtp.c
index 8291374920..642c8954e9 100644
--- a/rtp.c
+++ b/rtp.c
@@ -1274,7 +1274,7 @@ static struct ast_rtp_protocol *get_proto(struct ast_channel *chan)
 	return cur;
 }
 
-int ast_rtp_early_media(struct ast_channel *dest, struct ast_channel *src)
+int ast_rtp_early_bridge(struct ast_channel *dest, struct ast_channel *src)
 {
 	struct ast_rtp *destp, *srcp=NULL;		/* Audio RTP Channels */
 	struct ast_rtp *vdestp, *vsrcp=NULL;		/* Video RTP channels */
-- 
GitLab