Asterisk channel: Difference between revisions

From 탱이의 잡동사니
Jump to navigation Jump to search
No edit summary
No edit summary
Line 27: Line 27:


Local channels are used for dialing inward to the system itself, allowing any Asterisk component that can dial to call directly into dialplan. This provides sort of "fake" call that still executes real instructions.
Local channels are used for dialing inward to the system itself, allowing any Asterisk component that can dial to call directly into dialplan. This provides sort of "fake" call that still executes real instructions.
== Local Channel ==
=== Local Channel Optimization ===
==== Default Channel Optimization ====
By default, the Local channel will  try to optimize itself out of the call path. This means that once the Local channel has established the call between the destination and Asterisk, the Local channel will get out of the way and let Asterisk and the end point talk directly, instead of flowing through the Local channel.
This can have some adverse effects when you're expecting information to be available during the call that gets associated with the Local channel. When the Local channel is optimized out of the call path, any Dial() flags, or channel variables associated with the Local channel are also destroyed and are no longer available to Asterisk.
Diagrams really help to show what is going on:


== See also ==
== See also ==
* https://wiki.asterisk.org/wiki/display/AST/Channels - Channels
* https://wiki.asterisk.org/wiki/display/AST/Channels - Channels
* https://wiki.asterisk.org/wiki/display/AST/Local+Channel+Optimization - Local Channel Optimization


[[category:Asterisk]]
[[category:Asterisk]]

Revision as of 12:51, 16 January 2017

Overview

Asterisk channel concept 내용 정리

Basic

Asterisk 에서 channel 을 빼고는 거의 이야기할 만한 것이 없다. A channel is an entity inside Asterisk that acts as a channel of communication between Asterisk and another device. That is, a phone, a PBX, another Asterisk system, or even Asterisk itself(in the case of a local channel)l

Call 을 이야기할 때, 많은 부분에서 channel 을 이야기하게 된다. Call 이란, 하나 혹은 그 이상의 channel 들로 이루어진 communication path, activity though the Asterisk system 이라고 할 수 있다.

간단하게 채널은 다음의 역할을 수행한다(실제로는 더 많다)

Channel Drivers provide channels in Asterisk.
Channels can interface with each other through bridges.
Applications and functions can affect the state or attributes of a channel or its media stream.
Channels are commonly passing audio between communication endpoints, but can pass other data, such as video or text messages.
Channels execute instructions with dialplan, but can be controlled by other APIs (AGI, AMI, ARI) or interfaces(CLI).

Common Asterisk channels

One of the many benefits of Asterisk is the capability to interface with as many different technologies as you have channel drivers! However, most administrators will only make use of a few types at a time.

Here are a few commonly used channel types:

A SIP channel driver such as chan_sip or chan_pjsip.
DAHDI channels provided by chan_dahdi.
Local channels provided by chan_local(This was moved into the core in Asterisk 12).

SIP channels are used to interface with SIP capable VOIP devices, such as phones, channel banks, other PBXs or Internet Telephony Service Providers.

DAHDI channels are used to interface with DAHDI drivers and PRI libraries. In this case chan_dahdi allows you to any DAHDI capable devices, such as Digium's line of T1/E1/J1 interface cards.

Local channels are used for dialing inward to the system itself, allowing any Asterisk component that can dial to call directly into dialplan. This provides sort of "fake" call that still executes real instructions.

Local Channel

Local Channel Optimization

Default Channel Optimization

By default, the Local channel will try to optimize itself out of the call path. This means that once the Local channel has established the call between the destination and Asterisk, the Local channel will get out of the way and let Asterisk and the end point talk directly, instead of flowing through the Local channel.

This can have some adverse effects when you're expecting information to be available during the call that gets associated with the Local channel. When the Local channel is optimized out of the call path, any Dial() flags, or channel variables associated with the Local channel are also destroyed and are no longer available to Asterisk.

Diagrams really help to show what is going on:


See also