aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2009-07-06 13:39:51 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2009-07-06 13:39:51 +0000
commit44b69172165c172a5b8542c7cdd5fcf56d7cb09a (patch)
treeb11e5cfdd64a5b6925b50ba3bfe8a209b81ad58d /main
parent96c5c19a9bac65dad3cf0201307b16198c31b5ad (diff)
Merged revisions 204948 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r204948 | kpfleming | 2009-07-06 08:38:29 -0500 (Mon, 06 Jul 2009) | 7 lines Improve handling of AST_CONTROL_T38 and AST_CONTROL_T38_PARAMETERS for non-T.38-capable channels. This change allows applications that request T.38 negotiation on a channel that does not support it to get the proper indication that it is not supported, rather than thinking that negotiation was started when it was not. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@204949 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/channel.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/main/channel.c b/main/channel.c
index f0f4ef0e2..5369b2585 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -3085,7 +3085,7 @@ int ast_indicate_data(struct ast_channel *chan, int _condition,
ast_channel_unlock(chan);
- if (chan->tech->indicate && !res) {
+ if (!res) {
/* The channel driver successfully handled this indication */
if (is_visible_indication(condition)) {
chan->visible_indication = condition;
@@ -3107,6 +3107,15 @@ int ast_indicate_data(struct ast_channel *chan, int _condition,
/* Handle conditions that we have tones for. */
switch (condition) {
+ case AST_CONTROL_T38:
+ case AST_CONTROL_T38_PARAMETERS:
+ /* there is no way to provide 'default' behavior for these
+ * control frames, so we need to return failure, but there
+ * is also no value in the log message below being emitted
+ * since failure to handle these frames is not an 'error'
+ * so just return right now.
+ */
+ return -1;
case AST_CONTROL_RINGING:
ts = ast_get_indication_tone(chan->zone, "ring");
/* It is common practice for channel drivers to return -1 if trying
@@ -3142,8 +3151,6 @@ int ast_indicate_data(struct ast_channel *chan, int _condition,
case AST_CONTROL_RING:
case AST_CONTROL_HOLD:
case AST_CONTROL_UNHOLD:
- case AST_CONTROL_T38:
- case AST_CONTROL_T38_PARAMETERS:
/* Nothing left to do for these. */
res = 0;
break;