Proper SPA3102 Setup

jnickel

New Member
Joined
Apr 17, 2009
Messages
11
Reaction score
1
Hi Everyone!

I have really been enjoying PIAF! Fantastic stuff.

I have been trying to get a brand new Linksys SPA3102 working with PIAF, but with intermittent success.

I have one incoming PSTN, one SIP from les.net and then I use Gafachi for outgoing long distance.

I have les.net and Gafachi working perfectly.

I also have the extension side of the SPA3102 registering with Asterisk.

I want to get the PSTN line routed for incoming to PIAF and then back to the SPA3102 for the extension to ring and also use the PSTN as a outgoing line.

I just can't get the SPA3102 to register the PSTN with PIAF. It I am not sure what I am doing wrong.

I followed these instructions: http://blogs.mcbsys.com/mark/post/S...art-4-Configuring-a-Linksys-SPA-3102-ATA.aspx

I have setup the trunk and the SPA3102 as directed, and it does work mostly, but it will cut out - or refuse to go out over the PSTN sometimes. And...it will never register the PSTN line.

Since there was so much documentation for 3CX, I tried it and successfully got it to register the PSTN line. So...I know it can be done.

Any suggestions to get this running? I have done a crapload of research....but I am not sure where/how to troubleshoot next.

Does PIAF have a syslog server built in? If I set the SPA3102 to use the PIAF for syslog...where does the file show up? Or is there some config I need to do?

Any help would be GREATLY appreciated!

Jim
 

jnickel

New Member
Joined
Apr 17, 2009
Messages
11
Reaction score
1
Ok...set back to factory defaults, followed my original instructions and now everything works.

I found one difference to Mark's instructions - I used
Dial Plan 8: (S0:<Personal>) instead of what he had.

Also...I wanted to make my VOIP provider line ring differently (distinctive ring) from the PSTN.

To do this, I setup a ring group and made my incoming route for that DID go to that ring group.

Then in that ring group I put this in the Alert-Info field:

n=Bellcore-r2

So...here are the steps I followed - this is pretty much verbatim from Mark's two articles. You will still need to put in Outbound and Inbound Routing, but that is covered in Mark's articles too.

In FreePBX:
Set Up an Extension

Follow these steps to set up an extension so you can connect an analog phone to the FXS (Line 1) port of the SPA3102:
  1. From the FreePBX main menu, click on the Setup tab. Under Basic, click on Extensions. From the Add an Extension page, from the Device drop-down, select Generic SIP Device, then click on Submit.
  2. Under Add Extension > User Extension, enter "20" (for example--I'll use 2-digit extensions for my home office setup).
  3. Under Add Extension > Display Name, enter "Personal".
  4. Under Device Options > Secret, enter a password for the extension. This is not the voicemail password! It is the password that you configure in the SPA3102 Line 1 tab so that the SPA3102 can register with Asterisk. Make it a secure one so anyone who gains access to your network will not be able to also use your PBX.
  5. Under Voicemail and Directory:
    - Set Status to Enabled.
    - Set Voicemail Password to a numeric password.
    - Set Email Address to the address where you want to receive voicemail by email.
    - Set Email Attachment to Yes.
    - Optionally set Play Envelope to Yes.
    - Under VM Options, enter "callback=from-internal". This will allow you to call back the caller by choosing Advanced Options when listening to a message. See the NerdVittles article Tricking Out Your Trixbox for more information.
    Note: Hover the mouse over any of the options with a dotted underline for an explanation of what the option does.
  6. Scroll to the bottom of the screen and click on Submit Changes. Apply and Continue.
Your first extension is now configured! Again, you should make the corresponding setup in the SPA3102 Line 1 tab before continuing.

Set Up a Trunk

Follow these steps to set up a trunk to connect to the FXO (PSTN) port of the SPA3102:
  1. From the FreePBX main menu, click on the Setup tab. Under Basic, click on Trunks. From the Add a Trunk page, click on Add SIP Trunk.
  2. Under Outgoing Dial Rules > Dial Rules, add the following lines. Change "619" to your area code. By the time it reaches the trunk, numbers will be formatted as 7 or 10 digits (more on that under Set Up Outbound Routes below). These lines instruct the trunk to strip off "619" or "1619" if dialed with the number, and to prepend "1" to any other ten-digit number.
    619|NXXXXXX
    1619|NXXXXXX
    1+NXXNXXXXXX
  3. Under Outgoing Settings > Trunk Name, enter "Personal" (for example).
  4. Under Outgoing Settings > PEER Details, remove the default text and enter these lines, replacing the "secret" value with a secure password:
    context=from-trunk
    host=dynamic
    username=Personal
    secret=<same password as configured as password spa3102 PSTN Line tab>
    type=friend
    dtmfmode=RFC2833
  5. Under Incoming Settings > USER Details, remove the default text. Leave this box empty.
  6. Scroll to the bottom of the screen and click on Submit Changes. At the top of the window, click on Apply Configuration Changes, then in the orange popup window, click on Continue with Reload.
  7. Now that you have configured a trunk, you can delete the default Zaptel trunk, since we aren't using Zaptel. In the upper right corner, click on Trunk ZAP/g0. Then at the top of the screen click on
  8. Delete Trunk g0. Apply and Continue.
Check for SPA3102 Registration

At this point, your SPA3102 should be successfully registering with FreePBX/Asterisk. To check this, from the FreePBX administration screen, click on the Setup tab, then click on FreePBX System Status. Under FreePBX Statistics, you should see one IP Phone and one IP Trunk online. Sometimes these values are not completely accurate (e.g. if the SPA3102 was registered, then powered down).
To double-check, go to the SPA3102's web interface. Under the Voice > Info tab, look for the Registration State values in the Line 1 Status and PSTN Status sections. Both should say "Registered".
If the SPA3102 isn't registering, try forcing a reboot of the SPA3102 by unplugging it and plugging it back in, then check the above values again. If registration is still failing, review the steps above.


On the SPA3102:

Router tab

Wan Setup tab

Internet Connection Settings

- Connection Type: Static (set IP/gateway/DNS)
Optional Settings

- Primary NTP Server: 192.168.1.2 (the Windows server on my network that provides NTP server service)
- Remote Management
Remote Management

- Enable WAN Web Server: Yes
Lan Setup tab

Networking Service: Bridge (use external router)
Voice tab

SIP tab

RTP Parameters

- RTP Packet Size: 0.020
Regional tab

Ring and Call Waiting Tone Spec

- Ring Waveform: Sinusoid (default is Trapezoid)
Miscellaneous

- Daylight Saving Time Rule: start=3/8/7/02:0:0;end=11/1/7/02:0:0;save=1
(should handle the new Daylight Saving rules; default was start=4/1/7;end=10/-1/7;save=1)
Line 1 tab

Proxy and Registration

- Proxy: 192.168.1.100 (the IP address that the router assigns to mypbx.mydomain.local)
Subscriber Information

- Display Name: Personal [SipX: 200 if using 3-digit extensions]
- User ID: 20 [SipX: 200 if using 3-digit extensions]
- Password: (phone extension password)
- Use Auth ID: no
PSTN Line tab

SIP Settings

- SIP Port: 5061 [3CX: change the PSTN line in the 3CX web UI to use 5061, not 5060]
Proxy and Registration

- Proxy: 192.168.1.100 (the IP address that the router assigns to mypbx.mydomain.local) [SipX: leave blank]
- Register: Yes [SipX: No]
- Make Call Without Reg: No [SipX: Yes]
- Ans Call Without Reg: No [SipX: Yes?]
Subscriber Information

- Display Name: Personal [SipX: leave blank]
- User ID: Personal [SipX: leave blank]
- Password: (trunk password) [SipX: leave blank]
Dial Plans

- Dial Plan 8: (S0:<Personal>) (dial trunk "Personal")
[SipX: Dial Plan 8: S0<:[email protected]> (set to ring thru to ext. 200)]
PSTN-To-VoIP Gateway Setup

- PSTN Ring Thru Line 1: No
- PSTN CID For VoIP CID: Yes
- PSTN Caller Default DP: 8 (points to Dial Plan 8 above)
FXO Timer Values (Sec)

- PSTN Answer Delay: 5 (allow time for Caller ID and/or fax detection)
 

Members online

Forum statistics

Threads
25,816
Messages
167,793
Members
19,246
Latest member
OctavianBebu
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top