add 2 more fields

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16699 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2010-02-18 23:53:56 +00:00
parent 625b477c95
commit 6fee14c327
1 changed files with 6 additions and 3 deletions

View File

@ -3986,16 +3986,18 @@ static int api_list_callback(void *pArg, int argc, char **argv, char **columnNam
{
switch_stream_handle_t *stream = (switch_stream_handle_t *) pArg;
if (!strcasecmp(argv[5], "xml")) {
if (!strcasecmp(argv[7], "xml")) {
stream->write_function(stream, " <message>\n");
stream->write_function(stream, " <username>%s</username>\n", argv[0]);
stream->write_function(stream, " <domain>%s</domain>\n", argv[1]);
stream->write_function(stream, " <folder>%s</folder>\n", argv[2]);
stream->write_function(stream, " <path>%s</path>\n", argv[3]);
stream->write_function(stream, " <uuid>%s</uuid>\n", argv[4]);
stream->write_function(stream, " <cid-name>%s</cid-name>\n", argv[5]);
stream->write_function(stream, " <cid-number>%s</cid-number>\n", argv[5]);
stream->write_function(stream, " </message>\n");
} else {
stream->write_function(stream, "%s:%s:%s:%s:%s\n", argv[0], argv[1], argv[2], argv[3], argv[4]);
stream->write_function(stream, "%s:%s:%s:%s:%s:%s:%s\n", argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]);
}
return 0;
@ -4033,7 +4035,8 @@ SWITCH_STANDARD_API(voicemail_list_api_function)
}
if (id && domain && profile_name && (profile = get_profile(profile_name))) {
sql = switch_mprintf("select username, domain, in_folder, file_path, uuid, '%q' from voicemail_msgs where username='%q' and domain='%q'",
sql = switch_mprintf("select username, domain, in_folder, file_path, uuid, cid_name, cid_number, "
"'%q' from voicemail_msgs where username='%q' and domain='%q'",
format, id, domain);
if (!strcasecmp(format, "xml")) {