Asterisk

Russell Bryant

Asterisk1 is an open source telephony applications platform distributed under the GPLv2. In short, it is a server application for making, receiving, and performing custom processing of phone calls.

The project was started by Mark Spencer in 1999. Mark had a company called Linux Support Services and he needed a phone system to help operate his business. He did not have a lot of money to spend on buying one, so he just made his own. As the popularity of Asterisk grew, Linux Support Services shifted focus to Asterisk and changed its name to Digium, Inc.

The name Asterisk comes from the Unix wildcard character, *. The goal for the Asterisk project is to do everything telephony. Through pursuing this goal, Asterisk now supports a long list of technologies for making and receiving phone calls. This includes many VoIP (Voice over IP) protocols, as well as both analog and digital connectivity to the traditional telephone network, or the PSTN (Public Switched Telephone Network). This ability to get many different types of phone calls into and out of the system is one of Asterisk's main strengths.

Once phone calls are made to and from an Asterisk system, there are many additional features that can be used to customize the processing of the phone call. Some features are larger pre-built common applications, such as voicemail. There are other smaller features that can be combined together to create custom voice applications, such as playing back a sound file, reading digits, or speech recognition.

1.1. Critical Architectural Concepts

This section discusses some architectural concepts that are critical to all parts of Asterisk. These ideas are at the foundation of the Asterisk architecture.

1.1.1. Channels

A channel in Asterisk represents a connection between the Asterisk system and some telephony endpoint (Figure 1.1). The most common example is when a phone makes a call into an Asterisk system. This connection is represented by a single channel. In the Asterisk code, a channel exists as an instance of the ast_channel data structure. This call scenario could be a caller interacting with voicemail, for example.

Figure 1.1: A Single Call Leg, Represented by a Single Channel

1.1.2. Channel Bridging

Perhaps a more familiar call scenario would be a connection between two phones, where a person using phone A has called a person on phone B. In this call scenario, there are two telephony endpoints connected to the Asterisk system, so two channels exist for this call (Figure 1.2).

Figure 1.2: Two Call Legs Represented by Two Channels

When Asterisk channels are connected like this, it is referred to as a channel bridge. Channel bridging is the act of connecting channels together for the purpose of passing media between them. The media stream is most commonly an audio stream. However, there may also be a video or a text stream in the call. Even in the case where there is more than one media stream (such as both audio and video), it is still handled by a single channel for each end of the call in Asterisk. In Figure 1.2, where there are two channels for phones A and B, the bridge is responsible for passing the media coming from phone A to phone B, and similarly, for passing the media coming from phone B to phone A. All media streams are negotiated through Asterisk. Anything that Asterisk does not understand and have full control over is not allowed. This means that Asterisk can do recording, audio manipulation, and translation between different technologies.

When two channels are bridged together, there are two methods that may be used to accomplish this: generic bridging and native bridging. A generic bridge is one that works regardless of what channel technologies are in use. It passes all audio and signalling through the Asterisk abstract channel interfaces. While this is the most flexible bridging method, it is also the least efficient due to the levels of abstraction necessary to accomplish the task. Figure 1.2 illustrates a generic bridge.

A native bridge is a technology specific method of connecting channels together. If two channels are connected to Asterisk using the same media transport technology, there may be a way to connect them that is more efficient than going through the abstraction layers in Asterisk that exist for connecting different technologies together. For example, if specialized hardware is being used for connecting to the telephone network, it may be possible to bridge the channels on the hardware so that the media does not have to flow up through the application at all. In the case of some VoIP protocols, it is possible to have endpoints send their media streams to each other directly, such that only the call signalling information continues to flow through the server.

The decision between generic bridging and native bridging is done by comparing the two channels when it is time to bridge them. If both channels indicate that they support the same native bridging method, then that will be used. Otherwise, the generic bridging method will be used. To determine whether or not two channels support the same native bridging method, a simple C function pointer comparison is used. It's certainly not the most elegant method, but we have not yet hit any cases where this was not sufficient for our needs. Providing a native bridge function for a channel is discussed in more detail in Section 1.2Figure 1.3 illustrates an example of a native bridge.

Figure 1.3: Example of a Native Bridge

总结:Asterisk使用了两种传输方式,一个是通过服务器中转的方式进行客户端交互;另外一个就是类似当初FBT的架构,如果客户端之间可以通过p2p连接,就使用p2p进行Media传输。

Asterisk——part 1的更多相关文章

  1. asterisk简单命令

    重启asterisk [root@EC2-V2 ~]# service asterisk restart 进入asterisk操作界面 [root@EC2-V2 ~]# asterisk -vvvr ...

  2. asterisk 通话噪音,自动挂断,回声等情况

    打开配置文件:cd /etc/asterisk/ vim chan_dahdi.conf 1: busydetect:忙音检测,如果开启,Asterisk会拨号尝试或通话中分析在线的音频,从而尝试识别 ...

  3. Asterisk manager API(AMI)文档(中文版)

    Asterisk控制接口(AMI)允许管理客户端程序连接到一个asterisk实例并且可以通过TCP/IP流发送命令或读取事件.这在试图跟踪asterisk的状态或其中的电话客户端状态时很有用,AMI ...

  4. asterisk

    http://www.asterisk.org/ asterisk is the world's most widely adopted open source commnuctions platfo ...

  5. linux服务之asterisk

    由于Asterisk过于专业且复杂,所以目前也存在大量衍生自Asterisk但简化过的通信系统,以让用户较容易使用.比如在欧美比较流行的elastix.trixbox.或以简体中文为基础的Freeir ...

  6. 鼎信通达gsm网关和asterisk对接的调试

    设备型号:4gsm卡,型号是DWG2000C-4Egsm网关IP地址: 10.3.6.250asteriskIP地址: 10.3.6.251 1)首先在asterisk里面添加到gsm网关的中继,并做 ...

  7. asterisk中使用dahdi通道呼出的注意事项

    asterisk中使用dahdi通道呼出的注意事项 在使用dahdi通道呼出的时候,可以在Dial中对呼出所使用的通道进行指定选择.以下面的例子来说明: 场景说明:数字板卡单E1,使用pri信令,1- ...

  8. Asterisk的配置详解

    Asterisk的配置文件都在/etc/asterisk目录下,重要的配置文件有: sip.conf                      sip电话基本配置 extensions.conf    ...

  9. openerp - asterisk connector(转载)

    原文:http://www.akretion.com/open-source-contributions/openerp-asterisk-voip-connector OpenERP - Aster ...

  10. Asterisk服务安装配置和启动

    Asterisk服务安装配置和启动 2014年11月4日 11:36 注意: 更新源的重要性 源的地址: http://fffo.blog.163.com/blog/static/2119130682 ...

随机推荐

  1. P1852 [国家集训队]跳跳棋

    P1852 [国家集训队]跳跳棋 lca+二分 详细解析见题解 对于每组跳棋,我们可以用一个三元组(x,y,z)表示 我们发现,这个三元组的转移具有唯一性,收束性 也就是说,把每个三元组当成点,以转移 ...

  2. c++的友元类、方法及其益处

    在java中,我们知道除了public和private,protected外,还有默认的包可见性访问级别,虽然如此,很多时候出于早期设计缺陷的原因,我们需要访问一些包或者protected可见性级别的 ...

  3. Github使用教程(二)------ Github客户端使用方法

    在上一篇教程中,我们简单介绍了Github网站的各个部分,相信大家对Github网站也有了一个初步的了解(/(ㄒoㄒ)/~~可是还是不会用怎么办),不要着急,我们今天先讲解一下Github for w ...

  4. 使用liner、feather、multiband对已经拼接的数据进行融合

    所谓"blend",英文解释为“vt. 混合vi. 混合:协调n. 混合:掺合物”这里应该理解为是图像数据的融合.这是“识别->对准->融合”的最后一步.融合是决定拼接 ...

  5. VS编译duilib项目时候的错误解决方法整理(转载)

    转载自:http://blog.csdn.net/x356982611/article/details/30217473 @1:找不到Riched20.lib 用everything等软件搜索下磁盘, ...

  6. BZOJ2724 [Violet]蒲公英 分块

    题目描述 经典区间众数题目 然而是权限题,所以题目链接放Luogu的 题解 因为太菜所以只会$O(n*\sqrt{n}+n*\sqrt{n}*log(n))$的做法 就是那种要用二分的,并不会clj那 ...

  7. [BZOJ1122][POI2008]账本BBB 单调队列+后缀和

    Description 一个长度为n的记账单,+表示存¥1,-表示取¥1.现在发现记账单有问题.一开始本来已经存了¥p,并且知道最后账户上还有¥q.你要把记账单修改正确,使得 1:账户永远不会出现负数 ...

  8. NS3 实验脚本的编写步骤

    第一步:配置主机,安装模块 (1)创建N个节点: NodeContainer nodes; nodes.Creat(N); 比如我目前接触到的PointToPoint,N就是2 (2)利用拓扑助手He ...

  9. ZOJ 3469 Food Delivery(区间DP)

    https://vjudge.net/problem/ZOJ-3469 题意:在一条直线上有一个餐厅和n个订餐的人,每个人都有随时间上升的不满意值,从餐厅出发,计算出送完时最小的不满意值总和. 思路: ...

  10. go 内建变量类型

    bool,string (u)int,(u)int8,(u)int16,(u)int32,(u)int64,uintptr(指针) byte,rune(字符) float32,float64,comp ...