summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Vossel <dvossel@digium.com>2009-09-02 16:08:00 +0000
committerDavid Vossel <dvossel@digium.com>2009-09-02 16:08:00 +0000
commitb5dc4efb582778c5746a4c611bce6ef6aaddf073 (patch)
treec29eeec4825652400c33e44f79ed64366089d907
parent7e7081439ae58da0dda0ac06f43f44b98fa075b5 (diff)
SIP support for keep-alive event
keep-alive events are used by Sipura/Linksys for NAT keepalive. There currently don't appear to be any problems with NAT, but everytime a keep-alive event is received, Asterisk responds with a "489 Bad event". This error may indicate to a user that NAT problems exist just because this even is not supported. Now, rather than respond with an error, the packet is consumed and a "200 ok" is sent just to indicate we received the packet. (issue #15084) Patches: chan_sip.keepalive.v1.diff uploaded by IgorG (license 20) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@215466 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-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 c803fc654..75e4bb589 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -19478,6 +19478,10 @@ static int handle_request_notify(struct sip_pvt *p, struct sip_request *req, str
}
transmit_response(p, "200 OK", req);
+ } else if (!strcmp(event, "keep-alive")) {
+ /* Used by Sipura/Linksys for NAT pinhole,
+ * just confirm that we recieved the packet. */
+ transmit_response(p, "200 OK", req);
} else {
/* We don't understand this event. */
transmit_response(p, "489 Bad event", req);