[svn-commits] kpfleming: trunk r204948 - /trunk/main/channel.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Mon Jul 6 08:38:32 CDT 2009
Author: kpfleming
Date: Mon Jul 6 08:38:29 2009
New Revision: 204948
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=204948
Log:
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.
Modified:
trunk/main/channel.c
Modified: trunk/main/channel.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/main/channel.c?view=diff&rev=204948&r1=204947&r2=204948
==============================================================================
--- trunk/main/channel.c (original)
+++ trunk/main/channel.c Mon Jul 6 08:38:29 2009
@@ -3548,6 +3548,7 @@
default:
break;
}
+
if (chan->tech->indicate) {
/* See if the channel driver can handle this condition. */
res = chan->tech->indicate(chan, condition, data, datalen);
@@ -3557,7 +3558,7 @@
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;
@@ -3579,6 +3580,15 @@
/* 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
@@ -3614,11 +3624,9 @@
case AST_CONTROL_RING:
case AST_CONTROL_HOLD:
case AST_CONTROL_UNHOLD:
- case AST_CONTROL_T38:
case AST_CONTROL_TRANSFER:
case AST_CONTROL_CONNECTED_LINE:
case AST_CONTROL_REDIRECTING:
- case AST_CONTROL_T38_PARAMETERS:
/* Nothing left to do for these. */
res = 0;
break;
More information about the svn-commits
mailing list