...
An A record is a typical host name pointer to an IP address. So, sipx.xyzcompany.com might be an A record that points to 127.1.1.43. In this example, sipx is the host name, xyzcompany.com is the domain name and sipx.xyzcompany.com is referred to as the fully qualified domain name (fqdn). We use A records because it's easier to remember computer names than a series of numbers (for most people anyway). Most Asterisk configurations the author has seen run with an A record setup for the PBX.
...
Problems 2 and 3 can be worked around, but problem 1 is the bigger issue. Making sure that you have a robust DNS configuration is important to your computer network and your phone network.
Note | ||
---|---|---|
| ||
In this scenario DNS and DHCP should be configured properly BEFORE installing sipXecs. |
Scenario 1
...
Configure DNS
There are four DNS records that need to be configured for sipXecs to function properly. They are:
- A Record for sipXecs PBX host name
- SRV Record for SIP UDP Signaling Traffic
- SRV Record for SIP TCP Signaling Traffic
- SRV Record for sipXecs PBX Resource locating (Resource Record)
Add a new host record for the PBX (in the above example it would be something like sipx.xyzcompany.corp) pointing to the IP address of the PBX.
Add SRV records for _sip._udp.xyzcompany.corp, _sip._tcp.xyzcompany.corp and _sip._tcp.rr.sipx.xyzcompany.corp all pointing to sipx.xyzcompany.corp. (if you are doing this in a Microsoft Windows environment, see document mentioned in beginning of this whitepaper).
In a bind (Linux DNS) configuration file these records would look something like this:
Code Block |
---|
_sip._tcp.xyzcompany.corp. |
...
IN SRV 1 0 5060 sipx.xyzcompany.corp. |
...
_sip._udp.xyzcompany.corp. |
...
IN SRV 1 0 5060 sipx.xyzcompany.corp. |
...
_sip._tcp.rr.sipx.xyzcompany.corp. |
...
IN SRV 1 0 5070 sipx.xyzcompany.corp. |
...
sipx.xyzcompany.corp. |
...
IN A 192.168.10.2 |
...
Configure DHCP
DHCP is used by phones and PC's alike in this scenario to get IP addresses as well as other information needed about the network to operate properly.
In addition to an IP address, to operate properly phones need a Default Gateway (DHCP option 3), DNS Domain Name (DHCP option 15), DNS Server IP address (DHCP option 6) and a TFTP server address (DHCP option 66). If you are using a different provisioning method you're on your own here.
A typical DHCP configuration file from a Linux system would look like:
Code Block |
---|
subnet 192.168.10.0 netmask 255.255.255.0 |
...
{ range 192.168.10.20 172.168.10.254; |
...
#IP |
...
default-lease-time 21600;
Range default-lease-time 21600; max-lease- |
...
time 43200; |
...
option routers 192.168.10.1; |
...
# Default |
...
gateway option subnet-mask 255.255.255.0; |
...
# Subnet |
...
mask option domain-name "xyzcompany.corp"; |
...
#DNS Domain |
...
Name option domain-name-servers |
...
192.168.10.10; |
...
#DNS Server |
...
option time-offset -18000; # Eastern Standard Time
...
IP option time-offset 18000; # Eastern Standard Time option tftp-server- |
...
name "sipx.xyzcompany.corp"; |
...
#phone |
...
provisioning option ntp-servers 192.168.10.10; |
...
#get time from file server |
...
} |
Testing
It is important to test your configuration and verify that it is operating as it should before you install your sipXecs system! . Refer to the testing section above.
Boot a computer and make sure it receives an IP address just as a phone would. Check that it is receiving the proper DNS domain name (on a Windows machine you can use 'ipconfig /all' from the command prompt to verify this).
Make sure the computer can Ping the PBX by its host name and us NSLOOKUP to verify that the SRV records are working as they should.
Once DNS and DHCP are working properly you are ready to install your sipXecs system.
...
Remote Users
Assuming now that your sipXecs system is up and running correctly, the next challenge with DNS is configuring it so that remote users can connect to your PBX. If those users are connecting via a VPN tunnel or wide area network, simply configure DNS on the far end to have the same DNS records and DHCP records we setup above.
If users are connecting from the Internet they are never going to be able to resolve xyzcompany.corp because it isn't a valid DNS domain name. Your organization more than likely has something like xyzcompany.com that is registered with an organization like Network Solutions and hosted either there or at another DNS hosting provider. The following host record and SRV records must be configured at your DNS hosting provider:
Code Block |
---|
_sip._tcp.xyzcompany.com. |
...
IN SRV 1 0 5060 sipx.xyzcompany.com. |
...
_sip._udp.xyzcompany.com. |
...
IN SRV 1 0 5060 sipx.xyzcompany.com. |
...
sipx.xyzcompany |
...
.com. IN A 127.1.1. |
...
43 # Change to outside IP of your FW |
Configure your firewall to allow and NAT ports 5060 udp, 5060 tcp and ports 30000 – - 31000 udp from 127.1.1.43 (again, this would be changed to YOUR external IP address) to 192.168.10.2 (this would be changed to the internal IP address of YOUR PBX).
Just as you tested your internal DNS, make sure you test the external DNS from outside your network.
One last step needs to be completed. sipXecs allows for domain name aliases (System Menu -> Domains). Add a domain alias for xyzcompany.com. An alias allows the sipXecs system to respond to requests made to domains other than the domain it is setup with. It thus should be possible to setup your mobile users differently than your fixed position hard phone users and do a translation of xyzcompany.com to xyzcompany.corp.
...
Dynamic DNS
Wondering what about the case where the external IP address may change like with a Cable Modem or DSL connection? Usually the only way you will be able to deal with SRV records is by owning your own domain. Drop $20 a year with a hosting provider like GoDaddy.com or similar (just make sure they let you have SRV records) and get yourself a domain name.
Once you have an domain name, get setup with DynDNS or one of the other dynamic DNS providers (I use DynDNS because it works with Vyatta firewall). If you don't have a firewall that does dynamic DNS updates, you can usually run software on an internal machine that helps the dynamic DNS provider figure out your external IP address.
The dynamic DNS provider will let you determine your own host name and tag it to one of their domain names. For instance, xyzpbx.dyndns.net might be a host name you could specify. We can then point to this dynamic DNS name from our own domain.
For pointing a host name at another host name we'll use a CNAME record (canonical name). So, externally the DNS would have a CNAME record setup pointing to the dynamic DNS name: sipx CNAME xyzpbxthe dynamic DNS name:
Code Block |
---|
sipx CNAME yzpbx.dyndns.net |
And then the SRV records would be setup also pointing to the dynamic DNS name as follows:
Code Block |
---|
_sip._udp.xyzcompany. |
...
com 86400 IN SRV 10 100 5060 xyzpbx.dyndns.net |
...
_sip._tcp.xyzcompany. |
...
com 86400 IN SRV 10 100 5060 xyzpbx.dyndns.net |