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 multiple 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 [601] ; phone on same LAN as callerid="Jegee" <601> context=Cleveland host=dynamic type=friend username=601 secret=browns [502] ; phone in remote location, connected by WAN disallow=all allow=g729 callerid="Maddie" <502> context=Maui host=dynamic type=friend username=502 secret=aloha