4

Has anyone successfully used a Python API to connect to Asterisk AMI? Maybe Starpy or py-asterisk, or even FATS?

If so can you please display examples or point to a link?

There seems to be very little documentation regarding the Python APIs.

JJJ
  • 32,902
  • 20
  • 89
  • 102
pdtpatrick
  • 175
  • 2
  • 8

6 Answers6

5

i am successfully using https://github.com/al-the-x/pyst for years

see usage example in the doc block here - https://github.com/al-the-x/pyst/blob/master/asterisk/manager.py

Frutik
  • 149
  • 2
  • 5
3

Did you check/try Pyst?

Wouter Dorgelo
  • 11,770
  • 11
  • 62
  • 80
3

Use pyst2, it's a fork of pyst. Last is not develops any more. http://pypi.python.org/pypi/pyst2/0.4

befire
  • 140
  • 1
  • 6
2

pyst on sourceforge seems to be alive again, and I'm using it.

lingfish
  • 422
  • 5
  • 6
0

Use pyst. Download it from sourceforge

Now just extract the tar file, go to the directory of pyst through terminal and enter following commands.

python setup.py install

Now, in your python script add

from asterisk.agi import *

Now you are all set to use asterisk with python.

0

I wrote panoramisk which is python3 only (old releases can work with python2.7)

https://github.com/gawel/panoramisk

gawel
  • 2,038
  • 14
  • 16