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:
- 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.
- Under Add Extension > User Extension, enter "20" (for example--I'll use 2-digit extensions for my home office setup).
- Under Add Extension > Display Name, enter "Personal".
- 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.
- 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.
- 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:
- 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.
- 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
- Under Outgoing Settings > Trunk Name, enter "Personal" (for example).
- 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
- Under Incoming Settings > USER Details, remove the default text. Leave this box empty.
- 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.
- 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
- 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)