From 126e9380c6a9ab424a57eda3b6de92a37e28dc53 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 7 Nov 2007 19:39:24 +0000 Subject: [PATCH] add flush_inbound_reg git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6177 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_sofia/mod_sofia.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index dee922c5de..18db756af4 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -1182,6 +1182,12 @@ static switch_status_t cmd_profile(char **argv, int argc, switch_stream_handle_t 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 @@ static switch_status_t cmd_profile(char **argv, int argc, switch_stream_handle_t stream->write_function(stream, "restarting: %s", profile->name); } } + goto done; } + stream->write_function(stream, "-ERR Unknown command!\n"); + + done: if (profile) {