Connect. Communicate. Collaborate. Securely.

Home » Kerio User Forums » Kerio Operator » Documentation for API
  •  
kemp

Messages: 14
Karma: 0
Send a private message to this user
Hello,
Is there a manual for the API apart from the example files included when you download the api?

It was such a struggle guessing parameters for functions and also what syntax to use when filtering arrays.

Cheers
PHill
  •  
kemp

Messages: 14
Karma: 0
Send a private message to this user
HI Brian,
Thanks for the links. Is there no definitive documentation for the API which i can download rather than having to perform each action i want in the admin interface?

Cheers
Phill
  •  
Brian (GFI/Kerio)

Messages: 742
Karma: 71
Send a private message to this user
Hi Phill, unfortunately there is no reference for Kerio Operator, however the method of inspecting the communication is quite usable in my opinion.

Brian Carmichael
Instructional Content Architect
  •  
kemp

Messages: 14
Karma: 0
Send a private message to this user
How are you meant to inspect and retrieve the commands for actions not available in the admin interface, such as placing a call?

  •  
Brian (GFI/Kerio)

Messages: 742
Karma: 71
Send a private message to this user
You can also inspect the Kerio Phone web interface.
The instructions for configuring your application to interface with Kerio Phone are described in KB 1997.
http://manuals.gfi.com/en/kerio/operator/content/api/getting -started-with-the-kerio-product-apis-1997.htm

Brian Carmichael
Instructional Content Architect
  •  
kemp

Messages: 14
Karma: 0
Send a private message to this user
great, thanks. while i have you, is there any api function which can return the number which is calling an extension (not yet an active call)
  •  
Brian (GFI/Kerio)

Messages: 742
Karma: 71
Send a private message to this user
In this case, you can query the Status -> Calls every second or two and look for calls that have an incoming status. Here is what the request looks like based on the admin interface (which polls every 5 seconds):

{"jsonrpc":"2.0","id":1,"method":"Status.getCalls", "params":{"query":{"start":0,"limit":-1,"orderBy":[{ "columnName":"ANSWERED_DURATION","direction":"Asc"}]}}}

Brian Carmichael
Instructional Content Architect
  •  
kemp

Messages: 14
Karma: 0
Send a private message to this user
lovely, thank you.
  •  
kemp

Messages: 14
Karma: 0
Send a private message to this user
I seem to be getting an error "Cannot call "Status.getCalls". You have no right for this operation"

I'm full read/write admin user. Any idea what could be causing this?

[Updated on: Mon, 17 July 2017 10:06]

  •  
kemp

Messages: 14
Karma: 0
Send a private message to this user
OK, i'm further down the line but still unable to return the desired data.

I'm trying to get only calls with status 0 going to ext 695:

{"jsonrpc":"2.0","id":1,"method":"Status.getCalls", "params":{"query":{"combining":"And","conditions":[{ "fieldName":"STATUS","comparator":"Eq","value":"0"},{ "fieldName":"TO_NUM","comparator":"Eq","value":"695 "} ],"start":0,"limit":-1,"orderBy":[{"columnName":"ANSWERED_DURATION ","direction":"Desc"}]}}}


i seem to just get a full list of calls with the conditions ignored, am i using the wrong fieldName? is there a list of the actual API fieldNames that be queried?


  •  
Brian (GFI/Kerio)

Messages: 742
Karma: 71
Send a private message to this user
Did you have any success creating the correct query? Alternatively you could sort by the Status and limit the responses. Then parse the response on the client side.

Brian Carmichael
Instructional Content Architect
  •  
kemp

Messages: 14
Karma: 0
Send a private message to this user
Hi Brian , it's the filtering of results I'm having trouble with.

You are right I can parse at client side, however this relies on an actual script to run in FileMaker every 5 seconds or so which would collect the unfiltered response, filter it, then perform an action based on the status of the extension.

Unfortunately FileMaker is limited to one script thread at a time (client side) so the only solution is to have php get the filtered results and then call a FileMaker script when action is required .

Are we completely limited to the actions and fields referenced within what we see in developer tools in chrome ?
  •  
Brian (GFI/Kerio)

Messages: 742
Karma: 71
Send a private message to this user
There is no documentation for the Kerio Operator API, so the only method is the inspect the communication used by the web interface. You mentioned that you need to "collect the unfiltered response, filter it, then perform an action". Is there a reason you can't perform all of these actions in a single script?

Brian Carmichael
Instructional Content Architect
kemp

Messages: 14
Karma: 0
Send a private message to this user
Hi, yes you can, but the point is this listening script running at client side will stop the user performing other actions in our crm. Unfortunately there is no run script in background option.

I guess I'll explore using the asterisk ami instead as there seems to be documentation on that.

Thanks for your help anyway.
Previous Topic: Issues with consistency between Operator and Asterisk configurations
Next Topic: Trunk load balancing
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: Sun Sep 24 03:29:32 CEST 2017

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