SIP Outbound Proxy Server Explained

Why do IP Phones require a setting for ‘Outbound Proxy Server’?

Outbound Proxy Server

When you look at the configuration options on most IP phones, you will see a field called “Outbound Proxy” or “Outbound Proxy Server”. In this field you can enter an IP address, a host.domain name or just a domain name (as long as it can be resolved to an IP address in DNS). It is an optional field, but if you enter a value then all future SIP requests get sent there in the first instance. If you leave it blank, then the routing of SIP requests will depend mainly on the SIP address given in the R-URI field of the request’s header – see the section “what happens if an Outbound Proxy Server is not specified” below for details.

The use of DNS SRV records to identify SIP Proxy Servers

If you have enabled the use of DNS-SRV records (an option on most IP phones) then the name entered for the Outbound Proxy server may be used to lookup DNS-SRV records if they exist. These records define one or more server IP addresses and include extra data such as the port number, the type of service and the transmission protocol (UDP or TCP) to be used. The records are created in the first place by the VoIP service provider and cannot be modified by users. If DNS-SRV records do not exist or the option to use them is disabled, then the host name given for a Proxy server is converted to an IP address using conventional DNS host record lookups.

The option on your IP phone to use SRV records will also affect the resolving of other server names and/or the domain name part of your SIP user account if this is being used.

What is the function of a SIP Outbound Proxy Server?

When the IP phone makes an outbound call, it sends an INVITE request. If your IP phone is configured to use an outbound proxy server, then the INVITE is sent there. The request could be handled within that proxy server or be forwarded to another proxy server or gateway. The user credentials would normally be checked, especially if the call needs to break out onto the PSTN or incurs toll charges in any way.

For more information about the role of SIP Proxy Servers and how they handle outbound calls, click here.

On most IP phones, if a valid entry is given for the “outbound proxy server” field, then it causes every type of SIP request from the phone to be sent to that address (albeit this behaviour would only apply to one SIP account at a time on a multi-line phone). This would mean that even a REGISTER request that might otherwise have gone directly to the registrar server, would have to go via the outbound proxy server. In this case, the outbound proxy server would be able to block the request or forward it to the correct registrar server depending on its own internal rules. In this role, the outbound proxy server is acting as a centrally managed security barrier and, in combination with appropriate firewall rules, it could be given a role similar to that of a web proxy in a corporate network environment.

What value should I set for ‘Outbound Proxy Server’?

Setting for use with a commercial VoIP Provider: If you want to use an IP phone with a commercial VoIP Service Provider on the Internet, such as sipgate, voiptalk or callcentric, then the provider will tell you what to set as the outbound proxy server. It will be the name or IP address of one of their proxy servers.

Setting for use with an IPBX: If you want to use an IP phone with an IP capable PBX, then the outbound proxy server will probably need to be the PBX. This might be in the form of a host name or IP address, but you will need to find out this information from the administrator of the system.

Setting for use with Asterisk or other “home grown” solutions: The outbound proxy server would normally be the Asterisk server. The Asterisk server would then need to be configured with a dial plan that handles outbound calls from the clients. This dial plan might implement rules that prohibit callers from dialling certain numbers (e.g. premium rate numbers) or that routes calls out onto different trunk connections depending on the dialled number (a form of “least cost routing”). The dial plan would also need to recognise when the dialled number matches the pattern for another internal phone on the Asterisk PBX system. It is important to choose a numbering scheme for internal phones that can be easily distinguished from PSTN and other external numbers. It is also useful if the numbering scheme selected for internal IP phones is different to that used for internal analogue phones where both must co-exist.

What happens if an Outbound Proxy Server is not specified?

As mentioned above, in the absence of a setting for Outbound Proxy server, SIP requests are simply sent to the address shown on the main header of the SIP request – this address is called the Request-URI or R-URI for short (for an explanation of URI, look at the Wikipedia entry here).

The R-URI on a SIP request will depend what type of request it is (INVITE, REGISTER, etc) and what information is already known by the IP phone when it is building the request. For example, a call made by dialling a number on the telephone’s keypad will generate an INVITE with an R-URI like this:
sip:<dialled_number>@<my_sip_domain>

The phone gets the value of “my_sip_domain” from the account settings, although the actual configuration parameter that contains this setting will vary from one make of IP phone to another – to view sample settings on various makes of phone click here.

However, if the user has previously programmed a “speed-dial” key or an entry in the phone book then it is possible for the destination to be a complete SIP URI – containing both the user ID (or number) and the sip domain of the destination. For example:
sip:<destination_number>@<destination_sip_domain>

In each case, the request will be sent to the address corresponding to the domain part of the R-URI – in the first example it is sent to the account’s own Proxy server, but in the second example it is sent directly to the destination’s Proxy server thereby eliminating some unnecessary hops in the call path. The latter method could even be used to make calls directly between SIP phones, without the need for a VoIP service provider, IP-PBX, SIP Proxy server or Asterisk server.

  What did you think of this article? Please vote by clicking a coloured button
(100%) (0%) (0%) (0%)

1 thought on “SIP Outbound Proxy Server Explained

Comments are closed.