Поиск по моему блогу

Using the Linksys SPA400 with Asterisk

A Cisco 7960 VoIP telephone displaying a Sonus...Image via WikipediaIntroduction
For small- and medium-sized businesses, going all-VoIP is not an easy decision.
Fortunately, the switch-over, which can result in substantial savings and add bold new capabilities to tired old office phone systems, can be done in baby-steps: Purchase an Internet Protocol (IP) based phone system, but keep the PSTN lines, for now.
It is indeed possible to integrate VoIP into an existing office analog system, keeping current phone services intact while routing costly toll calls out over IP. Until recently, though, the hardware needed for such integration was difficult to use and expensive.
There are two ways to route calls between VoIP and the PSTN: subscribe to an Internet Telephony Service Provider (ITSP) or keep the PSTN lines and purchase equipment to make the conversion.
Keeping the PSTN lines requires VoIP gateways to convert the PSTN signal to a VoIP signal. For analog lines, these gateways need a Foreign Exchange Office (FXO) port.
Until recently, most reasonably priced VoIP gateways had only one or two FXO ports - enough ports for home use, but too few for small businesses and remote offices.
The average price for a four FXO port VoIP gateway was $400-$500, until Linksys released the SPA400.
The Linksys SPA400 is an attractive low-cost four FXO port solution that costs $100 less than its peers.
The official position from Linksys is that the SPA400 will only work with the Linksys SPA9000, but in this article, we explain how to configure the SPA400 to work with Asterisk - the Open Source PBX . We also have a related configuration for the CommuniGate Pro Internet Communication System.
This article covers the SPA400 with firmware version 1.0.0.3 and Asterisk version 1.2.7.1. The configuration for new product versions may differ, so check the Voxilla Forums for updated information.
[h1]Configuring the SPA400[/h1]
Connect to the SPA400 via the Web interface. The default username is Admin (case sensitive) and no password.
Setup->Basic Setup
SPA400_setup.jpg
SPA400 Setup->Basic Setup Tab
  1. Go to the Basic Setup screen.
  2. Setup the Fixed IP Address information for the SPA400. Do not use Dynamic IP Addresses – the Asterisk server must find the SPA400 and register with it.
  3. Setup the SPA400 DNS and NTP information.
  4. Click Save Settings.
Setup->SPA9000 Interface
SPA400_SPA9000_Interface.jpg
Linksys SPA400 Setup->SPA9000 Interface Tab

  1. Go to the SPA9000 Interface configuration page.

  2. Change the User ID to spa400.

  3. Leave the SPA9000 Address set to Discover Automatically. For added security, once the SPA400 is working with the Asterisk server this value can be changed to match the server information.

  4. Click Save Settings.
Configuring Asterisk
Connect to the Asterisk server.
sip.conf Settings
The SPA400 needs the account name to match the value specified in the SPA400 User ID configuration field. The entry in sip.conf should look like the following:
Code:
[general] register= spa400@192.168.1.109
Substitute spa400 for the value entered in the SPA400 User ID field and replace 192.168.1.109 with the actual IP address of the SPA400.
Then create a SIP entry for the SPA400.
  • user: the SPA400 User ID field value
  • host: the IP address of the SPA400
  • context: the context that should handle inbound calls from the SPA400
It should look like the following:
Code:
[spa400]
type=friend
user=spa400
host=192.168.1.109
dtmfmode=rfc2833
canreinvite=no
context=from-trunk
insecure=very
extensions.conf Settings
Configure your dial-out routing to utilize the spa400.
A generic dial-out route (dial 9 to get a SPA400 FXO trunk) would look like:
Code:
[general]
DIAL_OUT = 9
DIALOUTIDS = 2/
OUTCID_2 =
OUTMAXCHAINS_2 = 4
OUTPREFIX_2 =
OUT_2 = SIP/spa400
Inbound routing is more complex, but could look something like this (forward all calls to extension 200):
Code:
[from-trunk]
include => from-pstn
...
 
[from-pstn]
include=> from-pstn-custom
...
 
[from-pstn-custom]
exten=>spa400,1,Goto(ext-local,200,1)
Conclusion
The configuration is now ready for testing.
Testing should include testing both inbound and outbound calls.
If you need additional help with this configuration, help is available at the Asterisk Support Forum.
Enhanced by Zemanta

Комментариев нет:

Реклама от BigBN