Download Hacks
Transcript
As I mention in other hacks, SIP is just the call signaling protocol. RTP is the protocol that carries voice and other data (video, images, data, etc). The port numbers used by RTP are pseudo-randomly selected from a predefined port range. In Asterisk, this can be configured in/etc/asterisk/rtp.conf. Actually, the default range of 1000020000 is considered by many to be too wide for most installs. Please adjust according to the size of your installation. Altering the ToS bits can be a little trickier. Most IP phones and VoIP services tag media packets with the highest possible priority, so forcing them to "downgrade" some of the packets into a lower class of service is hard. Ideally, you'll build your premium and economy service classes using the port number rather than the ToS bits. Once you have met these conditions, you are ready to proceed. Surf over to http://www.kriscompanies.com/. Go to Downloads, and then Asterisk, and then locate AstShape (Provider). Download it to your machine, place it somewhere in your$PATH (like /usr/local/sbin), make it executable (chmod +x astshape-provider), and optionally change the name to something that you will remember. Let's take a look at the script, shall we? 6.8.1. Get Started with AstShape Provider Open AstShape Provider in your favorite text editor. If you have ever seen AstShape, you will notice that AstShape Provider is actually smaller and simpler. That's because we are assuming that all this router will handle is VoIP traffic. There are no provisions for handling other types of traffic, and, as the script says, you will want to block this traffic withiptables or some other firewall. There are four possible knobs to turn, and they look conspicuously like those in plain-vanilla AstShape. This is the speed (in kilobits) of your Internet connection. This value can be best determined by testing, and testing often. This will be the hardest part: LINKSPEED=1000 This is the wide area network (WAN) interface on which to do QoS: DEV=eth1 What you have here is a list of ports, separated by spaces, that will be placed in "Class 1." This is the premium (more important) class of service. I've chosen 5000 and 5001 for mypremium class's ports: #Class 1 priority ports CLASS1PORTS="5000 5001"