[asterisk-commits] pcadach: branch 1.4 r44068 - /branches/1.4/channels/chan_sip.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Sep 29 21:37:40 MST 2006


Author: pcadach
Date: Fri Sep 29 23:37:39 2006
New Revision: 44068

URL: http://svn.digium.com/view/asterisk?rev=44068&view=rev
Log:
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.

Modified:
    branches/1.4/channels/chan_sip.c

Modified: branches/1.4/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_sip.c?rev=44068&r1=44067&r2=44068&view=diff
==============================================================================
--- branches/1.4/channels/chan_sip.c (original)
+++ branches/1.4/channels/chan_sip.c Fri Sep 29 23:37:39 2006
@@ -6109,6 +6109,8 @@
 		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 @@
 		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);
 }
 



More information about the asterisk-commits mailing list