The Asterisk SIP Settings Module is used to configure the default settings used for SIP calls. Since most VOIP calls are sent using SIP, these settings can be very important to the operation of your PBX. Because this module sets the default settings, most of these settings can be overriden for a particular extension in the Extensions Module or for a particular trunk in the Trunks Module.
How Do I Get to the Asterisk SIP Settings Module?
To access the Asterisk SIP Settings Module in FreePBX 2.10 and later, access the graphical user interface using a web browser. Click on the "Settings" pull down menu at the top and then select "Asterisk SIP Settings".
What Do Each of the Asterisk SIP Settings Options Mean?
You can get a general description of what each option does by placing your mouse on the question mark to the right of the option, and a tooltip will appear that explains the option.
There are several options that you may wish to consider changing from the default:
NAT: This setting is used to indicate whether the other systems you connect with are behind a router that provides Network Address Translation ("NAT"). If is it set to "Yes," Asterisk will ignore the from address specified by the remote system and instead send response packets to the address that the packets actually came from. In most cases, it is safe to set this to "Yes."
This setting is overriden on a per extension basis using the NAT field (which defaults to "No" for extensions) and can be overriden on a per trunk basis by including "nat=" in the Trunks' PEER details. Contrary to popular belief, this setting is NOT used to indicate whether your system is behind a NAT.
IP Configuration: This field is used to tell Asterisk whether your PBX has public IP or is behind a NAT router.
If your system has its own public IP address, select "Public IP."
If your system is behind a router that provides "NAT," and your router has a static (non-changing) IP address assigned by your ISP, then select "Static IP." Then fill-in the "External IP" field with your Static IP address and the Local Networks field with the IP/Subnet of all of your internal networks.
If your system is behind a router that provides "NAT," and your router has a dynamic (changing) IP address, and you have signed up for a dynamic host service that allow you to have a unchanging domain name (DynDNS, afraid.org, or noip), then click "Dynamic IP." Then fill-in the "Dynamic Host" field with your domain name and the Local Networks field with the IP/Subnet of all of your internal networks.
If you have more than one internal IP range/subnet, click "Add Local Network Field" at the bottom. This field is commonly used when you have a VPN that connects two subnets together.
Setting this field is critical to the proper operation of your system. When Asterisk sends out a call, it needs to supply a "From" address so that the remote system knows how to respond. If Asterisk is contacting a device that is on your local network, like another phone, Asterisk needs to supply it's internal, local IP address as the from header portion of the messsages. On the other hand, if Asterisk is attempting to reach a remote system over the internet, Asterisk needs to supply the remote system with your Public IP address in the From portion of the messages. If Asterisk sends a message out over the internet and uses your local IP address as the from address, the remote system may not be able to respond to your requests.
In many cases, a remote system on the internet may have it's own "NAT" setting (see above) set to "Yes." If that's the case, it will ignore the from portion of your messages and simply response to the place where the messages came from. This may give you the belief that the IP Configuration is set correctly, because some or most of your calls will appear to work. However, if these settings are wrong, you can still encounter trouble, particularly when transferring or forwarding calls, and you may experience issues with one-way audio.
For the small office/home office user, the most common configuration is:
IP Configuration: Dynamic IP
Dynamic Host: (Your Domain Name from DynDNS, Afraid, or NOIP)
Local Networks: 192.168.1.0 / 255.255.255.0
Codecs: Most SIP calls in North America are sent using the ULAW Codec. Some parts of the world use ALAW. If you want to enable "High Definition" audio, you'll also want to enable G722. If you want a low bandwidth Codec, you can enable GSM. Again, bear in mind that these are the defaults. Because most Trunk providers will override these settings in their PEER details with a disallow=all and then an allow=(whatever codecs they allow), the Codecs you specify here will generally only affect internal calls. The defaults are usually fine.
RTP Timers: These entries specify how long Asterisk will allow a call to continue with no audio coming into the system before assuming that something has gone wrong and cancelling them. The 30-second default values may be too short, so you may wish to change these to: rtptimeout: 300. rtpholdtimeout: 300. rtpkeepalive: 30.
Allow Anonymous Inbound SIP Calls: If you wish to allow anyone to call into your system even if they are not calling from an approved Trunk, you may wish to set this to "Yes." Some ITSPs (notably Callcentric) require that this setting be enabled to ensure that all inbound calls are received properly.
Other SIP Settings: This section allows you to set other default SIP Settings. Almost any entry that can appear in the PEER details of a trunk or an extension can be entered here and will apply to all extensions and trunks unless the extension/trunk has a contrary settings. You may wish to add the following:
- If you use Polycom phones and would like to be informed of the Caller ID when a BLF monitored phone rings:
notifycid = yes
- If you do not intend to use the fax detection features of Asterisk and wish to avoid false detections:
faxdetect = no
- From the top menu click Settings
- In the drop down click Asterisk SIP Settings
How do I use the Asterisk SIP Settings Module?
See the User Guide