[asterisk-commits] file: trunk r88329 - in /trunk: ./ channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Nov 2 15:22:41 CDT 2007


Author: file
Date: Fri Nov  2 15:22:40 2007
New Revision: 88329

URL: http://svn.digium.com/view/asterisk?view=rev&rev=88329
Log:
Merged revisions 88328 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r88328 | file | 2007-11-02 17:20:21 -0300 (Fri, 02 Nov 2007) | 6 lines

If an INFO request within a dialog is received with a content length of 0 simply send back a 200 OK. It is valid to do this and the remote side is probably using it to make sure the signalling is still alive.
(closes issue #5747)
Reported by: chandi
Patches:
      infofix-81430-1.patch uploaded by IgorG (license 20)

........

Modified:
    trunk/   (props changed)
    trunk/channels/chan_sip.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=88329&r1=88328&r2=88329
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Fri Nov  2 15:22:40 2007
@@ -12341,7 +12341,12 @@
 		ast_debug(1, "Got a Request to Record the channel, state %s\n", c);
 		transmit_response(p, "200 OK", req);
 		return;
-	}
+	} else if (ast_strlen_zero(c = get_header(req, "Content-Length")) || !strcasecmp(c, "0")) {
+		/* This is probably just a packet making sure the signalling is still up, just send back a 200 OK */
+		transmit_response(p, "200 OK", req);
+		return;
+	}
+
 	/* Other type of INFO message, not really understood by Asterisk */
 	/* if (get_msg_text(buf, sizeof(buf), req)) { */
 




More information about the asterisk-commits mailing list