System information
it. If the remote end is another Asterisk box, the use of a register statement is required,
as discussed in the next section.
Friends
Defining a type as a friend is a shortcut for defining it as both a user and a peer.
However, connections that are both users and peers aren’t always defined this way,
because defining each direction of call creation individually (using both a user and a
peer definition) allows more granularity and control over the individual connections.
Figure B-2 shows the flow of authentication control in relation to Asterisk.
Figure B-2. Call origination relationships of users, peers, and friends to Asterisk
register Statements
A register statement is a way of telling a remote peer where your Asterisk box is in
relation to the Internet. Asterisk uses register statements to authenticate to remote
providers when you are employing a dynamic IP address, or when the provider does
not have your IP address on record. There are situations when a register statement is
not required, but to demonstrate when a register statement is required, let’s look at
an example.
Say you have a remote peer that is providing DID services to you. When someone calls
the number +1-800-555-1212, the call goes over the physical PSTN network to your
service provider and into its Asterisk server, possibly over its T1 connection. This call
is then routed to your Asterisk server via the Internet.
Asterisk and VoIP | 635