Service: zimbraVoice
Namespace: "urn:zimbraVoice"
SearchVoice SOAP Command

Search voice messages and call logs

Authorization token required true
Admin Authorization token required false

SearchVoiceRequest

    <SearchVoiceRequest query="{query-string}" [limit="{max-num-results} (Integer)"]
                           [offset="{0-based-offset} (Integer)"] [types="{comma-sep-list:voicemail|calllog}"]
                           [sortBy="{sort-by}"]> ## SearchVoiceRequest
        <storeprincipal [id="{id-of-user-in-the-backing-store}"] [name="{name-of-user-in-the-backing-store}"]
                            [accountNumber="{account-number}"] /> ## StorePrincipalSpec
    </SearchVoiceRequest>

The following table describes elements and attributes you can define within a <SearchVoiceRequest> element:

XPath Required / Optional Description
@query Required (only 1) Type:String
Query [mandatory]
Currently the only supported query clauses are phone:, in:, after:, before:
     phone:[(]{PHONE}[)] | ({PHONE} OR {PHONE} OR ...)
     in:[(]{FOLDERNAME}[)] | ({FOLDERNAME} OR {FOLDERNAME} OR ...)
     after:{DATE}
     before:{DATE}
 
phone [required] Phone number of the account that the voicemail or calllog items are involved with.
If no phone: clause is specified, no result will be returned.
in [optional] Name of Folder that the voicemail or calllog items are in.
If not specifed, default folders for the search are:
  • For voicemail type: inbox
  • For calllog type: all calllog folders:missedcall, answeredcall, placedcall
  • For trash type: trash
after [optional] Retrieve voicemail or calllog items on or after the date.
If no after: clause is specified, default is 01/01/1970 GMT.
before [optional] Retrieve voicemail or calllog items on or before the date.
If no before: clause is specified, default is the current day.
Supported format for DATE: mm/dd/yyyy
@limit Optional (0 or 1) Type:Integer
The maximum number of results to return. It defaults to 10 if not specified, and is capped by 1000
@offset Optional (0 or 1) Type:Integer
Specifies the 0-based offset into the results list to return as the first result for this search operation.
For example, limit=10 offset=30 will return the 31st through 40th results inclusive.
@types Optional (0 or 1) Type:String
Comma-separated list of search types. Legal values are: voicemail|calllog
(default is "voicemail")
@sortBy Optional (0 or 1) Type:String
Sort by: dateDesc|dateAsc|durDesc|durAsc|nameDesc|nameAsc [default:"dateDesc"]
  • durDesc: duration decending
  • durAsc: deration ascending
  • rest are the same as those for the sortBy attribute in <SearchRequest xmlns="urn:zimbraMail>
/storeprincipal Optional (0 or 1) Store Principal specification
/storeprincipal@id Optional (0 or 1) Type:String
ID of user in the backing store
/storeprincipal@name Optional (0 or 1) Type:String
Name of user in the backing store
/storeprincipal@accountNumber Optional (0 or 1) Type:String
Account Number

SearchVoiceResponse

    <SearchVoiceResponse sortBy="{sort-by}" offset="{offset} (int)" more="{more-flag} (0|1)"> ## SearchVoiceResponse
        (<vfi id="{folder-id}" u="{unread-count} (Long)" n="{msg-count} (Long)" /> ## VoiceFolderSummary)*
        List of any of: {
            <vm id="{message-id}" [f="{flags}"] phone="{phone}" l="{folder-id}" sf="{sort-field-value}"
                    du="{msg-duration-secs} (int)" d="{date} (long)"> ## VoiceMailItem
                <cp t="{address-type}" p="{personal-name}" n="{phone-number}" /> ## VoiceMailCallParty
                <content url="{url}" ct="{content-type}" /> ## VoiceMailContent
             </vm>
            <cl phone="{phone}" l="{folder-id}" sf="{sort-field-value}" du="{msg-duration-secs} (int)" d="{date} (long)"> ## CallLogItem
                (<cp ci="{city}" st="{state}" co="{country}" t="{address-type}" p="{personal-name}" n="{phone-number}" /> ## CallLogCallParty)*
             </cl>
        }
    </SearchVoiceResponse>

The following table describes elements and attributes you can define within a <SearchVoiceResponse> element:

XPath Required / Optional Description
@sortBy Required (only 1) Type:String
Actual sortBy used by the server
@offset Required (only 1) Type:int
Integer specifying the 0-based offset into the results list returned as the first result for this search operation. It is always the same as the offset attribute in the request.
@more Required (only 1) Type:0|1
Set if there are more search results remaining
/vfi Optional (0 or more) Voice folder summary
For certain search combinations, server is able to compute a folder inventory. If folder inventory is available on the server, a <vfi> tag is included for that folder.
Given the lack of a notification mechanism in the voice API infrastructure, clients can use this information to refresh the message count in the accordion if it is available.
/vfi@id Required (only 1) Type:String
Folder ID
/vfi@u Required (only 1) Type:Long
Unread count
/vfi@n Required (only 1) Type:Long
Message count
/vm Optional (0 or 1)
/vm@id Required (only 1) Type:String
Message ID
/vm@f Optional (0 or 1) Type:String
Flags = 'u'(nread), '!'(high priority), 'p'(rivate, i.e. message is not forwardable)
/vm@phone Required (only 1) Type:String
Phone to which the message is for
/vm@l Required (only 1) Type:String
Folder id of the folder in which the message resides
/vm@sf Required (only 1) Type:String
Value of the field this search is based on
/vm@du Required (only 1) Type:int
Message duration in seconds
/vm@d Required (only 1) Type:long
Timestamp when the message was deposited
/vm/cp Optional (0 or 1) Calling Party involved in the call or voice mail
/vm/cp@t Required (only 1) Type:String
Type of the address in {personal-name} and {phone-number}
The supported values are 'f'(rom) or 't'(o) (for voice mails it should always be 'f' because we only return caller info)
/vm/cp@p Required (only 1) Type:String
Personal name
/vm/cp@n Required (only 1) Type:String
Phone number
/vm/content Optional (0 or 1) Content
/vm/content@url Required (only 1) Type:String
Content servlet relative url for retrieving message content. This url will retrieve the binary voice content.
/vm/content@ct Required (only 1) Type:String
Content type
/cl Optional (0 or 1)
/cl@phone Required (only 1) Type:String
Phone to which the message is for
/cl@l Required (only 1) Type:String
Folder id of the folder in which the message resides
/cl@sf Required (only 1) Type:String
Value of the field this search is based on
/cl@du Required (only 1) Type:int
Message duration in seconds
/cl@d Required (only 1) Type:long
Timestamp when the message was deposited
/cl/cp Optional (0 or more) Parties involved in the call or voice mail. Information for both calling and called parties is returned
/cl/cp@ci Required (only 1) Type:String
City
/cl/cp@st Required (only 1) Type:String
State
/cl/cp@co Required (only 1) Type:String
Country
/cl/cp@t Required (only 1) Type:String
Type of the address in {personal-name} and {phone-number}
The supported values are 'f'(rom) or 't'(o) (for voice mails it should always be 'f' because we only return caller info)
/cl/cp@p Required (only 1) Type:String
Personal name
/cl/cp@n Required (only 1) Type:String
Phone number