mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-28 06:04:20 +00:00
FS-9832 start a single gateway or _all_ gateways
This commit is contained in:
1 parent
8ab65c8c34
commit
50e0f0195e
3 files changed
+75
-7
No files matched your search
@@ -3346,6 +3346,22 @@ static switch_status_t cmd_profile(char **argv, int argc, switch_stream_handle_t
|
||||
}
|
||||
}
|
||||
|
||||
goto done;
|
||||
} else if (!strcasecmp(argv[1], "startgw")) {
|
||||
if (argc < 3) {
|
||||
stream->write_function(stream, "-ERR missing gw name\n");
|
||||
goto done;
|
||||
}
|
||||
|
||||
switch_xml_reload(&err);
|
||||
stream->write_function(stream, "Reload XML [%s]\n", err);
|
||||
|
||||
if (config_gateway(profile->name, argv[2]) == SWITCH_STATUS_SUCCESS) {
|
||||
stream->write_function(stream, "+OK start gateway %s complete\n", argv[2]);
|
||||
} else {
|
||||
stream->write_function(stream, "-ERR cannot add gateway %s for profile %s\n", argv[2], profile->name);
|
||||
}
|
||||
|
||||
goto done;
|
||||
}
|
||||
|
||||
@@ -6148,8 +6164,9 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_sofia_load)
|
||||
switch_console_set_complete("add sofia profile ::sofia::list_profiles stop wait");
|
||||
switch_console_set_complete("add sofia profile ::sofia::list_profiles flush_inbound_reg reboot");
|
||||
switch_console_set_complete("add sofia profile ::sofia::list_profiles ::[register:unregister all");
|
||||
switch_console_set_complete("add sofia profile ::sofia::list_profiles ::[register:unregister:killgw ::sofia::list_profile_gateway");
|
||||
switch_console_set_complete("add sofia profile ::sofia::list_profiles ::[register:unregister:killgw:startgw ::sofia::list_profile_gateway");
|
||||
switch_console_set_complete("add sofia profile ::sofia::list_profiles killgw _all_");
|
||||
switch_console_set_complete("add sofia profile ::sofia::list_profiles startgw _all_");
|
||||
switch_console_set_complete("add sofia profile ::sofia::list_profiles ::[siptrace:capture:watchdog ::[on:off");
|
||||
switch_console_set_complete("add sofia profile ::sofia::list_profiles gwlist ::[up:down");
|
||||
|
||||
|
||||
Reference in new issue
Block a user