[Freeswitch-svn] [commit] r6177 - freeswitch/trunk/src/mod/endpoints/mod_sofia

Freeswitch SVN anthm at freeswitch.org
Wed Nov 7 14:39:24 EST 2007


Author: anthm
Date: Wed Nov  7 14:39:24 2007
New Revision: 6177

Modified:
   freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c

Log:
add flush_inbound_reg

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c	Wed Nov  7 14:39:24 2007
@@ -1182,6 +1182,12 @@
 		return SWITCH_STATUS_SUCCESS;
 	}
 
+	if (!strcasecmp(argv[1], "flush_inbound_reg")) {
+		sofia_reg_check_expire(profile, 0);
+		stream->write_function(stream, "+OK\n");
+		goto done;
+	}
+
 	if (!strcasecmp(argv[1], "register")) {
 		char *gname = argv[2];
 		sofia_gateway_t *gateway_ptr;
@@ -1263,8 +1269,12 @@
 				stream->write_function(stream, "restarting: %s", profile->name);
 			}
 		}
+		goto done;
 	}
 
+	stream->write_function(stream, "-ERR Unknown command!\n");
+
+
  done:
 
 	if (profile) {



More information about the Freeswitch-svn mailing list