[asterisk-commits] kpfleming: branch 1.4 r213631 - /branches/1.4/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Aug 21 15:23:50 CDT 2009


Author: kpfleming
Date: Fri Aug 21 15:23:45 2009
New Revision: 213631

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=213631
Log:
Ensure that T.38 INVITEs generated by Asterisk properly result in T.38 being enabled.

(closes issue #15373)
Reported by: dcolombo
Patches:
      chan_sip.patch uploaded by mbrancaleoni (license 342)
Tested by: dcolombo, mbrancaleoni

Modified:
    branches/1.4/channels/chan_sip.c

Modified: branches/1.4/channels/chan_sip.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.4/channels/chan_sip.c?view=diff&rev=213631&r1=213630&r2=213631
==============================================================================
--- branches/1.4/channels/chan_sip.c (original)
+++ branches/1.4/channels/chan_sip.c Fri Aug 21 15:23:45 2009
@@ -5370,8 +5370,8 @@
 					ast_verbose("Found RTP video format %d\n", codec);
 				ast_rtp_set_m_type(newvideortp, codec);
 			}
-		} else if (p->udptl && ( (sscanf(m, "image %30d udptl t38%n", &x, &len) == 1 && len > 0) || 
-		 (sscanf(m, "image %30d UDPTL t38%n", &x, &len) == 1 && len >= 0) )) {
+		} else if (p->udptl && ((sscanf(m, "image %30d udptl t38%n", &x, &len) == 1 && len > 0) || 
+					(sscanf(m, "image %30d UDPTL t38%n", &x, &len) == 1 && len >= 0))) {
 			if (debug)
 				ast_verbose("Got T.38 offer in SDP in dialog %s\n", p->callid);
 			p->offered_media[SDP_IMAGE].offered = TRUE;
@@ -5379,9 +5379,11 @@
 			numberofmediastreams++;
 			
 			if (p->owner && p->lastinvite) {
-				p->t38.state = T38_PEER_REINVITE; /* T38 Offered in re-invite from remote party */
-				if (option_debug > 1)
-					ast_log(LOG_DEBUG, "T38 state changed to %d on channel %s\n", p->t38.state, p->owner ? p->owner->name : "<none>" );
+				if(p->t38.state != T38_LOCAL_REINVITE) {
+					p->t38.state = T38_PEER_REINVITE; /* T38 Offered in re-invite from remote party */
+					if (option_debug > 1)
+						ast_log(LOG_DEBUG, "T38 state changed to %d on channel %s\n", p->t38.state, p->owner ? p->owner->name : "<none>" );
+				}
 			} else {
 				p->t38.state = T38_PEER_DIRECT; /* T38 Offered directly from peer in first invite */
 				p->t38.direct = 1;




More information about the asterisk-commits mailing list