[Asterisk-Users] DNS load-balancing & SRV records

Jeremy Jones jjones at westcomllc.com
Mon May 10 16:58:09 MST 2004


Let's say I have a third-party device acting as a sip<-->pstn gateway, a
cluster of three asterisk servers, and a teensy bit of dns knowledge.
Let's now say those asterisk servers are a1.company.com at 192.168.0.1,
a2.company.com at 192.168.0.2, and a3.company.com at 192.168.0.3.

1.  If I setup round-robin dns like so:

asterisk.company.com.	IN	A	192.168.0.1
asterisk.company.com.	IN	A	192.168.0.2
asterisk.company.com.	IN	A	192.168.0.3

2.  and normal A records for the servers like this:

a1.company.com.		IN	A	192.168.0.1
a2.company.com.		IN	A	192.168.0.2
a3.company.com.		IN	A	192.168.0.3

3.  and srv records like so:

_sip._udp.company.com IN SRV 20 0 5060 a1.company.com
_sip._udp.company.com IN SRV 30 0 5060 a2.company.com
_sip._udp.company.com IN SRV 40 0 5060 a2.company.com

4.  and configure all my sip clinets to register to asterisk.company.com

5.  and tell the 3rd-party sip<-->pstn gateway to use srv records & that
all inbound calls from the pstn should go to the realm "company.com"

6.  and all the configs on the asterisk servers are identical...

would I have successfully setup load-balancing across my asterisk
servers? 



Thanks,
Jeremy 



More information about the asterisk-users mailing list