
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
322
|
Chapter 13: Network Infrastructure for VoIP
Controlling Codec Selection in Asterisk SIP Peers
Asterisk’s sip.conf file, in /etc/asterisk, contains entries for each SIP endpoint or trunk
that can communicate with the Asterisk SIP server agent. Each entry can have multi-
ple
allow and disallow keywords, which indicate what codecs are to be used for each
peer. The following configuration sets up a group of LAN phones and a group of
remote, WAN-connected phones:
[general]
disallow=all
allow=ulaw
allow=g279
allow=speex
[301]
; phone on same LAN as
callerid="Jake" <301>
context=Cleveland
host=dynamic
type=friend
username=301
secret=browns
[402]
; phone in remote location, connected by WAN
disallow=all
allow=g729
callerid="Maddie" <402>
context=Maui
host=dynamic
type=friend
username=402
secret=aloha
You can refer back to Project 6.1 for more details about per-peer codec
selection on Asterisk.
Directory Services
Directory services transform your VoIP network from a transport apparatus into a set
of user-friendly voice applications. Without directory services, the network can do
very little. Sure, you can make IP-to-IP phone calls, and you might not mind memo-
rizing IP addresses instead of E.164 numbers or SIP URIs. But, of course, there’s a
better way to get hold of people.
On the PSTN, that better way is the ...