mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-19 17:57:22 +00:00
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.
This commit is contained in:
parent
5e43c6dd25
commit
669d613777
@ -513,7 +513,7 @@ SWITCH_STANDARD_APP(db_function)
|
|||||||
static int group_callback(void *pArg, int argc, char **argv, char **columnNames)
|
static int group_callback(void *pArg, int argc, char **argv, char **columnNames)
|
||||||
{
|
{
|
||||||
callback_t *cbt = (callback_t *) pArg;
|
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++;
|
cbt->matches++;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -574,6 +574,9 @@ SWITCH_STANDARD_API(group_api_function)
|
|||||||
if (!strcasecmp(argv[2], "order")) {
|
if (!strcasecmp(argv[2], "order")) {
|
||||||
how = "|";
|
how = "|";
|
||||||
}
|
}
|
||||||
|
if (!strcasecmp(argv[2], "multi")) {
|
||||||
|
how = ":_:";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sql = switch_mprintf("select url,'%q' from group_data where groupname='%q'", how, argv[1]);
|
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);
|
switch_safe_free(sql);
|
||||||
|
|
||||||
if (!zstr(buf)) {
|
if (!zstr(buf)) {
|
||||||
*(buf + (strlen(buf) - 1)) = '\0';
|
*(buf + (strlen(buf) - strlen(how))) = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
stream->write_function(stream, "%s", buf);
|
stream->write_function(stream, "%s", buf);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user