aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-06-12 19:06:41 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-06-12 19:06:41 +0000
commit2d567a0c9f69199a67820344cde60724428f337e (patch)
tree87c10739933e55e360fd95b34e70bd0c5d6f6d27
parentc79710a727b14dd270e11f4072c4e8747ac67a5f (diff)
Suppress a warning message and give a better return code when generating
inband ringing after a call is answered. (closes issue #15158) Reported by: madkins Patches: 15158.patch uploaded by mmichelson (license 60) Tested by: madkins git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@200360 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--main/channel.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/main/channel.c b/main/channel.c
index 9fc6ff78a..37d8ac011 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -2555,6 +2555,16 @@ int ast_indicate_data(struct ast_channel *chan, int _condition,
switch (condition) {
case AST_CONTROL_RINGING:
ts = ast_get_indication_tone(chan->zone, "ring");
+ /* It is common practice for channel drivers to return -1 if trying
+ * to indicate ringing on a channel which is up. The idea is to let the
+ * core generate the ringing inband. However, we don't want the
+ * warning message about not being able to handle the specific indication
+ * to print nor do we want ast_indicate_data to return an "error" for this
+ * condition
+ */
+ if (chan->_state == AST_STATE_UP) {
+ res = 0;
+ }
break;
case AST_CONTROL_BUSY:
ts = ast_get_indication_tone(chan->zone, "busy");