Linksys SPA3102 with Asterisk


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:
Asterisk IP:
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.
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.

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:

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 and browse the IP of the gateway which will be

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.

Check the RTP Packet Size!!!
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

2- Proxy and Registration

3- Subscriber Information

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

5- VoIP-To-PSTN Gateway Setup

6- PSTN-To-VoIP Gateway Setup:

7- FXO Timer Values (sec)


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

Register String

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