[asterisk-commits] dvossel: trunk r215466 - /trunk/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Sep 2 11:08:05 CDT 2009


Author: dvossel
Date: Wed Sep  2 11:08:00 2009
New Revision: 215466

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=215466
Log:
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)



Modified:
    trunk/channels/chan_sip.c

Modified: trunk/channels/chan_sip.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=215466&r1=215465&r2=215466
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Wed Sep  2 11:08:00 2009
@@ -19478,6 +19478,10 @@
 		}
 
 		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);




More information about the asterisk-commits mailing list