aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-02 20:20:21 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-02 20:20:21 +0000
commit66b5b6c9daa19f3ddcf233322a9c9d8e9d0b7d6c (patch)
treeda8f8911804c0c3fff35c3513cbacb84c0dd1ddc /channels
parent75a6df99ed610eb7b8efe70fe82b077278283b9d (diff)
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) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@88328 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 070677769..5a8fb58d3 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -11003,7 +11003,12 @@ static void handle_request_info(struct sip_pvt *p, struct sip_request *req)
transmit_response(p, "403 Unauthorized", 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)) { */