[asterisk-commits] file: trunk r373708 - in /trunk: ./ channels/chan_local.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Sep 25 15:14:17 CDT 2012


Author: file
Date: Tue Sep 25 15:14:13 2012
New Revision: 373708

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=373708
Log:
Fix T.38 support when used with chan_local in between.

Users of the T.38 API can indicate AST_T38_REQUEST_PARMS on a channel to request that the
channel indicate a T.38 negotiation with the parameters present on the channel. The return
value of this indication is expected to be AST_T38_REQUEST_PARMS upon success but with
chan_local involved this could never occur.

This fix changes chan_local to always return AST_T38_REQUEST_PARMS for this situation. If
the underlying channel technology on the other side does not support T.38 this would have
been determined ahead of time using ast_channel_get_t38_state and an indication would
not occur.

(closes issue ASTERISK-20229)
Reported by: wdoekes
Patches:
     ASTERISK-20229.patch uploaded by wdoekes (license 5674)

Review: https://reviewboard.asterisk.org/r/2070/
........

Merged revisions 373705 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373706 from http://svn.asterisk.org/svn/asterisk/branches/10
........

Merged revisions 373707 from http://svn.asterisk.org/svn/asterisk/branches/11

Modified:
    trunk/   (props changed)
    trunk/channels/chan_local.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.

Modified: trunk/channels/chan_local.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_local.c?view=diff&rev=373708&r1=373707&r2=373708
==============================================================================
--- trunk/channels/chan_local.c (original)
+++ trunk/channels/chan_local.c Tue Sep 25 15:14:13 2012
@@ -757,6 +757,15 @@
 			f.data.ptr = (void *) data;
 			f.datalen = datalen;
 			res = local_queue_frame(p, isoutbound, &f, ast, 1);
+
+			if (!res && (condition == AST_CONTROL_T38_PARAMETERS) &&
+			    (datalen == sizeof(struct ast_control_t38_parameters))) {
+				const struct ast_control_t38_parameters *parameters = data;
+				
+				if (parameters->request_response == AST_T38_REQUEST_PARMS) {
+					res = AST_T38_REQUEST_PARMS;
+				}
+			}
 		} else {
 			ast_debug(4, "Blocked indication %d\n", condition);
 		}




More information about the asterisk-commits mailing list