Here are the configuration steps for a typical way to use the AudioCodes Stand-Alone Survivability (SAS) Feature with sipXecs 4.0.
The SAS feature can be useful for a branch office that has a local AudioCodes Gateway, but uses a remote sipXecs server. In "Normal" mode the AudioCodes Gateway transparently proxies the SIP messages between the phones and sipXecs server. It also sends periodic "keepalive" messages to the sipXecs server in order to confirm connectivity. If connectivity to the sipXecs server is lost then the AudioCodes Gateway goes into "Emergency" mode allowing branch phones to make calls out the PSTN and to each other. Once connectivity is restored, the AudioCodes Gateway switches back to "Normal" mode.
The instructions below are based on the results of my testing with an AudioCodes FXO MP-118 (5.40 firmware), a Polycom SoundPoint IP 430, and an LG-Nortel 6830.
sipXconfig Phone Profiles
To have a phone use SAS, configure its Outbound Proxy values as follows:
- Address: The FQDN of the AudioCodes Gateway, e.g. gw.example.com
- Port: 5080 (yes 5080, not 5060)
This forces the phone to send its all SIP messages through the AudioCodes Gateway.
Phones that do not have a configurable Outbound Proxy cannot make use of the AudioCodes SAS feature. (Well, at least not using these instructions.)
Be aware that in sipXecs 4.0 the Polycom SoundPoint IP profiles by default include per-Line Outbound Proxy values, found under "Lines" - X - "Registration" (and "Show Advanced Settings".) The per-Line values take precedence over the per-Phone values found on the "SIP Servers" screen. You need to change the per-Line values.
The profile of course also needs to be re-generated and sent to the phone.
sipXconfig Dial Plan
The Dial Plan must be constructed so that all digits dialed by the user are passed to the AudioCodes Gateway. i.e. None of your PSTN rules can have prefixes that are dropped before the call is sent to the gateway.
This means you cannot use the built-in "Local" or "Long Distance" rules, and you will need to construct "Custom" rules instead. The "Emergency" rule may be used, although you should test that it works in both Normal and Emergency mode.
sipXconfig AudioCodes Gateway Profile
Only two changes need to be made to the AudioCodes Gateway Profile to enable SAS:
First, navigate to "Proxy and Registration" and change the "Proxy Keepalive Mode" setting to "Use OPTIONS".
Second, navigate to "Advanced Parameters" (and "Show Advanced Settings") then the "Stand-Alone Survivability" section at the bottom, and check the "Enable SAS" setting. (Note that the "SAS Local SIP UDP port" is set to 5080, which you used in Step #1.)
As usual you will need to ensure the Primary DNS setting (under "Network") and the PSTN Lines are both configured.
The profile of course also needs to be re-generated and loaded into the AudioCodes Gateway.
AudioCodes Gateway IP -> Tel Destination Number Manipulation
After loading the profile into the AudioCodes Gateway there is some configuration that must be done through the gateway's Web interface. These settings are not currently available in the sipXconfig AudioCodes Gateway Profile.
Navigate to "Protocol Configuration" - "Manipulation Tables" - "Dest Number IP->Tel". (In pre-5.4 firmware this table is under "Protocol Management" - "Manipulation Tables".)
Recall from Step #2 that our sipXecs Dial Plan passes all dialed digits to the gateway. So, you must now configure the gateway to drop the digits that you don't want sent to the PSTN. This way the PSTN calls will work in Normal and Emergency mode, because in both cases it's the gateway dropping the digits.
I won't repeat the AudioCodes documentation verbatim here. Instead I'll describe the sipXecs Dial Plan used in my testing, and the corresponding AudioCodes IP -> Tel number manipulation required to make it work.
The AudioCodes Gateway is connected to an analog line where dialing "51111" or "63951111" will reach my actual desk phone.
sipXecs Dial Plan:
- built-in Emergency rule: Emergency number "51111", (Optional) PSTN prefix "9".
- Custom "9-ThenAnyNumberOfDigits" rule: Dialed Number Prefix "9" and "Any number of digits", Resulting Call Dial blank and append "Entire Dialed Number"
- Custom "3-AndFourDigits" rule: Dialed Number Prefix "3" and "4 digits", Resulting Call Dial blank and append "Entire Dialed Number"
AudioCodes IP -> Tel number manipulation:
- For each entry the Source Prefix and Source IP are "*", and the Number of Digits to Leave is blank.
- To cover the Emergency rule without the optional PSTN prefix:
- Destination Prefix: 51111
- Stripped Digits Number: 0
- Prefix (Suffix) to Add: blank
- To cover the 9-ThenAnyNumberOfDigits rule, and the Emergency rule with the optional PSTN prefix:
- Destination Prefix: 9
- Stripped Digits Number: 1
- Prefix (Suffix) to Add: blank
- To cover the 3-AndFourDigits rule:
- Destination Prefix: 3
- Stripped Digits Number: 1
- Prefix (Suffix) to Add: 5
Then in both Normal and Emergency mode, composing any of the following dial strings will ring my actual desk phone:
- 51111 (Emergency rule)
- 951111 (Emergency rule, with optional PSTN prefix)
- 963951111 (9-ThenAnyNumberOfDigits rule)
- 31111 (3-AndFourDigits rule)
Unfortunately all configuration added through the AudioCodes gateway's Web interface will be lost each time you reload the profile. Once you've got your AudioCodes IP -> Tel number manipulation working, be sure to write it down somewhere and re-program it whenever you reload a new profile.
Limitation affecting Polycom SoundPoint IPs
There is a known limitation affecting Polycom SoundPoint IP phones in Emergency mode ([http://track.sipfoundry.org/browse/XTRN-535 XTRN-535].) The AudioCodes seems to have problems recognizing when a Polycom is dialing another branch phones, and instead treats the digit string as a PSTN call. This means Polycoms cannot dial other branch phones in Emergency mode. This problem does not affect Normal mode.
The only known work-around is to dial the branch users through Speed Dial buttons where the "Number" includes the SIP domain. e.g. email@example.com.