Linksys SPA3102

From LinuxMCE
Jump to: navigation, search


The Linksys SPA3102/Sipura 3000 PSTN Gateways feature the ability to connect a standard telephone landline to IP-based data networks and can be configured as a SIP trunk for use with your LinuxMCE built-in telephony system.

Due to the area in which I live, there are no viable High Speed DSL/CABLE or other types of internet. I only have access to Satellite Internet, which due to the nature of the beast, has a very high latency (900 - 1400ms average) and I can not use a traditional VOIP provider like Broadvoice, Vonage, or the like. However as the telephony feature of LinuxMCE is a very cool perk to this system, I figured I would have a go at integrating my analog Verizon landline into the system. To create this SIP/Bridge I chose the Linksys SPA3102, however after scanning the FreePBX forums, I can assume they will work well with the Sipura 3000 as well. After many hours of breaking, and then fixing my phone setup, I have a working viable solution, and these steps will detail how to set up this product for use with LinuxMCE. Some of these settings are borrowed from the existing wiki's here on these products, but after using them and failing, I had a go on my own. as always if there is a better more efficient way to accomplish this, please EDIT this wiki. I am by no means an expert. :)

Required items to complete this process.

  • Linksys SPA3102 or Sipura SPA3000 - Average price between $40 and $80, depending on your source. I used Newegg, because "Once you've NewEgged...."
  • A laptop, netboox, or PC you can temporarily connect a network cable to the LAN port on the device
  • A web browser for configuring the SPA and the Phone Lines in LinuxMCE webmin.
  • The following file: spa3102.tar.gz
  • Any hardwired old school phone, with touchtone.

Setting up with LinuxMCE

Adding the new config files to your core.

No longer needed, config files added to LinuxMCE 810.

  • Download the above file to a location of your choice
  • Extract/Copy/Modify the files
    • tar zxvf spa3102.tar.gz
    • chmod a+x
    • sudo cp /usr/pluto/bin
    • sudo cp provider_list.txt /etc/asterisk
      • This file is default plus my addition, if you have already modified your /etc/asterisk/provider_list.txt, you can also simply add the line:
      • Linksys SPA3102/SPA3000 spa3102 SIP (tab seperated)

First steps completed.

Adding your new Phone Line

  • Log into the webadmin of your core
  • From the left hand panel, choose "Phone Lines"
  • In the right panel, using the drop downs, select the new "Linksys SPA3102/SPA300" option.
  • You will now be presented with 4 boxes to enter data. use the settings I have below here. (They are not UberSecure, and you can change them to what you like, just remember the username and password for later, when we configure the SPA itself)
    • Username: spa3102
    • Password: lmce
    • Phone Number: <insert your 10 digit phone number, including your area code, like 5553221234> Very important, sets up routing, caller ID, etc.
    • Host: dynamic <later in this wiki, when setting up the SPA, we will be setting a manual IP address, but this dynamic setting now, works some magic, lets leave it that way.>
    • Save the file

Second steps completed. Congratulations, you just set up your FreePBX trunk!! Beer.

Setting up the SPA3102/SPA3000

Factory reset your device (just to be on the same page.)

  • Plug your hardwire phone into the "Phone" jack on the SPA.
  • Pick up the receiver on your hardwired phone
    • Dial ****
    • When the voice comes on dial 7 3 7 3 8#
    • When prompted to confirm, press 1

Factory reset complete!

  • Plug a network cable from the "WAN" port on the SPA to the internal network on your core.
  • Plug a phone cable into the "Line" jack on the SPA to your wall jack.
  • Plug a network cable into the "LAN" port on the SPA into your laptop, netbook, or PC.
    • Once your device gets an IP address from the SPA, point your browser to
      • By default the SPA has no passwords set for User, or Admin.

WAN Setup

  • Using the image below, set up all the areas in yellow - Summary:
    • Static IP
    • IP -
    • Netmask -
    • Gateway -
    • Hostname - SPA3102
    • Primary DNS -
    • Primary NTP -
    • Set WAN server to "Yes"

You can now, and always remember to, click "Apply All Changes" at the bottom, and if you like, disconnect your device from the LAN port, and re-connect to it from your MD or regular PC.


SIP Setup

  • The only thing we need to change here is the RTP packet size
    • RTP Parameters
      • RTP Packet Size - 0.020 - !!! Very important to do this !!!


Regional Set Up

  • Clear out all Vertical Service Activation Codes - We want FreePBX/LMCE to control these.
    • Vertical Service Activation Codes
      • Clear out all codes like shown below.



  • Using the image below, set up all the areas in yellow - Summary:
    • Line Enable - Yes
    • SIP Settings
      • SIP port - 5061
    • Proxy Settings
      • Proxy -
      • Register Expires - 300
      • Make Call Without Reg - Yes
      • Ans Call Without Reg - Yes
    • Subscriber Settings
      • Display Name - Unknown Caller (this is what is displayed when a call comes in without caller ID info)
      • UserID - spa3102 (this is what you set when creating the Phone Line in the LinuxMCE webmin)
      • Password - lmce (this is what you set when creating the Phone Line in the LinuxMCE webmin)
    • Dial Plans
      • A note here, do not change any of the default (xx.) settings other than Dial Plan 2 !!
        • Dial Plan 2 - (S0<:XXXXXXXXXX>) - where the X's are your 10 digit phone number including area code. - note to, that is a zero beside the S
    • VoIP-To-PSTN Gateway Setup
      • VoIP-To-PSTN Gateway Enable - Yes
      • VoIP Caller Auth Method - None
      • VoIP PIN Max Retry - 3
      • One Stage Dialing - Yes - Extremely inportant setting !!!
      • Line 1 VoIP Caller DP - none
      • VoIP Caller Default DP - none
      • Line 1 Fallback DP - none
    • PSTN-To-VoIP Gateway Setup
      • PSTN-To-VoIP Gateway Enable - Yes
      • PSTN Caller Auth Method - none
      • PSTN Ring Thru Line 1 - No
      • PSTN PIN Max Retry - 3
      • PSTN CID For VoIP CID - Yes
      • PSTN Caller Default DP - 2
      • Off Hook While Calling VoIP - No
      • Line 1 Signal Hook Flash To PSTN - Disabled
    • FXO Timer Values (sec)
      • VoIP Answer Delay - 0 (zero)
      • PSTN Answer Delay - 3
      • Detect CPC - No
    • Don't forget to "Submit All Changes"

For LinuxMCE 10.04 ------- CHANGE THE FOLLOWING: Thx to gbutters

      • Subscriber Information
      • User ID: XXXXXXXXXX <- your phone number including area code
      • Use Auth ID: yes
      • Auth ID: XXXXXXXXXX <- your phone number including area code

PSTN Tab setup complete!!! Congratualtions!! Beer!






Dial Rules vs Dial Patterns

One of the first issues I came across, was getting the "Your call can not be completed as dialed", and the "All circuits are busy now" Messages. Here is what I did to overcome them.

  • Dial Rules
    • Log into the LinuxMCE webmin
      • From the top click Advanced > Configuration > Phones setup to get to the FreePBX admin screen.
      • In the left click on trunks
        • In the right click on the trunk you created for the spa3102
        • Look for Dial Rules:
        • Clear everything that is in it
        • Scroll to bottom, click "Submit Changes"
        • At the top of the FreePBX screen click "Apply Configuration Changes"

This does several things, including eliminating your significant other saying "Why do I have to Dial a 9 and a 1 to call next door" :)

  • Dial Patterns
    • In the left click "Outbound Routes"
    • In the right, click the button for your spa3102 outbound routes

An explanation here as to the difference between Dial Patterns, and Dial Rules.

Dial Rules are used to add a number/character to, or strip a number/character away from anything dialed on any extension in your home. I did not need anything like this as to dial long distance, I only need enter the area code and the number, no 1 and certainly no 9. Dial patterns are how FreePBX knows how to send a particular call to a route. You may have a route just for local long distance, and you may have a route for international calls, and then another for local calls. In my cituation, I only need 911, local 7 digit numbers, and long distance 10 digit numbers, so here is what is in my outbound route Dial Pattern:

    • N11 - For 911
    • NXXNXXXXXX - For 10 digit long distance
    • NXXXXXX - for regular old 7 digit local calls

That is it. I only have one trunk, and I only need it to do those 3 types of calls, so why complicate it right? There is way more information available at:

FreePBX support/Wiki/Forums.


You should now see something like this when looking at the "Info" tab:


You will notice here that I did not have my phone line plugged in at the time, LMCE was answering calls, and I had not had the routuing set up the way I want.

All required settings should now be applied. Try to make a test call. If your MD's are not set up for making some calls, try an IP phone if you have one, or a SIP device, like an Ekiga softphone Ekiga

In addition to the PSTN setup, I will also do a wiki on configuring the "Phone" jack coming out of the SPA as an extension in LinuxMCE phones set up. Located here: Linksys_SPA3102_Line_1_Extension_Set_Up

Useful Link Goodness:

Ekiga - Excellent write up on getting a softphone setup on your favorite Non-LinuxMCE linux box.

Linksys_spa-3102 - Original SPA3102 page.

Linksys_spa3000_pstn_interface - Another home-grown wiki on the device

The FreePBX HowTo that saved what is left of my hair

Best Regards,

--Sethj 21:13, 11 October 2010 (CEST)