您的位置:首页 > 移动开发

The Architecture of Open Source Applications: Asterisk

2012-09-29 10:02 417 查看

The architecture of Asterisk



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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: