[Freeswitch-svn] [commit] r7482 - freeswitch/trunk/src/mod/endpoints/mod_sofia
Freeswitch SVN
mikej at freeswitch.org
Fri Feb 1 19:02:28 EST 2008
Author: mikej
Date: Fri Feb 1 19:02:28 2008
New Revision: 7482
Modified:
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
Log:
send 200 to keep-alive notifies. Thanks Norm.
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c Fri Feb 1 19:02:28 2008
@@ -90,8 +90,19 @@
{
switch_channel_t *channel = NULL;
+ /* make sure we have a proper event */
+ if (!sip || !sip->sip_event) {
+ goto error;
+ }
+
+ /* Automatically return a 200 OK for Event: keep-alive */
+ if (!strcasecmp(sip->sip_event->o_type, "keep-alive")) {
+ nua_respond(nh, SIP_200_OK, NUTAG_WITH_THIS(nua), TAG_END());
+ return;
+ }
+
/* make sure we have a proper "talk" event */
- if (!session || !sip || !sip->sip_event || strcasecmp(sip->sip_event->o_type, "talk")) {
+ if (!session || strcasecmp(sip->sip_event->o_type, "talk")) {
goto error;
}
More information about the Freeswitch-svn
mailing list