Back to news

PyAsterisk Details (Python/XMLRPC)

Author: Matt Riddell
Daily Asterisk News
Ask Question

Embedded Python interpreter with example XMLRPC interface to replace the manager protocol

Excerpt from

This is the home of PyAsterisk, a program which has three main files:

  • res_python.c: A module in C that embeds a Python interpreter into the Asterisk PBX software.
  • A python wrapper around res_python (actually the '_asterisk' module) that gives a slightly cleaner and more object oriented interface to the API exposed by res_python.c
  • an object that defines the functions that are to be exposed via XMLRPC over HTTPS as it makes use of the (supplied)
Upon startup, res_python.c will attempt to import a method called start() from the PyAsteriskConfig module which must exist somewhere in the path. By default (this is set at compile time) the path includes /etc/asterisk/PyAsterisk and this is a good place to put the configuration file.


Related posts

Back to top

Ready to supercharge your business?

Dialer pricing from only $300 per month!