Question on the ARI Applications and eventFilter

The documentation for the ARI Applications eventFilter seems a bit different than other ARI documentation.

I’m trying to run a test where I set an eventFilter for my application named Test using a curl request. The request is accepted and Asterisk returns the application object. However, it never modifies the events allowed or disallowed. Any suggestions for what I am doing wrong?

curl -v -u myuser:mypassword -X PUT “http://myboxname:8088/ari/applications/Test/eventFilter” -H “Content-Type: application/json” -d ‘{“filter”:{“allowed”:[{“type”:“StasisStart”}],“disallowed”:[{“type”:“PlaybackContinuing”},{“type”:“PlaybackFinished”},{“type”:“PlaybackStarted”}]}}’

Try removing the outer “filter” object. Formatted for clarity, it should look like this…

{
  "allowed": [
    {
      "type": "StasisStart"
    }
  ],
  "disallowed": [
    {
      "type": "PlaybackContinuing"
    },
    {
      "type": "PlaybackFinished"
    },
    {
      "type": "PlaybackStarted"
    }
  ]
}

Also, do you have the websocket open when you’re running the curl request?

Thank you. That was my problem.

I was thrown off by the documentation…

Body parameter

  • filter: object - Specify which event types to allow/disallow

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.