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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@213631 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin P. Fleming
2009-08-21 20:23:45 +00:00
parent 1ea4af21ca
commit 79221dad8d

View File

@@ -5370,8 +5370,8 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req)
ast_verbose("Found RTP video format %d\n", codec); ast_verbose("Found RTP video format %d\n", codec);
ast_rtp_set_m_type(newvideortp, codec); ast_rtp_set_m_type(newvideortp, codec);
} }
} else if (p->udptl && ( (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) )) { (sscanf(m, "image %30d UDPTL t38%n", &x, &len) == 1 && len >= 0))) {
if (debug) if (debug)
ast_verbose("Got T.38 offer in SDP in dialog %s\n", p->callid); ast_verbose("Got T.38 offer in SDP in dialog %s\n", p->callid);
p->offered_media[SDP_IMAGE].offered = TRUE; p->offered_media[SDP_IMAGE].offered = TRUE;
@@ -5379,9 +5379,11 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req)
numberofmediastreams++; numberofmediastreams++;
if (p->owner && p->lastinvite) { if (p->owner && p->lastinvite) {
p->t38.state = T38_PEER_REINVITE; /* T38 Offered in re-invite from remote party */ if(p->t38.state != T38_LOCAL_REINVITE) {
if (option_debug > 1) p->t38.state = T38_PEER_REINVITE; /* T38 Offered in re-invite from remote party */
ast_log(LOG_DEBUG, "T38 state changed to %d on channel %s\n", p->t38.state, p->owner ? p->owner->name : "<none>" ); 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 { } else {
p->t38.state = T38_PEER_DIRECT; /* T38 Offered directly from peer in first invite */ p->t38.state = T38_PEER_DIRECT; /* T38 Offered directly from peer in first invite */
p->t38.direct = 1; p->t38.direct = 1;