aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpcadach <pcadach@f38db490-d61c-443f-a65b-d21fe96a405b>2006-09-30 04:37:39 +0000
committerpcadach <pcadach@f38db490-d61c-443f-a65b-d21fe96a405b>2006-09-30 04:37:39 +0000
commit5a89bb458d51f19149ce6bd836f64c5b5fa38185 (patch)
tree59a66abb03d8b412b1f44d3346fc529ed825d3df
parente62fd590cc1b0d294f761820e53cba6c55cdf32a (diff)
Found some buggy SIP clients (phones Planet VIP-153T firmware
1.0, Linksys PAP2 firmware 3.1.9(LSc)) which sends ACK not on OK message only (when remote party answers) but on RINGING message too, so when we send 200 OK message, we get unidentified ACK message (because INVITE acknowledged on RINGING message already), so 200 OK retransmits within its retransmission interval then call gets dropped. If someone else knows how to provide workaround for such cases, please, fix it in correct way. Thanks to ssh from #asteriskru for provide access to his box to study and fix this case. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@44068 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--channels/chan_sip.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 7030741e8..79b9ecfe4 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -6109,6 +6109,8 @@ static int transmit_response_with_t38_sdp(struct sip_pvt *p, char *msg, struct s
add_t38_sdp(&resp, p);
} else
ast_log(LOG_ERROR, "Can't add SDP to response, since we have no UDPTL session allocated. Call-ID %s\n", p->callid);
+ if (retrans && !p->pendinginvite)
+ p->pendinginvite = seqno; /* Buggy clients sends ACK on RINGING too */
return send_response(p, &resp, retrans, seqno);
}
@@ -6147,6 +6149,8 @@ static int transmit_response_with_sdp(struct sip_pvt *p, const char *msg, const
add_sdp(&resp, p);
} else
ast_log(LOG_ERROR, "Can't add SDP to response, since we have no RTP session allocated. Call-ID %s\n", p->callid);
+ if (reliable && !p->pendinginvite)
+ p->pendinginvite = seqno; /* Buggy clients sends ACK on RINGING too */
return send_response(p, &resp, reliable, seqno);
}