The Cisco/Linksys SPA are extremely flexible and sophisicated SIP based Analogue Telephone Adaptors (ATA), however this flexibility comes at the price of very difficult configuration. I have collected my various findings on configuring the divice here.
Starting Point for Basic Configuration:
The configuration scenarios I wished to support is as follows:
Here is a list of areas where there were problems and and how to get around them.. this could be helpful in trouble shooting your configuration.
NOTE: All the configuration example are in XML provisioning format as generated via our config/conversion utility):
Issue |
Resolution | More Information | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Syslog Configuration |
The first step to help diagnose and debug issues with SPA is to turn on Syslog debugging. The relevant configuration items are:
As with everything on SPA the configuration options allow a lot of flexibility, but but also signficant complexity... Having set up the required syslog levels, if you are using a UNIX flavor syslog server, you will be surprised to find that nothing is being logged. There are two likely reasons for this: the first is that you need to configure your syslog server to accept messages from the SPA (via IP address) and the second is that by default UNIX syslog server accepts UDP messages on port 514 only and expects the message source port to also be 514, while the SPA does not send from port 514. So you need to configure your syslog server to accept messages from any UDP port. The relevant configuration files is: /etc/syslog.conf:
And change syslogd, startup flags to specify IP address and all ports (on FreeBSD this is done via /etc/rc.conf:
|
Whirlpool Discussion Thread: Linksys spa3201 gateway (gw1-4) |
||||||||||||||||||
"Line 1" Australian Dial Plan |
Most of the documentation you will find on Dial Plan, does little to explain them and also tends to be targetted at US or UK users. Here is "Line 1" Dial Plan configuration and its explanation. The "Line 1" dial plan configures how the SPA responds to dialing requests made via the handset connected to the FXS or Handset port. In this configuration gw0 == PSTN Line (or FXS port) and gw2 == external VoIP/SIP service provider (see Line 1, Gateway Accounts below).
Dial Plan explanation:
NOTE: The "Line 1" Dial Plan is not en-acted transparently, the configuration of the "PSTN Line/VoIP-To-PSTN Gateway Setup/Line 1 VoIP Caller DP" will impact how "Line 1" behaves. This is an example of how the various configuration items, have subtle cross-depenencies which can make for unexpected and difficult to debug behaviors. To ensure that the Dail Plan configuration behaves transparently, this should be set to "None":
|
Whirlpool Discussion Thread: Linksys spa3201 gateway (gw1-4) |
||||||||||||||||||
"Line 1" Gateway Accounts |
From the above example here is the Line 1 Gateway Account configuration:
GW2 is configured using an IP address rather than name, as I found that DNS resolution failed when I had GW2 configured using name. Use "nslookup" or "dig" to manually get IP addres. This results in a fragile configuration, as IP addresses might change. Only machines configured via "Proxy and Registration" configuration can use SRV based DNS lookup to do SIP server discovery. The implication of this is that none of the gateway account machines will gain benefit of server failover support provided via SRV configuration or support for load balancing via DNS "Round Robin" configuration. If you are using DNS machines names for gateways then the "401 Unuthourized" & "407 Proxy Authentication Required" responses WWW-Authenticate will include the host name in the "realm". This appeared to cause problems with opensips SIP server, as authentication of user when machine was included always appears to fail (i.e. joe@domain.com.au was OK, but joe@host.domain.com.au FAILS) which results in an INVITE/407 Proxy Authentication Required loop to occur. In my example configuration (Line 1 Australian Dial Plan above), only international calls are diverted to the VoIP provider. The reason I am using GW2 is that the "Line 1" SIP Registration is configured to register with an internal SIP server. This allows call to be diverted to internal SIP based PBX (using internal abbreviated dialing VoIP numbers) and for PSTN calls received to be redirected to this ID (see later notes on redirecting PSTN call to SIP provider). NOTE: For this to work, your SIP provider must allow you to make calls without doing a "SIP Register". You should check and test with you particular VoIP provider. |
Whirlpool Discussion Thread: Linksys spa3201 gateway (gw1-4) |
||||||||||||||||||
Using SPA as VoIP-To-PSTN Gateway. |
To confgure the SPA so it can be used as a Gateway to the PSTN you need to configure the "PSTN Line" to act as a listening SIP Server. You can then either access this directly via a SIP client or have your internal SIP server re-direct calls that need to go to the SPA so it can in turn dial out to the PSTN via the FXO line. In my configuration I have confgured "Line 1" to register with internal SIP Server, which acts as organisational VoIP PABX, and as this is configured to use Port 5060 and takes the inbound PSTN calls which are redirected as incoming VoIP calls... So to avoid conflict, PSTN Line SIP Server is configured on Port 5061. This configuration gets quite complicated to allow for the various call scenarios... Here is sample configure:
Explanation to follow.... |
Once you have a working configuration, you can extract this from the device as XML using this "SPA Configuration Extraction and Conversion Web-tility"
All materials (C) Copyright Dokmai Pty Ltd, unless otherwise noted.
Send any questions or comments regarding this site to info at graphica.com.au
Last Updated: Wednesday 6th July, 2011.