Pyajam
Introduction
AJAM (Asynchronous Javascript Asterisk Manager) is the new interface build upon HTTP to interact with Asterisk.
Introduced in asterisk 1.4. Returned datas are mostly formatted in XML.
Pyajam allow python programs to interact with an asterisk server using the AJAM interface, and in a pythonic way
Example
ajam = Pyajam(server='192.168.0.10', 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)
Features
- 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 and 1.6
Todo
- actions: initiate call, transfert call
- more pythonic: yes/no strings became True/False? values, integer converted from string to int
- smooth differences between 1.4 and 1.6 asterisk data formats
Download
- latest stable source archive (version 0.1.1): http://devedge.bour.cc/resources/pyajam/src/pyajam.latest.tar.gz
- download the trunk version from subversion: svn co http://devedge.bour.cc/svn/pyajam/trunk pyajam
Documentation
The complete documentation is available at http://devedge.bour.cc/resources/pyajam/doc
Contact
Pyajam is written by Guillaume Bour <guillaume@…>
Licence
Pyajam is distributed under GNU GPL v3 Licence.
Attachments
-
Pyajam-0.1-py2.5.egg
(15.2 KB) -
added by guillaume 2 years ago.
Pyajam egg install
