Asterisk channels

In Asterisk, a channel is a connection which brings in a call to the Asterisk PBX. It could be a connection to an ordinary telephone handset or to a logical call (such as an Internet phone call). Various channel types are provided by Asterisk, including H.323, SIP, Skinny, and IAX.

Each channel type has its own configuration file; for example, SIP channels are configured using the sip.conf file. This file contains the configuration information relevant to SIP channel driver, as well as the parameters and credentials specific to the SIP devices you wish to connect to Asterisk.

Channel configuration files (such as sip.conf) are closely related to the extensions.conf files, which define the dialplan. The dialplan in Asterisk controls how the call logic is applied to any connection from any channel, such as what happens when a device dials the extension 200. Here is a graphical representation of the relationship between sip.conf and extensions.conf:

As you can see in the picture above, the call that comes into Asterisk is first matched in the configuration file of the protocol used (in our example, the sip.conf file). The sip.conf file defines where the channel will enter the dialplan. The call is forwarded to the correct context in the dialplan, which contains information about how and where to route calls.

In our example the dialplan contained instructions to dial another device when the extension 200 is called (the exten => 200,1,Dial(SIP/200) line). The request to dial the device 200 will use the channel configuration file (sip.conf in our case) to determine how to forward the call to the destination device.

Geek University 2022