Sophie

Sophie

distrib > Mandriva > 2009.0 > x86_64 > by-pkgid > 7f3ac9e98af8abfa85aaf22bf0af2969 > files > 5

asterisk-1.4.29.1-0.1mdv2009.0.src.rpm

--- channels/chan_sip.c.orig	2007-08-21 20:42:15.000000000 +0200
+++ channels/chan_sip.c	2007-09-09 13:45:49.000000000 +0200
@@ -10995,6 +10995,12 @@
 	/* Other type of INFO message, not really understood by Asterisk */
 	/* if (get_msg_text(buf, sizeof(buf), req)) { */
 
+	/* Nothing in the header is interesting, now check if content-length is 0 */ 
+	if (!strcasecmp(get_header(req, "Content-Length"), "0")) { 
+		transmit_response(p, "200 OK", req); 
+		return; 
+	} /* else ... there issomething in the message body, do something with it if you need to */ 
+
 	ast_log(LOG_WARNING, "Unable to parse INFO message from %s. Content %s\n", p->callid, buf);
 	transmit_response(p, "415 Unsupported media type", req);
 	return;