News & Reviews
More How-To's & Tips More News
More Reviews Device Configuration Tools
No account yet? Create one
Forgot your Username or Password?





Reply
 
LinkBack Article Tools Rate Article Display Modes
  #1  

Default Using the Linksys SPA400 with Asterisk

 

Contents

[top]Introduction


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.

[top]Configuring the SPA400


Connect to the SPA400 via the Web interface. The default username is Admin (case sensitive) and no password.

[top]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.

[top]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.

[top]Configuring Asterisk


Connect to the Asterisk server.

[top]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

[top]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)

[top]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.


Contributors:
Created by eric, September 9th, 2007 at 02:24 AM
Last edited by eric, September 9th, 2007 at 02:24 AM
7 Comments , 12487 Views
  #2 (permalink)  
Old November 6th, 2007, 02:34 PM
sergee sergee is offline
Junior Member
 
Join Date: Nov 2007
Posts: 2
sergee is on a distinguished road
Default Re: Using the Linksys SPA400 with Asterisk

if you get an error like this:

[Nov 6 17:30:44] WARNING[23605]: chan_sip.c:12211 handle_response_register: Forbidden - wrong password on authentication for REGISTER for 'spa400' to '192.168.1.109'

Try to change

register=> spa400@192.168.1.109

to

register=> spa400@192.168.1.109/spa400

Last edited by sergee : May 21st, 2008 at 10:36 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old May 9th, 2008, 03:41 PM
liviutoma liviutoma is offline
Junior Member
 
Join Date: Aug 2005
Posts: 6
liviutoma
Default Re: Using the Linksys SPA400 with Asterisk

Has anybody done this with a more recent firmware version ?
Mine has firmware 1.0.1.4 and I am getting the "Forbidden - wrong password on authentication for REGISTER for 'SPA9000' to <my ip address>"
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old May 12th, 2008, 03:51 AM
TheDr TheDr is offline
Junior Member
 
Join Date: May 2008
Posts: 1
TheDr is on a distinguished road
Default Re: Using the Linksys SPA400 with Asterisk

Does anyone know how to configure the SPA400 with asterisk to pass through which number was dialed? we also need to know the caller ID.

Thanks in advance
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old May 14th, 2008, 08:04 PM
liviutoma liviutoma is offline
Junior Member
 
Join Date: Aug 2005
Posts: 6
liviutoma
Default Re: Using the Linksys SPA400 with Asterisk

Quote:
Originally Posted by TheDr View Post
Does anyone know how to configure the SPA400 with asterisk to pass through which number was dialed? we also need to know the caller ID.

Thanks in advance
The problem with getting the number that was dialed is that it's very unlikely that the phone line will support it. Basically you want to get DID (DNIS) info, but the Telco won't supply it over an analog line.
I managed to get that but I have a special setup: a PRI coming from the Telco into an Adtran Atlas 550 phone switch. The switch takes the DNIS info from the PRI and converts it to DTMF tones which are played when the SPA400 picks up the line. Technically to the SPA400/SPA900 it's like someone was dialing an extension immediately after the call was answered.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old May 14th, 2008, 08:04 PM
  #6 (permalink)  
Old May 21st, 2008, 10:16 AM
sergee sergee is offline
Junior Member
 
Join Date: Nov 2007
Posts: 2
sergee is on a distinguished road
Default Re: Using the Linksys SPA400 with Asterisk

Most likely you have only 1 DID on each analog line. SPA400 can pass port's id to asterisk, then you can use a little dialplan magic to cut it:

exten => mygw1,1,NOOP(${SIP_HEADER(TO)})
exten => mygw1,n,SET(TMP2=${SIP_HEADER(TO)})
exten => mygw1,n,SET(TMP1=${CUT(TMP2,@,1)})
exten => mygw1,n,SET(DST=${CUT(TMP1,:,2)})
exten => mygw1,n,Goto(dids,${DST},1)

best regards,
voipsolutions.ru
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old May 28th, 2008, 01:42 PM
madhu718 madhu718 is offline
Junior Member
 
Join Date: May 2008
Posts: 1
madhu718 is on a distinguished road
Default Re: Using the Linksys SPA400 with Asterisk

Can any one let me know waht is that 192.168.1.109 ip add used for,
As i have a linksys SPA400 which i am using as a gateway for PSTN line i am not able to register with asterisk box, in my astersik log i found that the regestering to 192.168.1.109 request time out, please some one can help me to solve this proble i will be great full to you
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old October 14th, 2008, 07:45 PM
starlites starlites is offline
Junior Member
 
Join Date: Oct 2008
Posts: 1
starlites is on a distinguished road
Default Re: Using the Linksys SPA400 with Asterisk

Great tutorial!
any idea how to improve how well asterisk detects that the calling party has stopped ringing? or improving call end detection at all, i'm getting some pretty long voicemails, which is also tying up the line for other callers... I'm struggeling trying to find anything about that...

would appreciate any help offered.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Article Tools
Display Modes Rate This Thread
Rate This Thread:



Similar Threads for: Using the Linksys SPA400 with Asterisk
Thread Thread Starter Forum Replies Last Post
Linksys SPA400 Product Review eric Linksys SPA9000/SPA400 Support Forum 16 March 19th, 2008 07:20 PM
Linksys SPA9000 + SPA400 = Ideal solution for small office?? WorldWideWeeb Linksys SPA9000/SPA400 Support Forum 10 January 30th, 2007 02:51 PM
Linksys SPA400 FXO ports off hook issue Silent_Dog Linksys SPA9000/SPA400 Support Forum 9 January 26th, 2007 10:45 AM
How to configure the SPA400 with non-Linksys systems eric Linksys SPA9000/SPA400 Support Forum 0 November 10th, 2006 07:57 PM
Linksys SPA400 Administration guide davidread22 Linksys SPA9000/SPA400 Support Forum 13 September 28th, 2006 01:53 PM



All times are GMT. The time now is 08:57 AM.


vBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd. SEO by vBSEO 3.0.0 ©2007, Crawlability, Inc. Logos and trademarks are the property of Voxilla or their respective owner. All other content © 2003-2007 by Voxilla, Inc.