Difference between revisions of "Linksys SPA3102"

From LinuxMCE
Jump to: navigation, search
(New page: Category: Hardware {| align="right" | __TOC__ |} Category:Tutorials Category:Telecom Category:Voip ====Background==== The Linksys SPA3102/Sipura 3000 PSTN Gateways fea...)
 
(PSTN Tab)
 
(18 intermediate revisions by 6 users not shown)
Line 1: Line 1:
 
[[Category: Hardware]]
 
[[Category: Hardware]]
 +
[[Category:Telecom]]
 +
[[Category:VoIP]]
 +
[[Category:ATA]]
 
{| align="right"
 
{| align="right"
 
   | __TOC__
 
   | __TOC__
 
   |}
 
   |}
  
[[Category:Tutorials]]
 
[[Category:Telecom]]
 
[[Category:Voip]]
 
 
====Background====
 
====Background====
 
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.  
 
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. :)
 
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. :)
 +
 +
{{p}}
  
 
=Required items to complete this process.=
 
=Required items to complete this process.=
Line 21: Line 23:
 
* Any hardwired old school phone, with touchtone.
 
* Any hardwired old school phone, with touchtone.
  
 +
{{p}}
  
 
=Setting up with LinuxMCE=
 
=Setting up with LinuxMCE=
  
 
====Adding the new config files to your core.====
 
====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
 
* Download the above file to a location of your choice
 
** wget http://dataless.jeromenet.org/filespace/spa3102.tar.gz
 
** wget http://dataless.jeromenet.org/filespace/spa3102.tar.gz
 
* Extract/Copy/Modify the files
 
* Extract/Copy/Modify the files
 
** tar zxvf spa3102.tar.gz
 
** tar zxvf spa3102.tar.gz
** chmod a+x create_create_amp_spa3102.pl
+
** chmod a+x create_amp_spa3102.pl
 
** sudo cp create_amp_spa3102.pl /usr/pluto/bin
 
** sudo cp create_amp_spa3102.pl /usr/pluto/bin
 
** sudo cp provider_list.txt /etc/asterisk
 
** sudo cp provider_list.txt /etc/asterisk
Line 35: Line 41:
 
*** Linksys SPA3102/SPA3000        http://www.cisco.com/en/US/products/ps10027    spa3102 SIP  (tab seperated)
 
*** Linksys SPA3102/SPA3000        http://www.cisco.com/en/US/products/ps10027    spa3102 SIP  (tab seperated)
 
First steps completed.
 
First steps completed.
 +
 +
{{p}}
  
 
====Adding your new Phone Line====
 
====Adding your new Phone Line====
Line 47: Line 55:
 
** Save the file
 
** Save the file
 
Second steps completed. Congratulations, you just set up your FreePBX trunk!! Beer.
 
Second steps completed. Congratulations, you just set up your FreePBX trunk!! Beer.
 +
 +
{{p}}
  
 
=Setting up the SPA3102/SPA3000=
 
=Setting up the SPA3102/SPA3000=
Line 63: Line 73:
 
** Once your device gets an IP address from the SPA, point your browser to http://192.168.0.1
 
** Once your device gets an IP address from the SPA, point your browser to http://192.168.0.1
 
*** By default the SPA has no passwords set for User, or Admin.
 
*** By default the SPA has no passwords set for User, or Admin.
 +
{{p}}
  
 
====WAN Setup====
 
====WAN Setup====
Line 78: Line 89:
  
 
[[Image:Spa3102-wan-setup.png]]
 
[[Image:Spa3102-wan-setup.png]]
 +
{{p}}
  
 
====SIP Setup====
 
====SIP Setup====
Line 86: Line 98:
  
 
[[Image:Spa3102-sip-status.png]]
 
[[Image:Spa3102-sip-status.png]]
 +
{{p}}
  
 
====Regional Set Up====
 
====Regional Set Up====
Line 94: Line 107:
  
 
[[Image:Spa3102-regional-status.png]]
 
[[Image:Spa3102-regional-status.png]]
 +
{{p}}
  
 
====PSTN Tab====
 
====PSTN Tab====
Line 120: Line 134:
 
*** Line 1 VoIP Caller DP - none
 
*** Line 1 VoIP Caller DP - none
 
*** VoIP Caller Default DP - none
 
*** VoIP Caller Default DP - none
*** Line 1 VoIP Caller DP - none
 
 
*** Line 1 Fallback DP - none
 
*** Line 1 Fallback DP - none
 
** PSTN-To-VoIP Gateway Setup
 
** PSTN-To-VoIP Gateway Setup
Line 136: Line 149:
 
*** Detect CPC - No
 
*** Detect CPC - No
 
** Don't forget to "Submit All Changes"
 
** 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!
 
PSTN Tab setup complete!!! Congratualtions!! Beer!
Line 146: Line 167:
  
 
[[Image:Spa3102-pstn-4.png]]
 
[[Image:Spa3102-pstn-4.png]]
 +
 +
{{p}}
 +
 +
=Troubleshooting=
 +
 +
====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:
 +
 +
[http://support.freepbx.org FreePBX support/Wiki/Forums].
 +
 +
{{p}}
  
 
=Summary=
 
=Summary=
Line 159: Line 219:
  
 
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.
 
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]]
 +
{{p}}
  
Useful Link Goodness:
+
====Useful Link Goodness:====
  
 
[[Ekiga]] - Excellent write up on getting a softphone setup on your favorite Non-LinuxMCE linux box.
 
[[Ekiga]] - Excellent write up on getting a softphone setup on your favorite Non-LinuxMCE linux box.
 +
 
[[Linksys_spa-3102]] - Original SPA3102 page.
 
[[Linksys_spa-3102]] - Original SPA3102 page.
 +
 
[[Linksys_spa3000_pstn_interface]] - Another home-grown wiki on the device
 
[[Linksys_spa3000_pstn_interface]] - Another home-grown wiki on the device
 +
 
[http://www.freepbx.org/support/documentation/howtos/howto-linksys-spa-3102-sipura-spa-3000-freepbx The FreePBX HowTo that saved what is left of my hair]
 
[http://www.freepbx.org/support/documentation/howtos/howto-linksys-spa-3102-sipura-spa-3000-freepbx The FreePBX HowTo that saved what is left of my hair]
 +
 +
Best Regards,
 +
 +
--[[User:Sethj|Sethj]] 21:13, 11 October 2010 (CEST)

Latest revision as of 19:57, 25 October 2012

Background

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 create_amp_spa3102.pl
    • sudo cp create_amp_spa3102.pl /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 http://www.cisco.com/en/US/products/ps10027 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 http://192.168.0.1
      • 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 - 192.168.80.200
    • Netmask - 255.255.255.0
    • Gateway - 192.168.80.1
    • Hostname - SPA3102
    • Primary DNS - 192.168.80.1
    • Primary NTP - 192.168.80.1
    • 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.

Spa3102-wan-setup.png

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 !!!

Spa3102-sip-status.png

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.

Spa3102-regional-status.png

PSTN Tab

  • Using the image below, set up all the areas in yellow - Summary:
    • Line Enable - Yes
    • SIP Settings
      • SIP port - 5061
    • Proxy Settings
      • Proxy - 192.168.80.1
      • 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!

Spa3102-pstn-1.png

Spa3102-pstn-2.png

Spa3102-pstn-3.png

Spa3102-pstn-4.png



Troubleshooting

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.



Summary

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

Spa3102-pstn-status.png

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)