System information

IPv6 in sip.conf
As of version 1.8, Asterisk supports IPv6 for both SIP and RTP traffic. All of the con-
figuration options in /etc/asterisk/sip.conf related to IP addresses can accept either an
IPv4 or an IPv6 address. As an example, consider the different values for the udpbin
daddr option:
udpbindaddr value Description
192.168.100.50 Bind to a specific IPv4 address.
2001:db8::1 Bind to a specific IPv6 address
0.0.0.0 Bind to all IPv4 addresses on the system.
:: Bind to all IPv4 and IPv6 addresses.
The tcpenable option allows us to accept requests via the TCP network transport pro-
tocol. For now we’ve disabled it, as the UDP method is currently more mature (and
more popular) and we’re attempting to eliminate as many barriers as possible. Having
said that, feel free to test TCP support once you’re comfortable configuring your
devices.
There are also tlsenable and tlsbindaddr options for enabling SIP over
TLS (encrypted SIP). We’ll cover the configuration of SIP with TLS in
Chapter 7.
The next section we’ve defined is a template we have chosen to name [office-phone]
(!). We’ve created it as a template so that we can use the values within it for all of our
devices.
Following the section name with (!) tells Asterisk to treat this section
as a template. By doing this we eliminate the need to repetitively add
and change configuration options for every device we choose to define.
Templates are extremely useful and are available in all of Asterisk’s
configuration files. If you want to change something for an individual
device that was previously defined in the template for that device, you
can do that under the section header, and it will override what was de-
fined by the template. It is not necessary to use templates, but they are
extremely handy, and we use them extensively.
92 | Chapter 5:User Device Configuration