Asterisk支持的channel

本文详细介绍了Asterisk PBX系统中的各种通道类型及其配置方法,并对比了不同通道支持的功能特性。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Asterisk channels


Asterisk Channels

What is a Channel?

A channel is a connection which brings in a call to the Asterisk PBX. A channel could be a connection to an ordinary telephone handset or an ordinary telephone line, or to a logical call (like an Internet phone call). Asterisk makes no distinction between " FXO " and " FXS " style channels (that is, it doesn't distinguish between telephone lines and telephones). Every call is placed or received on a distinct channel.

Channel Types

Asterisk provides the following channel types in the standard distribution:
  • Agent: ACD Agent channel
  • Console: Linux console client driver for sound cards (using OSS or ALSA)
  • H.323: An older VOIP protocol
  • IAX and IAX2: Inter-Asterisk Exchange protocol, Asterisk's own VOIP protocol
  • MulticastRTP: Broadcast audio outside the context of a call (new in Asterisk 1.8)
  • Local: Loopback into another context
  • MGCP: Media Gateway Control Protocol, another VOIP protocol
  • mISDN: mISDN channel
  • Modem: Confusingly, this is for connecting ISDN lines, not for use with modems. Deprecated.
  • Asterisk NBS channels: using Network Broadcast Sound
  • phone: Linux Telephony channel
  • SIP: Session Initiation Protocol, the most common VOIP protocol
  • Skinny: A driver for Cisco Skinny Client Control Protocol (a VOIP protocol)
  • Gtalk: Google Talk Channel driver. To be replaced by Asterisk Jingle channels
  • Asterisk VOFR channels: voice over frame relay Adtran style
  • VPB: For connecting ordinary telephone and telephone lines using Voicetronix cards
  • Zap: For connecting ordinary telephones and telephone lines using Digium cards. Also for TDMoE and for zaptelBRI

Channel drivers offering other technologies can be optionally installed:
  • Celliax let Asterisk manage GSM and CDMA cellular phones, and Skype calls to/from cellphones
  • Bluetooth: Allows the use of bluetooth devices to change routing - see trunk Asterisk mobile channels.
  • CAPI: ISDN CAPI channel
  • vISDN: vISDN channel (native BRI channel for HFC chipsets)
  • SCCP: An alternate Skinny/SCCP channel implementations
  • Sirrix: ISDN BRI for Sirrix cards (with optional ISDN encryption)
  • UNISTIM: Nortel Unistim channel
  • Unicall: Replacement for zaptel, with R2 support
  • SS7: SS7 (ISUP on MTP2/3) channel
  • NMS: NMS Communications Open Access channel



Configuration

For other connection types, go to the page appropriate for the technology in the list above.

Channel Capabilities: What capabilities are supported by what channels?

Capability IAX SIP Skinny SCCP Voice Zaptel MGCP chan_capi chan_misdn UNISTIM
Early Voice ? Y ? Y ? ? ? Y Y N
Call Transfer ? Y #/Native ? Y ? ? Y ? Y #/Native Native
DND ? Y ? Y ? ? ? ? ? ?
Receive CallerID Y Y ? Y ? Y Y Y Y ?
Send CallerID Y Y ? Y ? Y Y Y Y ?
Group Pickup ? Y *8# ? Y *8 /native ? Y *8 Y *8 Y native Y *8 *8 (untested)
Directed Call Pickup ? ? ? Y native ? ? ? ? ? Native
Call Waiting ? Y ? Y ? ? Y ? ? Native
Disable CallerID ? Y ? Y native ? ? ? ? Y ?
Call Forward ? Y ? Y native ? ? ? Y call deflection Y call deflection ?
Three way calling ? Y N Y ? ? ? Y ? N
ADSI Screen Phones N N N ? ? Y ? ? ? n/a


'Native' indicates that this function is provided by core Asterisk rather than the channel driver or device.

Feel free to press "Edit" and complete this table.


在Java中,Asterisk是一款开源的PBX(Private Branch eXchange),用于构建电话交换机系统。如果你想要使用Asterisk的Java API(如JAIN-SIP)监听NewChannel事件,你需要做以下几个步骤: 1. **安装Asterisk Java库**:首先确保你已经安装了Asterisk和相关的Java支持,比如JACKrabbit或JAIN SIP API。 2. **配置 Asterisk**:在Asterisk配置文件(通常是`/etc/asterisk/asterisk.conf`)中启用SIP模块,并配置好相关的SIP服务器和端口。 3. **编写Java应用**:创建一个Java应用程序,通过JAIN-SIP或者其他Asterisk提供的API连接到Asterisk。你可以使用`org.asteriskjava.manager.event.NewChannelEvent`来监听新通道(channel)创建的事件。 ```java import org.asteriskjava.manager.AsteriskManager; import org.asteriskjava.manager.AsteriskManagerFactory; import org.asteriskjava.manager.event.NewChannelEvent; public class AsteriskListener { public static void main(String[] args) throws Exception { // 创建Asterisk Manager connection AsteriskManager manager = AsteriskManagerFactory.createAsteriskManager("your_username", "your_password", "localhost", your_port); // 设置事件处理器 manager.addEventListener(new EventAdapter() { @Override public void newChannel(NewChannelEvent event) { System.out.println("New Channel: " + event.getChannel().getName()); // 在这里处理新通道的相关业务逻辑 } }); // 开始监听 manager.connect(); while (true) { Thread.sleep(5000); // 每隔5秒检查是否有新的通道 } // 关闭连接 manager.disconnect(); } } ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值