Proposal for "AsteriskManager"

» Metadata » Status
  • Category: Networking
  • Proposer: DA 
  • License: BSD Style
» Description
Asterisk - an open source PBX - provides a manager API which enables a developer to send commands to the server to administer and control an array of PBX function. Examples of which are call origination, call monitoring, queue manipulation and status queries.

Other PHP libraries have been produced (off-Pear) for this but are relatively low level and require a knowledge of the Asterisk command interface.

This class provides a high level interface to the Asterisk manager API enabling a developer to control an Asterisk server via their PHP application/script using clearly named methods.

Related Links
Asterisk
Google Project Hosting Page (source repository)
Asterisk Manager API documentation

--
NB: I'm very, very interested to hear all comments and suggestions as this will be my first package and I want to get it right.
» Dependencies » Links
  • Asterisk PBX
  • PHP5
  • PEAR_Exception
» Timeline » Changelog
  • First Draft: 2008-03-15
  • Proposal: 2008-03-21
  • Call for Votes: 2008-05-03
  • DA
    [2008-03-22 16:05 UTC]

    Using PEAR_Exception.
    Cleared up if/else to reduce indentation.
    Stripped __construct of everything but assignments.
    Created connect method.
    Removed leading white space in various areas.
    Both password and username are no longer stored in the class. Passed to login when required.
    Made method names more intuitive ("getQueues", "getIaxPeers", etc).
    Explicitly declared each methods access level.
    Corrected class name to fit PEAR convention.
    Corrected file name.
    Examples updated to reflect changes.
  • DA
    [2008-03-24 13:23 UTC]

    All typos now fixed.
    $params array now optional for constructor method.
    Explicitly declared constructor method public.
    Added an auto_connect field to the $params array.
    File-level license comment changed (the "***" was just a flourish I added to separate the license text nicely ;) - but removed anyway)
    [See comment for further information on future features.]