Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • BackTrack 5 R2
  • Wine 1.4 / 1.5.5
  • Mozilla Firefox 12...
  • Ubuntu 11.04
  • Angry Birds 1.1.2.1
  • Ubuntu 10.04.4 LTS
  • Linux Kernel 3.4
  • Ubuntu Manual 10.10
  • Adobe Flash Player...
  • Pidgin 2.10.4
  • Home > Linux > Programming > Libraries

    Pyst 0.4.38

    Download button

    No screenshots available
    Downloads: 259  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Ralf Schlatterbeck | More programs
    Python License / FREE
    May 12th, 2012, 22:43 GMT [view history]
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    Pyst description

    A Python Interface to Asterisk

    Pyst is a Python module that consists of a set of interfaces and libraries to allow programming of Asterisk from Python. The library currently supports AGI, AMI, and the parsing of Asterisk configuration files. The library also includes debugging facilities for AGI.

    Installation is the standard python install:

    tar xvf pyst.tar.gz
    cd pyst
    python setup.py install --prefix=/usr/local


    Documentation is currently only in python docstrings, you can use pythons built-in help facility:

    import asterisk
    help (asterisk)
    import asterisk.agi
    help (asterisk.agi)
    import asterisk.manager
    help (asterisk.manager)
    import asterisk.config
    help (asterisk.config)


    Some notes on platforms: We now specify "platforms = 'Any'" in setup.py. This means, the manager part of the package will probably run on any platform. The agi scripts on the other hand are called directly on the host where Asterisk is running. Since Asterisk doesn't run on windows platforms (and probably never will) the agi part of the package can only be run on Asterisk platforms.

    Credits

    Thanks to Karl Putland for writing the original package. Thanks to Matthew Nicholson for maintaining the package for some years and for handing over maintenance when he was no longer interested.

    Things to do for pyst

    This is the original changelog merged into the readme file. I'm not so sure I really want to change all these things (in particular the threaded implementation looks good to me). I will maintain a section summarizing the changes in this README, the ChangeLog won't be maintained any longer. Detailed changes will be available in the version control tool (currently svn).

     * ChangeLog: The ChangeLog needs to be updated from the monotone logs.
     * Documentation: All of pyst's inline documentation needs to be updated.
     * manager.py: This should be convereted to be single threaded. Also there is a race condition when a user calls manager.logoff() followed by manager.close(). The close() function may still call logoff again if the socket thread has not yet cleared the _connected flag.

     A class should be made for each manager action rather than having a function in a manager class. The manager class should be adapted to have a send method that know the general format of the classes.

    Matthew Nicholson writes on the mailinglist (note that I'm not sure I'll do this, I'm currently satisfied with the threaded implementation):

     For pyst 0.3 I am planning to clean up the manager.py. There are several know issues with the code. No one has actually reported these as problems, but I have personally had trouble with these. Currently manager.py runs in several threads, the main program thread, a thread to read from the network, and an event distribution thread. This causes problems with non thread safe code such as the MySQLdb libraries. This design also causes problems when an event handler throws an exception that causes the event processing thread to terminate.

     The second problem is with the way actions are sent. Each action has a specific function associated with it in the manager object that takes all possible arguments that may ever be passed to that action. This makes the api somewhat rigid and the Manager object cluttered.

     To solve these problems I am basically going to copy the design of my Astxx manager library (written in c++) and make it more python like. Each action will be a different object with certain methods to handle various tasks, with one function in the actual Manager class to send the action. This will make the Manager class much smaller and much more flexible. The current code will be consolidated into a single threaded design with hooks to have the library process events and such. These hooks will be called from the host application's main loop.

    Upgrading from older versions

    If upgrading from...

     * 0.2:

    - get_header() methods in manager.py now work like dict.get() instead of dict[key]

     * 0.1.0:

    - agi.get_variable no longer throws an exception, instead it returns an empty string when a channel variable is not set.
     o manager.quit() has be renamed to manager.close()

    Source Code Repository Access

    The current versions are kept in a Subversion repository on Sourceforge. You can check out the trunk with:

    svn co https://pyst.svn.sourceforge.net/svnroot/pyst/pyst/trunk pyst

    There is also a 0.2 branch in:

    https://pyst.svn.sourceforge.net/svnroot/pyst/pyst/branches/0.2

    which contains unreleased changes after 0.2 (which have been merged into trunk after changing how manager commands to asterisk are parsed).

    Released versions are in:

    https://pyst.svn.sourceforge.net/svnroot/pyst/pyst/tags

    For versions prior to the 0.2 release when Matthew Nicholson was maintaining pyst, the changes are kept in a monotone repository (monotone is a free distributed version control system). Please contact Matthew via Sourceforge if you're interested in intermediate versions.

    prior to that the sources are in the CVS repository on sourceforge.


    Product's homepage

    Requirements:

    · Python

    What's New in This Release: [ read full changelog ]

    · This version adds small feature extensions to the AGI and Manager modules and a regression test which now covers some aspects of the manager API.

      


    TAGS:

    Asterisk interface | Python interface | Asterisk programming | Asterisk | interface | Python



    HTML code for linking to this page:


    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM