提交 669d6137 authored 作者: Jeremy Childs's avatar Jeremy Childs

FS7750: When using the api command group, there is no way to return the contact…

FS7750: When using the api command group, there is no way to return the contact list separated by :_:, which is required to group call extensions that have been multiply-registered.
上级 5e43c6dd
......@@ -513,7 +513,7 @@ SWITCH_STANDARD_APP(db_function)
static int group_callback(void *pArg, int argc, char **argv, char **columnNames)
{
callback_t *cbt = (callback_t *) pArg;
switch_snprintf(cbt->buf + strlen(cbt->buf), cbt->len - strlen(cbt->buf), "%s%c", argv[0], *argv[1]);
switch_snprintf(cbt->buf + strlen(cbt->buf), cbt->len - strlen(cbt->buf), "%s%s", argv[0], argv[1]);
cbt->matches++;
return 0;
}
......@@ -574,6 +574,9 @@ SWITCH_STANDARD_API(group_api_function)
if (!strcasecmp(argv[2], "order")) {
how = "|";
}
if (!strcasecmp(argv[2], "multi")) {
how = ":_:";
}
}
sql = switch_mprintf("select url,'%q' from group_data where groupname='%q'", how, argv[1]);
......@@ -583,8 +586,8 @@ SWITCH_STANDARD_API(group_api_function)
switch_safe_free(sql);
if (!zstr(buf)) {
*(buf + (strlen(buf) - 1)) = '\0';
}
*(buf + (strlen(buf) - strlen(how))) = '\0';
}
stream->write_function(stream, "%s", buf);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论