Skip to end of metadata
Go to start of metadata
You are viewing an old version of this page. View the current version. Compare with Current  |   View Page History

<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[

Zend Framework: Zend_Telephony_Asterisk Component Proposal

Proposed Component Name Zend_Telephony_Asterisk
Developer Notes
Proposers Dolf Schimmel (Freeaqingme)
Zend Liaison A smart person from the CR-Team perhaps?
Revision 0.1 - 29 December 2010: Initial Draft (wiki revision: 5)
0.1.1 - 26 February 2011: Fixed layout (wiki revision: 13)

Table of Contents

1. Overview

Zend_Asterisk is a component that provides means for easy communication with an Asterisk PBX.

2. References

3. Component Requirements, Constraints, and Acceptance Criteria

  • This component will provide means to communicate with the Asterisk PBX using its AGI IPC protocol.
  • This component will provide means to manage an instance of Asterisk PBX using its AMI protocol/socket.
  • This component may provide an alternative or supplement to AJAM.
  • This component may (at a later stage) provide means to communicate with Asterisk's channel-API, its application API, its codec translator API and its file format API.
  • This component may correctly reads a developers mind for intent and generate the right configuration file.
  • This component, and its documentation will assume basic knowledge of Telephony systems and Asterisk in specific.

4. Dependencies on Other Framework Components

  • Zend\Exception
  • Something that handles events

5. Theory of Operation

AGI is a protocol invented, and used by Asterisk to invoke an application separate from Asterisk, e.g. a ZF2 application. In the asterisk dialplan you can specify at what point the application needs to be invoked. At that specified point the application is called as an executable and various arguments about the current call are supplied via STDIN.
In the app (which is basically run in CLI mode), the Asterisk\Agi component is instantiated, and it will read the supplied arguments from asterisk, these are stored as properties in the component, and cannot be changed after instantiation. Meaning that the AGI component basically represents one phonecall/channel.
Once the component has been instantiated and the arguments been parsed, one can specify commands which are then executed. Each command returns a boolean (true on success, false on failure (makes sense, right?)), and if the asterisk server supplied additional data with the component it is stored as property in the component, from which it can be later retrieved, prior to performing the next command.

6. Milestones / Tasks

  • Milestone 0: [DONE] Thought a bit about it
  • Milestone 1: design notes will be published here.
  • Milestone 2: Working prototype checked into the incubator.
  • Milestone 3: Proposal is announced to both the Asterisk and ZF community.
  • Milestone 4: Proposal is accepted
  • Milestone 5: ZF rocks even more.

7. Class Index

  • Zend\Telephony\Asterisk\Agi
  • Zend\Telephony\Asterisk\Ami
  • Relevant exception classes

8. Use Cases

9. Class Skeletons

Code is still a WIP, but can be found on github, here:

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.