Linksys SPA3102 with Asterisk

sipura-spa-3000-freepbx

Configuring SPA3102 (or SPA3000) is not very straightforward and requires alot of configurations on both the Gateway and Asterisk PBX. Follow this instruction step by step.
Note that CLID and MTMF in IVR is successfully checked with this gateway.

for the sake of this manual we assume the following scenario:
SPA3102 IP: 192.168.1.5
Asterisk IP: 192.168.1.240
FXS extension: 301
FXO UserID: SPA3102(exactly the same as trunk name in PBX)

SPA3102 Configurations
Initial setup
1) Connect one end of an Ethernet network cable to the ETHERNET port of the Voice Gateway.
[attachment=9]ethernet.png[/attachment]
2) Connect the other end to the Ethernet port of your PC. Connect one end of a different Ethernet network cable to the INTERNET port of the Voice Gateway. Connect the other end to your LAN switch.
[attachment=10]internetport.png[/attachment]

Getting IP address
1) Plug in an analog phone into either phone1 or phone2 port.
2) Press **** to enter the configuration menu.
3) press 110# and listen to the voice announcing the ip address. (by default it’s set on DHCP)

browse the gateway admin web GUI: http://192.168.1.5/advanced.

Note: if you cannot browse the IP, chances are the gateway WAN access is blocked for http access. In this case the gateway is set to be a router to the PC which is connected to its Ethernet port. In such a case you simply get the DHCP IP on your pc (default is 192.168.0.100) and browse the IP of the gateway which will be 192.168.0.1

Change to admin user
by default there is no login prompt. so you will enter the GUI with basic user. Click on the admin user to change to admin mode.
[attachment=8]Selection_078.png[/attachment]

Check the RTP Packet Size!!!
VERY IMPORTANT:
Before you do anything else, go to the SIP tab. Look under RTP Parameters and check the RTP Packet Size. Linksys has set this to 0.030 by default, which is not correct for use on ulaw (G711u codec) connections. Change it to 0.020 instead (or 0.02 on older Sipura devices). If you don’t do this, you may experience strange problems with “choppiness” or random clicks on some calls but not others, and you may also experience problems when playing Asterisk sound files. By the way, this applies to all Linksys/Sipura adapters, not just the SPA-3000/3102.

PSTN Line tab

1- Sip settings: Just make sure the SIP Port is set to port 5061
[attachment=7]Selection_083.png[/attachment]

2- Proxy and Registration
[attachment=6]Selection_084.png[/attachment]

3- Subscriber Information
[attachment=5]Selection_085.png[/attachment]

4- Dial plans
Under Dial Plans it’s important not to change the default (xx.) on any except Dial Plan 2. I put it very simple to go to my inbound so FreePBX takes care of my calls: (S0<:1234567890>) or in case you don’t want to worry about DID then you can set it to this: (S0<:s>)
[attachment=4]Selection_086.png[/attachment]

5- VoIP-To-PSTN Gateway Setup
[attachment=3]Selection_087.png[/attachment]

6- PSTN-To-VoIP Gateway Setup:
[attachment=2]Selection_088.png[/attachment]

7- FXO Timer Values (sec)
[attachment=1]Selection_089.png[/attachment]

=====================================================

FreePBX Trunk setup

Step1) Create a SIP trunk with following detail:

Trunk Name: SPA3102 (Note: This should be exactly the same as User ID in PSTN > subscriber information in SPA3102)

Peer Details
fromdomain=192.168.1.5
host=192.168.1.5
username=302
fromuser=302
secret=123456
disallow=all
allow=ulaw
qualify=yes
context=from-trunk
type=friend
nat=never
canreinvite=no
insecure=very
port=5061

Register String
302:123456@192.168.1.5

Step2) Create an outbound route and set the trunk sequence to the trunk you created above
Step3) set the inbound route destination to the one you want. In case you want to use DID, set the DID to the number you put in “Dial Plan 2” while configuring the Sipura, as shown in the instructions below. In this case we set it to 3102.

You may also like