* Rupa Schomaker <rupa@rupa.com>
* Joseph Sullivan <jossulli@amazon.com>
* Raymond Chandler <intralanman@freeswitch.org>
- *
+ * Seven Du <dujinfang@gmail.com>
* Garmt Boekholt <garmt@cimico.com>
*
* mod_commands.c -- Misc. Command Module
switch_console_set_complete("add alias add");
+ switch_console_set_complete("add alias stickyadd");
switch_console_set_complete("add alias del");
switch_console_set_complete("add coalesce");
switch_console_set_complete("add complete add");
switch_cache_db_handle_t *db = NULL;
char *sql = NULL;
+ if (!strcmp(argv[1], argv[2])) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Alias and command cannot be the same, this will cause loop!\n");
+ return SWITCH_STATUS_FALSE;
+ }
+
if (switch_core_db_handle(&db) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Database Error\n");
free(mydata);