Search Calls

Overview

Retrieves all CDRs that match a search filter.

The function is available as a HTTP GET or HTTP POST request.

Request

Search Calls:

http://<host>/verba/api?action=SearchCalls

Search Calls HTTP GET sample:

http://hostname/verba/api?action=SearchCalls&apiKey=3B54952C-74D9-4B84-B4F3-D5E818B7CD95&token=09835e02-6c10-11e0-bb22-ba324924019b&start=2011-01-01 00:00&end=2011-11-16 23:59

Detailed description of the API request elements:

URL parameterParameter example

Description

Requirements
actionaction=SearchCallsName of the HTTP API request.Mandatory
apiKeyapiKey=74c8eea0-50c6-40b2-9f3e-252ed501c3c8API key used to identify the application.Mandatory
tokentoken=09835e02-6c10-11e0-bb22-ba324924019bUnique identifier for authenticated sessions. After successful authentication, the API sends back a token, which has to be used for each request.Mandatory if authentication is configured for the given API key.
responseTyperesponseType=XML

Defines the format of the response of the API request. The following valid values apply:

  • XML: the response is formatted and structured in XML, designed for applications
  • HTML: the response is in human readable format and formatted using standard HTML; it can be directly displayed in any browser.
  • TEXT: simple clear text based response
If the parameter is missing, it defaults to XML.
statusstatus=ongoingDefines the focus of the call search:
  • ongoing - search ongoing calls
  • recorded - search already recorded calls (default value)
Optional
secondarysecondary=1If 1, then the secondary recordings will be returned too.Optional
startstart=2011-01-01 00:00

Start time of the search period.

Format is either "YYYY-MM-DD hh:mm:ss.SSS", "YYYY-MM-DD hh:mm:ss" or "YYYY-MM-DD hh:mm"

Mandatory
endend=2011-11-16 23:59

End time of the search period.

Format is either "YYYY-MM-DD hh:mm:ss.SSS", "YYYY-MM-DD hh:mm:ss" or "YYYY-MM-DD hh:mm"

Mandatory
endTimeFrom
endTimeTo
endTimeFrom=2011-01-01 00:00
endTimeTo=2011-01-01 10:00

In certain cases, it is required to filter for the end time of the conversation instead of the start time.
Use these parameters to define the interval of the end time of the returned conversations.
Note that the start and end parameters (filtering for the start time of the conversations) are still mandatory because of performance reasons, but those parameters can be set to a wider interval (+- 2 hours for example) to make sure they do not filter out relevant conversations.

Optional
anynumanynum=2017

Searched phone number part (searched both in called and caller id)

This parameter can be used multiple times to filter for multiple phone numbers. For example: ...&anynum=1222&anynum=3988&...

Optional
Must be URL encoded
anynameanyname=Joe

Searched name part (searched both in called and caller name)

This parameter can be used multiple times to filter for multiple names. For example: ...&anyname=Joe&anyname=Peter&...

Optional
Must be URL encoded
orderbyorderby=source_caller_idOrdering field. Values: same field names as in the result XML CDR (see below) Optional
orderorder=ascAscending or descending order. Values: "asc" or "desc"Optional
pagefirstpagefirst=30Row number of the first CDR to be included in the resultsOptional
pagelenpagelen=10Defines how many rows (CDRs) should be presented in one resultOptional
returnInvitationreturnInvitation=1If 1, then the Lync Invitation details acquired by Verba from the technical account will be returned in the response.Optional
returnSharedItemsreturnSharedItems=1If 1, then the corresponding shared items will be returned in the response.Optional
f_field_namef_meeting_id=WHBFM6DD

The results will be filtered by field_name = value
field_name has to be a valid field name of the section table in the database.

Optional
f_field_name_likef_meeting_id_like=WHBF%25

the same as f_field_name, but LIKE operation will be used in the SQL filter

Optional

returnMetadatareturnMetadata=1If 1, then the corresponding custom metadata will be returned in the response.Optional
meta

meta=[Metadata_Template]:[Field Name]=[value]

Example:
meta=Default:Text1=val

Encoded (correct) form:
meta=Default%3APhone XML List%3DItem1

This parameter can be specified multiple times (?meta=...&meta=...&meta=...)
The results will be filtered by the given Metadata Template (before the colon) and Field (between the colon and the equals sign) and its value (after the equals sign).

The default operator is "equals", but it can be changed by meta_relation=... parameter.
Examples:
- meta_relation=LIKE
- meta_relation=%21%3D (this is !=)
 If LIKE is specified, then the standard SQL LIKE patterns (%, _) can be used in the value part.
The meta_relation parameter should be used as many times as the meta parameter is used.

The Field can be referenced by the Display Name or the value of the Field Identifier field.

Optional
returnIMreturnIM=1If 1, then the corresponding IM messages will be returned in the response.Optional
returnTranscriptDBreturnTranscriptDB=1If 1, then the corresponding transcript will be returned in the response as stored in the database (clear text).Optional
returnTranscriptFilereturnTranscriptFile=1If 1, then the corresponding transcript will be returned in the response as stored in the transcript file (special transcript format) in Base64 format.Optional
returnVoiceQualityreturnVoiceQuality=1If 1, then the corresponding voice quality check results will be returned in the response.Optional
returnCustomUser
returnCustomUser=1If 1, then the associated user's custom fields will be returned in the response.Optional

Response

XML based response sample on success:

<?xml version = '1.0' encoding = 'UTF-8'?>
<verbacdrlist rowcount="1">
<verbacdr state="1" index="0">
  <startdate>2011-10-06 15:24:28.580</startdate>
  <enddate>2011-10-06 15:28:03.737</enddate>
  <starttime>2011-10-06 15:24:28.580</starttime>
  <endtime>2011-10-06 15:28:03.737</endtime>
  <start_time>2011-10-06 15:24:28.580</start_time>
  <end_time>2011-10-06 15:28:03.737</end_time>
  <duration>00:03:35</duration>
  <location>IP-0AE45E06</location>
  <archive_status>false</archive_status>
  <source_name>2017077068</source_name>
  <source_caller_id>2017077068</source_caller_id>
  <source_ip/>
  <destination_name>Verba Active Recorder</destination_name>
  <destination_caller_id>12012213874</destination_caller_id>
  <destination_ip/>
  <usercause>Normal</usercause>
  <defcause>Normal</defcause>
  <userdirection>Incoming</userdirection>
  <defdirection>Incoming</defdirection>
  <url>2011\10\06\47818808-f02f-11e0-8bf5-876cf2078e7c_(20111006162428579).wav</url>
  <audio_codec_id>4</audio_codec_id>
  <audio_codec>G.711 u-law 64k</audio_codec>
  <ccdr_id>47818808-f02f-11e0-8bf5-876cf2078e7c</ccdr_id>
  <ondemand>false</ondemand>
  <owner_eid>0000</owner_eid>
  <marked>1</marked>
  <commented>1</commented>
  <private>0</private>
  <secondary>false</secondary>
  <recorded_party>false</recorded_party>
  <meeting_id>WHBFM6DD</meeting_id>
  <exists_related_call>true</exists_related_call>
  <retention_auto_delete>false</retention_auto_delete>
  <cdr_media_type>1</cdr_media_type>
  <encryption_priv>false</encryption_priv>
  <primary_secondary>Primary</primary_secondary>
  <cdr_media_type_name>CDR</cdr_media_type_name>
  <in_recycle_bin>false</in_recycle_bin>
  <invitation_organizer_cn>boss@company.com</invitation_organizer_cn>
  <invitation_organizer_email>boss@company.com</invitation_organizer_email>
  <shared_item>
    <id>C853EE44-3C96-4DED-9086-E1D6D313BA55</id>
    <publisher>boss@company.com</publisher>
    <title>Lync Meeting WHBFM6DD</title>
    <publicity_level>public_to_everybody</publicity_level>
    <accessible_by_url>true</accessible_by_url>
    <allow_download>false</allow_download>
  </shared_item>
</verbacdr> 
</verbacdrlist>

XML based response sample on error:

<?xml version="1.0" encoding="UTF-8"?>

<VerbaApi>

<Response code="2" type="GetCallInformation">

<ErrorMessage>Unable to retrieve call information, because the call cannot be found.</ErrorMessage>

</Response>

</VerbaApi>