User guide

Configuration file Description
(always mandatory)
/etc/asterisk/sip.conf Used to configure SIP based channels (SIP VoIP phones and
SIP providers)
/etc/asterisk/iax.conf Used to configure IAX2 based channels
/etc/asterisk/zapata.conf Used to configure the hardware that interfaces with the PSTN.
Used by Asterisk at startup
/etc/zaptel.conf Low level configuration of zaptel interface card. Used by Zaptel
Configurator tool ztcfg before starting Asterisk
6.6 Peers, Users and Friends
One of the more confusing concepts for a beginner using
Asterisk
(or at least it was for me for a long
while) is that of peers and users in the iax.conf and sip.conf configuration files.
The terms peer, user and friend are used to classify incoming and outgoing calls. While a “user” is a
connection that authenticates to us (i.e. an “incoming call”), a “peer” is an outgoing connection. “Users”
call us and we call “peers.”
31
A “friend” is a connection that can be either incoming or outgoing.
When we get an incoming call from a “user” or a “friend” we need the define what to do with it. The
term “context” is used to define which rule, or group of rules from the dialplan (extensions.conf) should
be applied for that concrete call. A “context” associated to an incoming call is the entry point of that call
in the dialplan.
The extensions.conf file contains all the numbers that can be accessed from the PBX separated in
different sections (contexts). Every user (incoming calls) defined in each of the communication
channels is associated with a certain section of the dialplan (extensions.conf).
7. Scenario A - Private telephony network in a rural
community
Since the first edition of this guide, we have been looking into low power and low cost alternatives for
PBXs. Although it is possible to run Asterisk in a Linksys WRT54G router or in motherboards based on
31. You should keep in mind one exception to this simplistic definition. When acting as a “proxy,” an incoming connection
coming from one of our peers will be handled in the peer section (instead of a user section). That is, a peer acting as a
proxy cannot authenticate on behalf of other users and the only information available for authentication is the peer IP
address. In summary, an outgoing connection is always a “peer,” an incoming connection can be a “user,” or a “peer” when
acting as a proxy.
Page 25 TRICALCAR | www.wilac.net/tricalcar – Version: February 2008