PAP2T Configuration Notes,
by Jerry Toomey, http://www.wansend.com,
14-April-2011
Following are notes on the
design and configuration of my VoIP solution which includes a Cisco PAP2T VoIP
server box. This solution gives me a
stable local U.S. phone number and lets me receive calls for free. Calling out costs 1.1 cents per minute and
the outgoing caller ID properly shows my local phone number. This is not a seamless solution because you
have to sign up at three different web sites and get them to play well together
with your home’s wireless router and PAP2T.


My VoIP map: Land Line --> Google Voice --> ipkall.com --> callwithus.com --> Home
Wifi Router --> PAP2T
--> Phone
Google Voice provides a stable local
U.S. phone number that can forward to my cell phone, land line, and VoIP
simultaneously, so if the VoIP ever goes down, I still get the call.
IPkall.com adds a Washington State landline
phone number to callwithus.com so Google Voice can forward incoming calls. I had to register and cancel IPkall seven times before I got a good number. After three tries I got a number that Google
Voice let me use. My phone kept showing
the same caller ID and I determined that it was a GVoice
- IPkall issue which could only be resolved by
getting a non-253 phone number from IPkall. After four more tries, I finally got a phone
number that GVoice would accept. Now it all works great.
I chose Callwithus
after comparing different VoIP / SIP providers:
1. callwithus.com is free incoming, 1.1 cent/minute outgoing,
outgoing caller ID configurable
2. localphone.com is free incoming, 1.0 cent/minute
outgoing, no outgoing caller ID
3. callcentric.com is free incoming, 2.0 cent/minute
outgoing, outgoing caller ID configurable
Callwithus Note: I put in $5.00, after
fees it came out to $4.59 @ 1 cent/min = 1.0893246 c/min or 1.1 c/min. You have to buy $25 at a time to avoid the
fees. It’s still better than Localphone because you get to set the outgoing caller
ID. Localphone
only gives you outgoing caller ID if you pay $1/month AND the caller ID is ONLY
the number they assign to you.
Test everything with a soft
phone before configuring the PAP2T. This
rules out Internet Service Providers (ISPs) blocking traffic. It also rules out router mis-configuration
issues, low-bandwidth issues, and possible wifi
issues. I used X-Lite
4.0 which is free from http://www.counterpath.com/xlite-comparison.html
After many flakiness issues
with my Cisco PAP2T
VoIP server, I finally resolved them by doing the following:
1. On the home wifi
router (I have a Buffalo
WHR-HP-G54 running DD-WRT
v24-sp2 - build 14896) make the following change:
Under Services --> Services
--> DHCP Server --> Static Leases --> add a static lease for your
PAP2T's MAC address. You don't want this
device moving around.

2. Upgrade the PAP2T firmware, even if you
already have v5.1.6(LS) installed. This seemed to fix a bunch of issues.
Do a Google search for "Cisco
PAP2T_v5.1.6_fw.zip"
Unzip the file and run the executable. You'll see:

3. Clear the PAP2T's configuration: plug a phone into the PAP2T, pick it up and
dial **** (that's four stars), then 73738#, then 1# to
clear the configuration.
4. Bring up a web browser and connect to the
PAP2T at the IP address you established in step 1. Click on "Admin Login," then
"Advanced View" to see all the settings.
5. Under the System tab change the following:
Admin
Password (blank) leave
blank.
User Password abcdef set
your password here.
Primary NTP Server: north-america.pool.ntp.org was
blank. If you do a search for NTP
servers, you’ll get plenty of alternatives.
6. Under the SIP tab change the
following:
SIP T1: 1 was
.5. This increases the registration
timeout.
Reg
Retry Long Intvl: 120 was 1200. This
decreases the retry interval when registration failure occurs.
RTP Packet Size: 0.020 was
0.030. Smaller packets
means less-choppy voice.
STUN Enable: Yes was
No. STUN stands for Session Traversal
Utilities for NAT. 99% of homes have
NAT.
STUN Server: stun.callwithus.com was
blank. The STUN server discovers the
true port mapping after NAT translation occurs.
7. Under the Provisioning tab change
the following:
Provision Enable: No was
Yes. This lets
us do the micro-managing of the PAP2T device settings.
8. Under the Regional tab change the
following:
Dial Tone: 350@-19,440@-19;20(*/0/1+2) the
20 was a 10. This gives you 20 seconds
to dial out, instead of 10 seconds.
Reorder Tone: 480@-19,620@-19;10(.125/.125/1+2) both
.125's were .25. When you dial a bad
number, this makes a faster beeping noise.
Ring Waveform: Sinusoid was
Trapezoid. When the phone rings, this is
a “normal” American ring-tone.
Ring Voltage: 90 was 85. When the
phone rings, this is the “normal” American voltage given.
CPC Delay: 10 was 2. This
disconnects the call faster when you hang-up.
CPC Duration: 0.5 was
0. This disconnects the call faster when
you hang-up.
Time Zone: GMT -7:00 for
Mountain time, “GMT -8:00” is for Pacific time
Daylight Saving
Time... start=3/8/7/2:00;end=11/1/7/2:00;save=1 Read
it like this: DST Start is the 7th
day of the week after March 8th at 2:00am. DST End is the 7th day of the week
after November 1st at 2:00am.
FXS Port Input Gain: +0 was
-3 (microphone volume). I changed this
because when I dialed-out, the other phone could barely hear me. I change it in increments of three.
FXS Port Output Gain: -3 no
change (speaker volume).
9. Under the Line 1 tab change the
following:
NAT Mapping Enable: Yes was
No. Because 99% of homes use a router,
we turn this on.
NAT Keep Alive Enable: Yes was
No. Without keepalives,
the home router will reset the ports, killing incoming calls.
NAT keep alive Msg: KeepAlive was
$NOTIFY. Sometimes $NOTIFY works, but KeepAlive most always works.
SIP Port: 5065 was
5060. See note below on why I changed the
UDP port this way.
Proxy: sip.callwithus.com was
blank. Callwithus
gives me this information when I sign up for their service.
Registration Expires: 300 was 3600. This
re-registers the phone every 5 minutes, instead of every 60 minutes.
Proxy Fallback Intvl: 60 was 3600. This
retries a failed connection every minute, instead of every 60 minutes.
Display Name: Callwithus
Toomey was
blank. This is just a description of the
service. Toomey is my last name.
User ID: 123456789 9-digit
Callwithus user name.
Login to Callwithus.com
with your Login ID which is different from the numeric “Username” which you’ll
find on the “VoIP Accounts” tab on the left. While you’re there, don’t forget to set your
outgoing caller ID by clicking “Edit” and filling in that section.
Password: abcdef 6+
digit password. Callwithus
gives me this and even lets me edit it on their website.
Use Auth ID: Yes was
No. This is per instructions from Callwithus.
Auth ID: 123456789 9-digit
Callwithus user name.
It is the same as the User ID above, and is given by Callwithus.
Dial Plan: (*xx|<911:18018404000>|<411:18002464411>|<511:18665118824>|<311:18015766300>|611|<0:*0>|<:1801>[2-9]xxxxxx|<:1>[2-8]xxxxxxxxxS0|1xxx[2-9]xxxxxxS0|xxxxxxxxxxxx.)
Note: This
dial plan has the following benefits for the 801 area code:
1.
Dialing *30, *31, etc. passes right through and is dialed as-is. Many of these codes are found at callwithus.com/faq.
2.
Dialing 911 automatically dials the Salt Lake County police dispatch at
1-801-840-4000. I found the number at vecc9-1-1.com.
3.
Dialing 411 automatically dials the Microsoft Bing directory assistance at
1-800-BING-411. I found the number at wikipedia.com.
4.
Dialing 511 automatically dials the Utah Road Conditions hotline at
1-866-511-UTAH. I found the number at udot.utah.gov.
5.
Dialing 311 automatically dials the Draper, Utah Police Records at
801-576-6300. I found the number at draper.ut.us.
6.
Dialing 611 passes right through and is dialed as-is. By the way, this number isn’t valid.
7.
Dialing 0 automatically dials *0 which gives me my account balance
and then lets me dial out. See callwithus.com/faq.
8.
Dialing a 7-digit number automatically prepends 1-801,
a Utah area code.
9.
Dialing a 10-digit number automatically prepends 1
for long-distance.
10.
Dialing a 11-digit number starting with
"1" goes through as-is.
11.
Dialing a 12 or more digit number goes through as-is.
SIP Port note:
Use of the 5065 port instead of 5060 has a few benefits:
1.
Since it is non-standard, it is harder for your ISP to block the traffic.
2.
It won’t conflict with any soft phone that you may use which defaults to
port 5060.
3.
There is no rule that says you must use 5060 as your port. It is negotiated between your PAP2T and the
SIP provider.
10. Under the Info tab check for the following:
Current Time Does it
work? This rules
out problems with connectivity to the Internet.
External IP You
should see numbers NOT starting with 10.x.x.x, 172.16.x.x, or 192.168.x.x.
Line 1 Registration
State: Should be
"Online". If you don't see
"Online", you can't make or receive calls.
Line 1 Mapped SIP
Port: Should be 5065. If you don't see "5065", you can't
receive calls.
Following are screenshots of the various tabs of my working configuration:







This may not be a simple
solution, but it sure is elegant.
If this solution
helps you or if you have any useful feedback, please email me at jtoomey@wansend.com.
Jerry Toomey