Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
67 lines (46 sloc) 1.73 KB


AJAM (Asynchronous Javascript Asterisk Manager) is the new interface build upon HTTP to interact with Asterisk. AJAM was Introduced in asterisk 1.4. Returned datas are mostly formatted in XML.

PyAjam is a python library allowing programs to interact with an asterisk server using the AJAM interface, in a pythonic way.


  • None


  • python 2.[5-7]

###Installation easy_install PyAjam


tar xvf pyajam.latest.tar.gz
cd reblok-* && ./ install


  • retrieve basic informations (sip/iax2 peers, sip peer details, sip registry)
  • catch asterisk events
  • information presented in a pythonic way (dict)
  • automatically reconnect to the asterisk server if connection lost
  • compatible with asterisk 1.4, 1.6, 1.8, 10 and 11


You can found PyAjam documentation at


>>> from pyajam import Pyajam

>>> ajam = Pyajam(server='', username='mspencer', password='*rocks!')
>>> if not ajam.login():
>>>		print "Invalid login"
>>>		sys.exit(1)

>>> # display list of peers (SIP and IAX2)
>>> print ajam.peers())
>>> # display peer 101 attributes
>>> peer  = ajam.sippeer('101'))

>>> # screenprint events
>>> def ajam_event_listener(data):
>>>		print data

>>> ajam.waitevent(async=False, callback=ajam_event_listener)


PyAjam is licensed under GNU GPL v3. It is developped by Guillaume Bour