About Afelio

Developers

Donations

Please donate to support the development. Thank you.

Sponsorships

Companies and philantropists, please consider sponsoring a work item from our roadmap.

Code Contributions

Developers familiar with BSD and/or MacOS X are welcome to contribute. Please read our coding standards and the licensing section.

Documents

Community

#afelio on irc.freenode.net

Afelio™

Scalable Telephony Server for BSD and MacOS X

Afelio logo

Afelio turns a BSD server or Macintosh computer into a private branch exchange telephone system (PBX) and multi-protocol voice over IP (VoIP) telephony server. In addition to VoIP telephony, Afelio provides many features usually found in proprietary PBX systems such as auto-attendant, call forwarding, call screening, call transfer, do-not-disturb (DND), interactive voice response (IVR), music-on-hold (MoH), voice conferencing, voicemail and others. Afelio is still work in progress. It is not based on Asterisk (a Linux PBX software).


Afelio Architecture


The Afelio telephony server consists of a core server for call control and one or more media/protocol servers, each one running as a separate process. The guiding principle is to keep the server core lean and clean and free of any direct network connections. Unix domain sockets are used to communicate with the core.

Communication between the server core and media/protocol server instances uses a version of the Woomera protocol amended to send media over domain sockets. For communication between admin utilities and the core a custom server control protocol will be used, also over domain sockets.

Afelio architecture
Architecture block diagram — the initial release will not implement all components shown.

Server Core Components

Loadable Server Core Modules

Libraries used in the Server Core

Media Servers

Control Agents


Platform Support


The following platforms will be supported by Afelio:

Support for Solaris is planned at some point in the future.
Whilst Linux is not currently an official target platform, Afelio should build and run on Linux.


Code Base, Build Environment, Releases


Xcode Icon

Afelio is being developed and tested on various BSD platforms and MacOS X. For BSD platforms a CMake based build system is being developed. On MacOS X, the build system is a native Xcode project. An initial release of Afelio was planned for Q2/2007 as a MacOS X port of Callweaver, which is an improved derivative of Asterisk. However, the objectives of the two projects have diverged and Afelio has become an independent project with its own architecture and code base, not containing any code from Asterisk nor Callweaver. In the process of redefining the Afelio project, release dates have slipped several times. Implementing all of the new architecture would take us well into 2008. However, since we aim to make an initial release before the end of 2007, it has been decided to reduce the feature set and functionality of the initial release to the absolute minimum, then add to that in subsequent releases. For a list of components deemed necessary in the initial release please refer to the Afelio roadmap.


Highlights


Highlights


Aqua GUI Integration


Aqua Blue

Any further work on the integrated PBX management GUI application for MacOS X "Macsterisk" is directed at migration to Afelio. Click here for more detail about Macsterisk.


Licensed On-hold Music


MoH

Sunrise has licensed royalty-free music for inclusion with Afelio as on-hold music. This music does not require any performance license to be played to callers over the telephone. However, the license is for non-commercial use only. When used as a business PBX, a one-time royalty-free license (per business) will need to be purchased from the publishing company.

The following royalty-free music is included with Afelio:


Property List based Configuration


Plist icon

Afelio uses a confguration engine which verifies that configuration data is correct before accepting it as input. The NeXT property list format is used for all configuration files. It is a hierarchic format which allows arbitrary key names and nested data structures, but unlike XML it is very intuitive and thus human readable and editable.

For more details, refer to the sample master configuration file


Support for Apple's USB Modems


Apple Modem

A media server for the Motorola SM56 modem used by Apple in recent Macs and in the external Apple USB modem is now under development. The media server will provide a socket based interface to Apple's modem driver software in full-duplex mode. This will allow the use of the SM56 modem to make and receive telephone calls on Macintosh computers running Afelio.


Support for PCI Telephony Interface Cards


The following PCI telephony interface cards will be supported on BSD systems running Afelio:


Afelio Roadmap


Roadmap

Afelio development is mostly carried by volunteered work and sponsorships. It is therefore not always possible to give a time line or priorities for individual work units. Work units listed below are divided into three groups: pre-release, post-release and long-term.

Work units to be completed for the initial release

Core system components

Loadable core modules

Media servers

Control utilities and agents

GUI components

National numbering plans

Voice prompts and on-hold music

Work units to be worked on soon after the initial release

Core system components

Loadable core modules

Media servers

Control utilities and agents

GUI components

National numbering plans

Voice prompts and on-hold music

Miscellaneous

Long-term and low-priority work units

Core system components

Loadable core modules

Media servers

Control utilities and agents


Coding Practises


Coding practises

Although most Afelio contributors will have previously been working on Asterisk code, strictest avoidance of Asterisk coding practises is necessary in order to ensure reliability and maintainability of the Afelio code base. Persons who have been working on Asterisk code but did not find anything wrong with it are probably unfit to work on Afelio without retraining.


Project coding standards


Licensing


Copyright symbol

All software components developed by Sunrise for Afelio are licensed under the Sunrise Open Source License which is an MIT style license. Contributions of replacement code can only be accepted if they are either licensed under this license or an MIT style license or the revised 3-clause BSD license.

However, some of the components which make up the Afelio project link to GPL licensed libraries which means that the restrictions of the GPL license terms will apply to such components as a whole, even if individual parts are licensed under less restrictive license terms. Amendments and bug fixes to such GPL licensed portions may be contributed under GPL terms, but replacements for such portions may not be contributed under GPL terms.


Afelio FAQ


Frequently Asked Questions about Afelio.


Comparison of Afelio, Asterisk and Callweaver


Toolchain

AfelioAsterisk ∙ Callweaver
revision control CVS, migration to CVSnt planned SVN
compilers C99 C99, bison, m4
build system CMake, Xcode on MacOS X GNU autotools (YIKES!)
packaging BSD ports, Iceberg on MacOS X not integrated, up to individual maintainers

Switching core

AfelioAsterisk ∙ Callweaver
concurrency mixed use of pthreads, coroutines and lock-free algorithms, minimal use of mutex locks pthreads, race conditions and livelocks due to overzealous use of mutex locks
internal
storage
lock-free hash table
with built-in reference counting
singly linked lists, whole-list mutex locks,
no memory management
configuration system integrity checking of configuration data using recursive descent parser for property list configuration files based on formal grammar configuration data read without checking, using guesser instead of parser, INI derived configuration files, no formal grammar
timing reference kernel based timers Asterisk requires Digium hardware,
Callweaver uses kernel based timers
digital signal processing uses SpanDSP library Asterisk uses homegrown DSP code,
Callweaver uses SpanDSP library
dialplan
engine
efficient parameter driven dialplan engine implemented in C, optional scripting engine using embedded actor based OO scripting language, see www.iolanguage.com archaic dialplan engine using a naively implemented and very inefficient homegrown scripting engine, no tokenizing, no syntax check on load, errors abort phone calls
call origination API firmly integrated into switching core, call bridge uses coroutines for scalability no API, instead calls are bridged using a loadable dialplan engine utility, doesn't scale
remote control & monitoring remote control and monitoring system based on scalable client-agent-server architecture remote control and monitoring system doesn't scale, represents bottleneck, client requests can seriously disrupt phone calls
protocol/driver interfaces all protocol stacks and driver interfaces run as dedicated processes, separate from the switching core, IPC via domain sockets protocol stacks and driver interfaces are required inside switching core, doesn't scale, exposes core to network, difficult to maintain
security switching core is never exposed to network, predetermined loadable components can only provide implementations of delegates which are firm part of the core API, configuration data is always checked single-daemon approach exposes switching core to network, loadable modules can inject code bypassing the switching core, configuration data is not checked, malicious data input leads to vulnerabilities

External components 1

AfelioAsterisk ∙ Callweaver
command line utility separate CLI utility, rpc based protocol between client utility and server, no CLI input processing in the core CLI input processing inside switching core, CLI requests can seriously disrupt phone calls, CLI problems can take down server
media servers dedicated daemons for protocols and driver interfaces, managed by switching core, using woomera over domain sockets for signaling and media protocol stacks and driver interfaces are required inside switching core, but a woomera plugin module is available through which media servers can be utilised
remote control & monitoring agents dedicated daemons for remote control and monitoring, managed by switching core, using rpc based protocol over domain sockets between agents and core remote control and monitoring interfaces are required inside switching core, switching core incorporates IP-socket server, in addition Asterisk core embeds http server
GUI web GUI, native Cocoa GUI on MacOS X recent versions of Asterisk have a web GUI,
no GUI for Callweaver

Project focus and philosophy

AfelioAsteriskCallweaver
OS focus BSD centric Linux centric Linux centric
development focus scalability, reliability, security features, features, features fax over IP, patches
philosophy code correctness, as simple as possible, not any simpler sell more Digium hardware, worshipping Digium's CTO corporate involvement is evil, worshipping the GPL

Project organisation

AfelioAsteriskCallweaver
form of organisation company sponsored project company sponsored project informal, loosely knit cooperative of individuals
legal representation Sunrise Telephone Systems Digium none
project management Sunrise Telephone Systems Digium appointed council no management, direction determined by happenstance
governance guidelines by council none, cozy anarchy

Methodologies

AfelioAsteriskCallweaver
documenting design mandatory up to each individual up to each individual
design approval by peer review by appointed council no approval required
data encapsulation mandatory never used never used
abstraction mandatory frowned upon desired but seldomly used

Licensing

AfelioAsteriskCallweaver
release license Sunrise Open Source License
an MIT style license
Dual licensing:
GPL and Digium proprietary
GNU General Public License
aka GPL
contributions require SOSL, MIT or revised 3-clause BSD licensing require rights to be assigned to Digium require GPL or GPL compatible licensing

1 components which are external to the switching core according to the Afelio model


Mailing Lists



Source Code Repository


Web Viewer

http://repo.afelio.org

CVS Login

cvs -d :pserver:username@repo.afelio.org:/Public/CVS login


Screenshots


Work in Progress — Xcode Build Environment

Afelio in Xcode

 

BSD Telephony, BSD Telephony Project