ARI Stasis script location

Hello, I am trying to follow the Introduction to ARI and Channels tutorial, but I cannot tie it into Getting Started with ARI tutorial. My current setup allows me to send ARI events to hello world but I can’t send them to the channel dump script. I feel like I’m missing the directory where I’m supposed to put the script so that it can be interpreted by the dialplan when needed, but I cannot find it.

Thanks in advance for the help.

ARI does not interpret or execute scripts. The scripts are run outside of Asterisk using whatever mechanism is needed and connects back to Asterisk using TCP.

1 Like

Thanks for that. I get an interpretation error when trying to run:

Traceback (most recent call last):
  File "channel-dump.py", line 3, in <module>
    import ari
  File "/usr/lib/python2.6/site-packages/ari-0.1.3-py2.6.egg/ari/__init__.py", line 8, in <module>
    import ari.client
  File "/usr/lib/python2.6/site-packages/ari-0.1.3-py2.6.egg/ari/client.py", line 32
    for (name, api) in self.swagger.resources.items()}
      ^
SyntaxError: invalid syntax

What version of Python do you have installed? That line also does look incorrect… but it’s from the package itself.

I have Python 2.6.6 and what I suppose is the latest version of ari-py.

I don’t know if the library has been tested/used with 2.6.6. I just tried the exact same script and library myself under Python 2.7.12 and it worked fine.

1 Like

Okay I’ll try updating to python 2.7 then.