add show distinct_channels (mix of show channels and show calls)

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13944 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2009-06-25 00:03:41 +00:00
parent 135d0b73de
commit b5f08ca5ce
3 changed files with 13 additions and 5 deletions
@@ -2822,6 +2822,11 @@ SWITCH_STANDARD_API(show_function)
as = argv[3];
}
}
} else if (!strcasecmp(command, "distinct_channels")) {
sprintf(sql, "select * from channels left join calls on channels.uuid=calls.caller_uuid where uuid in (select caller_uuid from calls) or (uuid not in (select caller_uuid from calls) and uuid not in (select callee_uuid from calls)) order by created_epoch");
if (argv[2] && !strcasecmp(argv[1], "as")) {
as = argv[2];
}
} else if (!strcasecmp(command, "aliases")) {
sprintf(sql, "select * from aliases order by alias");
} else if (!strcasecmp(command, "complete")) {