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) {