[asterisk-commits] may: trunk r310735 - in /trunk: ./ addons/ addons/ooh323c/src/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Mar 14 16:51:40 CDT 2011


Author: may
Date: Mon Mar 14 16:51:35 2011
New Revision: 310735

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=310735
Log:
Merged revisions 310734 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.8
(closes issue #18693)

........
  r310734 | may | 2011-03-15 00:45:53 +0300 (Tue, 15 Mar 2011) | 12 lines
  
  Introduce t.38 parameters control functionality not full but enough for
  Send/RcvFax support
  
  Introduce t.38 controls between asterisk core and channel/proto layers.
  Not all parameters are transferred from proto layers but *Fax apps
  tested and work ok.
  
  (issue #18693)
  Reported by: benngard2
  Patches: 
        issue-18693.patch uploaded by may213 (license 454)
........

Modified:
    trunk/   (props changed)
    trunk/addons/chan_ooh323.c
    trunk/addons/ooh323c/src/ooCalls.h
    trunk/addons/ooh323c/src/ooCapability.c

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

Modified: trunk/addons/chan_ooh323.c
URL: http://svnview.digium.com/svn/asterisk/trunk/addons/chan_ooh323.c?view=diff&rev=310735&r1=310734&r2=310735
==============================================================================
--- trunk/addons/chan_ooh323.c (original)
+++ trunk/addons/chan_ooh323.c Mon Mar 14 16:51:35 2011
@@ -520,6 +520,7 @@
 	}
 
 	ast_udptl_set_error_correction_scheme(pvt->udptl, UDPTL_ERROR_CORRECTION_NONE);
+	ast_udptl_set_far_max_datagram(pvt->udptl, 144);
 	pvt->faxmode = 0;
 	pvt->t38support = gT38Support;
 	pvt->rtptimeout = gRTPTimeout;
@@ -4158,11 +4159,14 @@
 	them.sin_port = htons(remotePort);
 	ast_sockaddr_from_sin(&them_addr, &them);
 	ast_udptl_set_peer(p->udptl, &them_addr);
+	ast_udptl_set_tag(p->udptl, p->owner->name);
 	p->t38_tx_enable = 1;
 	p->lastTxT38 = time(NULL);
 	if (p->t38support == T38_ENABLED) {
 		struct ast_control_t38_parameters parameters = { .request_response = 0 };
 		parameters.request_response = AST_T38_NEGOTIATED;
+		parameters.max_ifp = ast_udptl_get_far_max_ifp(p->udptl);
+		parameters.rate = AST_T38_RATE_14400;
 		ast_queue_control_data(p->owner, AST_CONTROL_T38_PARAMETERS, &parameters, sizeof(parameters));
 	}
 	if (gH323Debug)
@@ -4357,6 +4361,16 @@
 
 			struct ast_control_t38_parameters parameters = { .request_response = 0 };
 			parameters.request_response = AST_T38_REQUEST_NEGOTIATE;
+			if (call->T38FarMaxDatagram) {
+				ast_udptl_set_far_max_datagram(p->udptl, call->T38FarMaxDatagram);
+			} else {
+				ast_udptl_set_far_max_datagram(p->udptl, 144);
+			}
+			if (call->T38Version) {
+				parameters.version = call->T38Version;
+			}
+			parameters.max_ifp = ast_udptl_get_far_max_ifp(p->udptl);
+			parameters.rate = AST_T38_RATE_14400;
 			ast_queue_control_data(p->owner, AST_CONTROL_T38_PARAMETERS, 
 							&parameters, sizeof(parameters));
 			p->faxmode = 1;
@@ -4366,6 +4380,8 @@
 		if (p->t38support == T38_ENABLED) {
 			struct ast_control_t38_parameters parameters = { .request_response = 0 };
 			parameters.request_response = AST_T38_REQUEST_TERMINATE;
+			parameters.max_ifp = ast_udptl_get_far_max_ifp(p->udptl);
+			parameters.rate = AST_T38_RATE_14400;
 			ast_queue_control_data(p->owner, AST_CONTROL_T38_PARAMETERS, 
 							&parameters, sizeof(parameters));
 		}

Modified: trunk/addons/ooh323c/src/ooCalls.h
URL: http://svnview.digium.com/svn/asterisk/trunk/addons/ooh323c/src/ooCalls.h?view=diff&rev=310735&r1=310734&r2=310735
==============================================================================
--- trunk/addons/ooh323c/src/ooCalls.h (original)
+++ trunk/addons/ooh323c/src/ooCalls.h Mon Mar 14 16:51:35 2011
@@ -214,6 +214,8 @@
    ASN1UINT8		requestSequence;
    ASN1UINT		reqFlags;
    ASN1UINT		t38sides;
+   int			T38FarMaxDatagram;
+   int			T38Version;
    H235TimeStamp	alertingTime, connectTime, endTime; /* time data for gatekeeper */
    FastStartResponse    *pFastStartRes; /* fast start response */
    struct OOH323Regex*		rtpMask;

Modified: trunk/addons/ooh323c/src/ooCapability.c
URL: http://svnview.digium.com/svn/asterisk/trunk/addons/ooh323c/src/ooCapability.c?view=diff&rev=310735&r1=310734&r2=310735
==============================================================================
--- trunk/addons/ooh323c/src/ooCapability.c (original)
+++ trunk/addons/ooh323c/src/ooCapability.c Mon Mar 14 16:51:35 2011
@@ -2710,6 +2710,12 @@
    switch(dataCap->application.t)
    {
    case T_H245DataApplicationCapability_application_t38fax:
+      if (dataCap->application.u.t38fax->t38FaxProfile.m.t38FaxUdpOptionsPresent) {
+      	call->T38FarMaxDatagram = dataCap->application.u.t38fax->t38FaxProfile.t38FaxUdpOptions.t38FaxMaxDatagram;
+      }
+      if (dataCap->application.u.t38fax->t38FaxProfile.m.versionPresent) {
+      	call->T38Version = dataCap->application.u.t38fax->t38FaxProfile.version;
+      }
       return ooCapabilityAddT38Capability(call, OO_T38,
                             		     dir, NULL, NULL, NULL, NULL,TRUE);
    default:




More information about the asterisk-commits mailing list