aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2008-02-27 15:31:09 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2008-02-27 15:31:09 +0000
commit8ce7f28b4c2cb1fbe79b82f470a696ea9d477761 (patch)
tree1867edca5ecf2e01a23cc8f11b7ba67c3d47773c /channels
parent31b8fe50815817a3b89c8cb17e5aec3d6286c2f1 (diff)
Fix T38 passthrough regression introduced by state changes.
(closes issue #12078) Reported by: dimas Patches: v1-12078.patch uploaded by dimas (license 88) (closes issue #12074) Reported by: Ivan git-svn-id: http://svn.digium.com/svn/asterisk/trunk@104533 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index dcf922689..d6e427265 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -14521,12 +14521,12 @@ static void handle_response_invite(struct sip_pvt *p, int resp, char *rest, stru
if (IS_SIP_TECH(bridgepeer->tech)) {
bridgepvt = (struct sip_pvt*)(bridgepeer->tech_pvt);
if (bridgepvt->udptl) {
- if (p->t38.state == T38_PEER_REINVITE) {
+ if (p->t38.state == T38_ENABLED && bridgepvt->t38.state == T38_PEER_REINVITE) {
sip_handle_t38_reinvite(bridgepeer, p, 0);
ast_rtp_set_rtptimers_onhold(p->rtp);
if (p->vrtp)
ast_rtp_set_rtptimers_onhold(p->vrtp); /* Turn off RTP timers while we send fax */
- } else if (p->t38.state == T38_DISABLED && bridgepeer && (bridgepvt->t38.state == T38_ENABLED)) {
+ } else if (p->t38.state == T38_DISABLED && bridgepvt->t38.state == T38_ENABLED) {
ast_log(LOG_WARNING, "RTP re-invite after T38 session not handled yet !\n");
/* Insted of this we should somehow re-invite the other side of the bridge to RTP */
/* XXXX Should we really destroy this session here, without any response at all??? */
@@ -14545,10 +14545,6 @@ static void handle_response_invite(struct sip_pvt *p, int resp, char *rest, stru
change_t38_state(p, T38_DISABLED);
}
}
- if ((p->t38.state == T38_LOCAL_REINVITE) || (p->t38.state == T38_LOCAL_DIRECT)) {
- /* If there was T38 reinvite and we are supposed to answer with 200 OK than this should set us to T38 negotiated mode */
- change_t38_state(p, T38_ENABLED);
- }
if (!req->ignore && p->owner) {
if (!reinvite) {
@@ -20795,6 +20791,7 @@ static int sip_handle_t38_reinvite(struct ast_channel *chan, struct sip_pvt *pvt
ast_debug(3, "Sending reinvite on SIP '%s' - It's UDPTL soon redirected to IP %s:%d\n", p->callid, ast_inet_ntoa(p->udptlredirip.sin_addr), ntohs(p->udptlredirip.sin_port));
else
ast_debug(3, "Sending reinvite on SIP '%s' - It's UDPTL soon redirected to us (IP %s)\n", p->callid, ast_inet_ntoa(p->ourip.sin_addr));
+ change_t38_state(p, T38_LOCAL_REINVITE);
transmit_reinvite_with_sdp(p, TRUE, FALSE);
} else if (!ast_test_flag(&p->flags[0], SIP_PENDINGBYE)) {
if (flag)