]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add 2 more fields
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 18 Feb 2010 23:53:56 +0000 (23:53 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 18 Feb 2010 23:53:56 +0000 (23:53 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16699 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/applications/mod_voicemail/mod_voicemail.c

index 2ec4d59e5061e4e87dfcd1bb21b42e36e0d8afdf..140f773e827c2bc6804149c6739a6d4ae8dd885b 100644 (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")) {