Connect. Communicate. Collaborate. Securely.

Home » Kerio User Forums » Kerio Operator » Get call history between given dates (Kerio Operator API, CallHistory.get)
  •  
xian

Messages: 4
Karma: 0
Send a private message to this user
Hi,


I need help in extracting Call History between 2 given dates using Kerio Operator API.

I know it can be done by sending a request to CallHistory.get, but my problem is how to make the parameter.

I am having difficulty figuring out which value for comparator is equivalent to >=, <=, < and > values.

I searched everywhere and so far I only got this:
Administration API: How to create a search query (sorry, I can't post the link)

Thanks in advance.

Regards,

Xian
  •  
kemp

Messages: 14
Karma: 0
Send a private message to this user
Theres no official documentation unfortunately and the official line is "use the developer tools in chrome to view the json requests and responses"

through trial and error i've found the following comparators

"Eq" is equals
"GreaterThan" is greater than
"LessThan" is less than

i'm struggling myself to add multiple conditions to a query.

eg i want all numbers to a certain number that have a answered duration of > 0

individually i can get these working

calls to a number

"conditions" => array(array(
"fieldName" => "TO_NUM" ,
"comparator" => "Eq" ,
"value" => 695
)),

calls with a answered duration greater than 0 seconds

"conditions" => array(array(
"fieldName" => "ANSWERED_DURATION",
"comparator" => "LessThan",
"value" => 0
)),

the question is how to combine these two conditions. I read in a kerio blog that

"combining" => 'AND',

can be used to do this but there was then no contextual example of how this works within the syntax of the query... very frustrating.

[Updated on: Tue, 05 September 2017 16:27]

  •  
Jan Pejša

Messages: 48
Karma: 3
Send a private message to this user
SearchQuery supports only queries with all AND operators (or all OR operators).

structure of the SearchQuery:
- fields (StringList)
- conditions (SubConditionList)
- combining (LogicalOperator)
- start (long)
- limit (long)
- orderBy (SortOrderList)

structure of the SubCondition:
- fieldName (string)
- comparator (CompareOperator)
- value (string)

so in your case it should be:

"combining" => "AND",
"conditions" => array(
	array(
		"fieldName" => "TO_NUM" ,
		"comparator" => "Eq" ,
		"value" => 695
	),
	array(
		"fieldName" => "ANSWERED_DURATION",
		"comparator" => "LessThan",
		"value" => 0
	)
),
...


But I'm not sure if it is working (if it was implemented).
Previous Topic: Is AJAM available?
Next Topic: Blokcing anonymous calls
Goto Forum:
  


Disclaimer:
Kerio discussion forums are intended for open communication between forum members and may contain information and material posted by members which may be useful in learning about Kerio products. The discussion forums are not intended to provide technical support for any specific product. Any information implied or expressed in the discussion forums is that of the posting member. Kerio is in no way responsible for the information posted in the forums, or its accuracy. Kerio employees may participate in the discussions, but their postings do not represent an offical position of the company on any issues raised or discussed. Kerio reserves the right to monitor and maintain the forums to promote free and accurate exchange of information.

Current Time: Mon Nov 20 01:20:39 CET 2017

Total time taken to generate the page: 0.00497 seconds
.:: Contact :: Home ::.
Powered by: FUDforum 3.0.4.