The Architecture of Open Source Applications: Asterisk

The architecture of Asterisk

Asterisk Architecture

Lessons from the architecture of Asterisk

  • concepts of channel

Telephony endpoints are represented as channels, and they are connected by channel bridge. Channel bridge is responsible of chennal negotiation, codec and frame transport. Because the media transport technology of each endpoint may vary, each channel is assigned with a specific channel driver. So that channel API provides the telephony protocol abstraction which allows all other Asterisk features to work independently of the telephony protocol in use.

  • flexible call handling using the Asterisk dialplan

This flexible method is often called separating strategy and mechanism: Asterisk only implments the basic mechanism, leaving call routing configuration to user. Asterisk users can set up call routing by diaplan, which resides in the /etc/asterisk/extensions.conf file. The dialplan is made up of a series of call rules called extensions.

A simple example of diaplan:

; Define the rules for what happens when someone dials 1234.
;
exten => 1234,1,Answer()
    same => n,Playback(demo-congrats)
    same => n,Hangup()

Reference:

aosabook.org

原文地址:https://www.cnblogs.com/feisky/p/2700407.html