add optional call_id arg to sofia profile foo flush_inbound_reg [<call_id>]

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7965 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2008-03-25 22:06:48 +00:00
parent d57e0387e6
commit 9943975660
3 changed files with 29 additions and 4 deletions
+10 -4
View File
@@ -1325,10 +1325,16 @@ static switch_status_t cmd_profile(char **argv, int argc, switch_stream_handle_t
stream->write_function(stream, "Invalid Profile [%s]", switch_str_nil(profile_name));
return SWITCH_STATUS_SUCCESS;
}
if (!strcasecmp(argv[1], "flush_inbound_reg")) {
sofia_reg_check_expire(profile, 0);
stream->write_function(stream, "+OK\n");
if (argc > 2) {
sofia_reg_expire_call_id(profile, argv[2]);
stream->write_function(stream, "+OK flushing all registrations matching specified call_id\n");
} else {
sofia_reg_check_expire(profile, 0);
stream->write_function(stream, "+OK flushing all registrations\n");
}
goto done;
}
@@ -1542,7 +1548,7 @@ SWITCH_STANDARD_API(sofia_function)
const char *usage_string = "USAGE:\n"
"--------------------------------------------------------------------------------\n"
"sofia help\n"
"sofia profile <profile_name> [start|stop|restart|flush_inbound_reg|[register|unregister] [<gateway name>|all]] [reloadxml]\n"
"sofia profile <profile_name> [start|stop|restart|flush_inbound_reg [<call_id>]|[register|unregister] [<gateway name>|all]] [reloadxml]\n"
"sofia status [[profile | gateway] <name>]\n"
"sofia loglevel [0-9]\n"
"--------------------------------------------------------------------------------\n";