AsterNET.ARI
AsterNET.ARI copied to clipboard
Event filtering call on application does nothing
The event filtering on ApplicationActions accepts filter object that is in implementation encapsulated into object with filter property causing REST API to neglect the request without any error response.
request.AddParameter("application/json", new { filter = filter }, ParameterType.RequestBody);
In this way application event filtering is not possible to use. Can you correct implementation to provide filter object directly? BTW, is it possible to set serializer options to use camelCase by default?
I faced this issue.. I'm using a copy of the library (and a fork from someone else) to work around a couple of issues. It doesn't like it is being actively maintained at this point?
Anyway, in the ApplicationActions.cs file I changed the Filter() method to:
request.AddParameter("application/json", filter, ParameterType.RequestBody);
That got the filtering working. It helped solve an issue with lots of unwanted ChannelVarset and ChannelDialplan messages which were breaking the websocket connection. It was over a WAN, and changing timeout settings didn't help. Filtering the unwanted events did the trick.