VOIP from scratch IV – setup and customization

Now that we know what VOIP is and the hardware and the provider have been chosen, what's left is to do some finer configuration of our service and start VOIP-ing!

Though you can start faster with a softphone, if you are to truly replace your regular landline Bell service with VOIP, you need to set up your ATA.

Setting up your ATA

Your provider is most likely providing personalized settings for your device. Some providers, like CanadaPhoneLine, demand a fee for SIP settings. I have copied and pasted a sanitized version below of my own settings, after a forum post. Show my personal settings (encrypted).

Step 1

The first step is to find out what IP Address your adapter is currently using. To do this, pick a phone connected on Line 1 and do the following:
Dial: **** (That is 4 asterisks)
Once this is done, dial: 110# (110 followed by a square)
The system should now playback the IP Address your device has been assigned.
(Example: 192.168.1.2)

Step 2

Using your favourite web browser from a computer on the same network, point the address to the IP address of your adapter.
(example »192.168.1.2) Replace 192.168.1.2 by the IP Address your device is currently using.

Step 3

You should now see the web interface of your Linksys/Sipura.
click on the link "Admin", and once the page has reloaded, click again on the link "Advanced View".

Step 4

Under the LINE 1 Tab, Find the following fields and fill them with the following information
Proxy: toronto.voip.ms
Display Name: Enter your full name or company name
User ID: REMOVED
Password: forgot
Register Expires: 3600
Nat Keep Alive: Yes
Nat Mapping/Traversal: Yes

Step 5 (Optional)

Optionally, To save bandwidth, you can change Line 1 "Preferred Codec" to G729a and make sure "Use Pref Codec Only" is set to no.

Step 6 (Optional)

Optionally, you can configure your adapter with a better dial plan, allowing faster dialling of 10 digits number (Local US/Canada) and also enable 7 digits dialling in one area code of your choice.
At the bottom of Line 1 TAB, you will find a field called Dial Plan
Replace the 416 digits in the following line by the area code of your choice and copy the line, including parenthesis, in the Dialplan field in Line 1 Tab at the bottom of the page:

(<:1416>[2-9]xxxxxx|1[2-9]xx[2-9]xxxxxxS0|[2-9]xx[2-9]xxxxxxS0|*xx|*xx.|[34689]11|822|4443|4747|0|00|[2-9]xxxxxx|1[2-9]xx[2-9]xxxxxxS0|4XXX|xxxxxxxxxxxx.)

If you have forgotten your PAP2TN password, you can reset it as such:

  1. Dial from the telephone attached with device PAP2T  ( **** ) four stars
  2. Now dial     73738#   and then press   1  to confirm to factory reset.
  3. The device will give you buzz sound for reset.
  4. Start programming from the beginning.

Choosing a server

If you can choose from several servers, you would normally choose the one geographically closest. Sometimes however, that server is servicing far too many clients resulting in relative poor performance. In that situation, you might want to run a series of pings, which should provide information on latency.

C:\>ping sip.us4.voip.ms

Pinging sip.us4.voip.ms [74.63.41.218] with 32 bytes of data:

Reply from 74.63.41.218: bytes=32 time=69ms TTL=52
Request timed out.
Reply from 74.63.41.218: bytes=32 time=57ms TTL=52
Reply from 74.63.41.218: bytes=32 time=52ms TTL=52

Ping statistics for 74.63.41.218:
    Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
    Minimum = 52ms, Maximum = 69ms, Average = 59ms

C:\>ping sip.ca1.voip.ms

Pinging sip.ca1.voip.ms [67.205.74.164] with 32 bytes of data:

Reply from 67.205.74.164: bytes=32 time=103ms TTL=54
Reply from 67.205.74.164: bytes=32 time=39ms TTL=54
Reply from 67.205.74.164: bytes=32 time=37ms TTL=54
Reply from 67.205.74.164: bytes=32 time=38ms TTL=54

Ping statistics for 67.205.74.164:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 37ms, Maximum = 103ms, Average = 54ms

C:\>ping toronto.voip.ms

Pinging toronto.voip.ms [174.137.63.202] with 32 bytes of data:

Reply from 174.137.63.202: bytes=32 time=116ms TTL=53
Reply from 174.137.63.202: bytes=32 time=33ms TTL=53
Reply from 174.137.63.202: bytes=32 time=33ms TTL=53
Reply from 174.137.63.202: bytes=32 time=33ms TTL=53

Ping statistics for 174.137.63.202:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 33ms, Maximum = 116ms, Average = 53ms

C:\>ping sip.ca1.voip.ms

Pinging sip.ca1.voip.ms [67.205.74.164] with 32 bytes of data:

Reply from 67.205.74.164: bytes=32 time=36ms TTL=54
Reply from 67.205.74.164: bytes=32 time=34ms TTL=54
Reply from 67.205.74.164: bytes=32 time=45ms TTL=54
Reply from 67.205.74.164: bytes=32 time=37ms TTL=54

Ping statistics for 67.205.74.164:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 34ms, Maximum = 45ms, Average = 38ms

C:\>ping toronto.voip.ms

Pinging toronto.voip.ms [174.137.63.202] with 32 bytes of data:

Reply from 174.137.63.202: bytes=32 time=136ms TTL=53
Reply from 174.137.63.202: bytes=32 time=86ms TTL=53
Reply from 174.137.63.202: bytes=32 time=27ms TTL=53
Reply from 174.137.63.202: bytes=32 time=36ms TTL=53

Ping statistics for 174.137.63.202:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 27ms, Maximum = 136ms, Average = 71ms

C:\>ping sip.ca1.voip.ms

Pinging sip.ca1.voip.ms [67.205.74.164] with 32 bytes of data:

Reply from 67.205.74.164: bytes=32 time=36ms TTL=54
Reply from 67.205.74.164: bytes=32 time=39ms TTL=54
Reply from 67.205.74.164: bytes=32 time=39ms TTL=54
Reply from 67.205.74.164: bytes=32 time=32ms TTL=54

Ping statistics for 67.205.74.164:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 32ms, Maximum = 39ms, Average = 36ms

C:\>ping toronto.voip.ms

Pinging toronto.voip.ms [174.137.63.202] with 32 bytes of data:

Reply from 174.137.63.202: bytes=32 time=34ms TTL=53
Request timed out.
Reply from 174.137.63.202: bytes=32 time=46ms TTL=53
Reply from 174.137.63.202: bytes=32 time=36ms TTL=53

Ping statistics for 174.137.63.202:
    Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
    Minimum = 34ms, Maximum = 46ms, Average = 38ms

C:\>ping montreal.voip.ms

Pinging montreal.voip.ms [67.205.74.164] with 32 bytes of data:

Reply from 67.205.74.164: bytes=32 time=48ms TTL=54
Reply from 67.205.74.164: bytes=32 time=36ms TTL=54
Reply from 67.205.74.164: bytes=32 time=38ms TTL=54
Reply from 67.205.74.164: bytes=32 time=42ms TTL=54

Ping statistics for 67.205.74.164:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 36ms, Maximum = 48ms, Average = 41ms

C:\>ping toronto.voip.ms

Pinging toronto.voip.ms [174.137.63.202] with 32 bytes of data:

Reply from 174.137.63.202: bytes=32 time=34ms TTL=53
Reply from 174.137.63.202: bytes=32 time=45ms TTL=53
Reply from 174.137.63.202: bytes=32 time=34ms TTL=53
Reply from 174.137.63.202: bytes=32 time=33ms TTL=53

Ping statistics for 174.137.63.202:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 33ms, Maximum = 45ms, Average = 36ms

C:\>ping montreal.voip.ms

Pinging montreal.voip.ms [67.205.74.164] with 32 bytes of data:

Reply from 67.205.74.164: bytes=32 time=37ms TTL=54
Reply from 67.205.74.164: bytes=32 time=38ms TTL=54
Reply from 67.205.74.164: bytes=32 time=38ms TTL=54
Reply from 67.205.74.164: bytes=32 time=40ms TTL=54

Ping statistics for 67.205.74.164:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 37ms, Maximum = 40ms, Average = 38ms

C:\>ping toronto.voip.ms

Pinging toronto.voip.ms [174.137.63.202] with 32 bytes of data:

Request timed out.
Reply from 174.137.63.202: bytes=32 time=29ms TTL=53
Request timed out.
Reply from 174.137.63.202: bytes=32 time=31ms TTL=53

Ping statistics for 174.137.63.202:
    Packets: Sent = 4, Received = 2, Lost = 2 (50% loss),
Approximate round trip times in milli-seconds:
    Minimum = 29ms, Maximum = 31ms, Average = 30ms

As expected, the geographically closest server has the lowest latency.

My first charges

I initially made a $25 deposit and was charged as follows:

  • charged to cc 26.25 (incl 1.25 tax)
  • $0.50
  • $1.49
  • Total Setup: $0.50
  • Total Monthly Fee: $1.49
  • Grand Total: $1.99

They also charge $3.0 for the first month of Enhanced 911 – but unlike other providers, it is optional. There is a $0.0125 charge for CNAME lookups on incoming calls without CID (mostly from USA) but this is also optional. The unlimited incoming calls plan, available only on residential accounts, costs between $5-7, depending on your area code. Other providers may have different plans, but whenever you hear “unlimited”, even though the amounts sound minimal, you may end up paying more than if you were to pay per use in 6s increments.

Charges might vary in time with promotions, etc. If paying by PayPal, consider that they also charge transaction fees of around 3% + $0.30 fixed amount. See a calculator in the links below – though most of the time the fees are absorbed by the provider (payee).

Further customization

Most of the following tips come courtesy of Mango / TOAO (see the link below). I did not find a need to configure my adapter for most of them, but you might. Most of these settings may only be set using the Advanced Administrator login. To access this, navigate to http://[PAP2T_IP_address]/admin/advanced.

  • Specific numbers, as identified by Caller ID, can be forwarded to specific destinations. For instance, you can route telemarketing calls or annoying people to a “this number is not in service” message.
  • Calls can be made to another VoIP device without either device even having a VoIP provider, both on your LAN and through the internet absolutely free. You could even configure this to support station-to-station calling for a small office or an IP-based intercom over any distance.
  • Set up special rings for specific callers, so that you can tell who's calling just from the way the phone rings.
  • The PAP2T will talk to a syslog server and send it all kinds of information for ease of troubleshooting. Additionally, one could use this to do fancy things such as search for a customer's record based on their phone number, and have it appear on an agent's screen.

Important technical settings

In the SIP tab, you may wish to set Reg Retry Long Intvl to 120 so that your device recovers quickly if it fails registration.

The default RTP Packet Size is 0.03. For the most popular codecs, G.711 and G.729, the optimal setting is 0.02. (0.01 results in even less latency at the expense of using extra bandwidth, IF your provider supports it.) The default setting of 0.03 will likely cause very choppy voice with G.729 and slightly choppy voice with G.711.

On the Provisioning tab, we set Provision Enable to No as we wanted to manage the settings of our VoIP device ourselves, rather than having our provider do it.
Next, we move to the Regional tab to configure the PAP2T to properly match our region. You may want to set the Dial Tone to 350@-19,440@-19;20(*/0/1+2) so that the user has 20 seconds with which to begin dialling instead of the default of 10.

Ringing

The PAP2T we received shipped without a North American ring. We were able to achieve a "normal-sounding" ring by setting the Ring1 Cadence to 60(2/4), the Ring Waveform to Sinusoid, and the Ring Frequency to 20. We're told that these settings are standard Bellcore settings, though we've also had reports of specific telephones that respond better to a Trapezoid Ring Waveform. Try Sinusoid first, and if your phone doesn't ring properly or you have Caller ID issues, try Trapezoid instead. You may also need to set the Ring Voltage to 90.

Quick call shutdown

You may want to set the CPC delay to 10 and the CPC duration to 0.5. With the default settings, our phones had to be on the hook for an inordinate amount of time before it would actually end the call.

DST and Time

Set an NTP server so that the date and time is always correct with 1.pool.ntp.org and 2.pool.ntp.org.

Because of the new North American Daylight Saving Time rules, PAP2Ts by default calculate DST incorrectly. Also on the Regional tab, set your Daylight Saving Time Rule to start=3/8/7/2:00;end=11/1/7/2:00;save=1 and your time zone appropriately for your region. (Trivia: 3/8/7/2:00 translates literally to "The Sunday that is on or after March 8th at 2AM." The second parameter is commonly misunderstood as the week, however this is not correct.)

No echo

The default gain on the PAP2T is typically too high and can cause echo. We adjusted the FXS Port Input Gain and FXS Port Output Gain, one at a time, in increments of three. We found that -1 and -11 eliminates echo entirely and produces appropriate conversation volume. However, we've had reports from people who have used these settings and found the volume too quiet. You may need to play with these until they suit you.

NAT

Let's move on to the Line tab. As we planned to place our device behind a router, we turned on NAT Mapping and NAT Keep Alive.

Weird – proxy IP instead of hostname

We like to configure the Proxy to the IP address of our VoIP provider's server instead of the hostname. This is because there is a little-known DNS bug with Sipura / Linksys / Cisco devices. If the hostname is used, occasionally a DNS lookup will fail for no reason and the user will hear a reorder tone. It may do this several times in a row, and then return to normal. The only way we know of to avoid this issue is to use the IP address instead of the hostname. There are some situations where this solution does not work however. If your VoIP provider has multiple IPs for the hostname they provide to you, you should use the hostname. To find out if this is the case, use nslookup. (Example with multiple IPs: nslookup callcentric.com   Examle with single IP: nslookup sip.us3.voip.ms)
We do not yet know if the DNS bug occurs when DNS SRV records are used. If anyone has any definite information, please let us know.

Fallback values

You should also set Register Expires to 300 to avoid "phone doesn't ring" issues. Among other things, this will let your VoIP provider know sooner when your ISP changes your IP address. You can also set Proxy Fallback Intvl to 300. If your VoIP provider's server becomes unreachable and your PAP2T fails over to a backup server, it will retry the primary server again in 300 seconds.

Preferred Codec G.711u

We configured the Preferred Codec to be G.711u because we had the bandwidth available and were very pleased with its quality. (Trivia: Though G.711 is a 64Kbit codec, it actually uses about 90Kbit/sec due to overhead.) We tested a few codecs and have samples available comparing G.711 vs. G.729 and also VoIP sound quality vs. an Analog Phone.

Dial plan

The dial plan that ships with the PAP2T isn't particularly useful. This causes many a forum post that goes something like, "whenever I make a call, it takes ten seconds to start ringing!" Our favourite dial plan is described on the Linksys/Cisco Dial Plan Tips and Tricks page.

Visual Call Waiting setup

The technique for setting up Visual Call Waiting is somewhat involved. Here's how to do it: On the Line tab, be sure that "Call Waiting Serv" is set to "yes". Next, go to the Regional tab. You need to set up four activation codes. If they're already set up, then that's fine, just make a note of them. If there is no code listed, make one up (that is not already in use on that page) and type it in. The four features that require activation codes are: "CW Act Code", "CW Deact Code", "CWCID Act Code", and finally "CWCID Deact Code". Note that these codes must all be different. We used *56, *57, *58, and *59. It doesn't matter what you use as long as you remember it, and as long as the code is not already in use for some other feature. Save your changes and wait for the device to restart. Pick up your telephone and dial your Call Waiting Activation Code. Wait for the dial tone and then dial your Call Waiting Caller ID Activation Code. Visual Call Waiting is now ready for use.

What PAP2T Lacks

So far, we've only found a few features that this device lacks, although one really can't complain when considering the price of the PAP2T. It can't sustain more than one G.729 conversation at one time. But, since we use better quality G.711, (and recommend you do too) that isn't a problem for us. The PAP2T also does not support T.38 for faxing, though faxing may be done over G.711 if one's internet connection is very stable. Note that there are a great deal of references online that say that the PAP2T can in fact sustain two G.729 conversations, and supports T.38. We have no idea where this information came from; we only know that both of ours definitely cannot.
The other feature that this device lacks is the ability to use a backup set of SIP credentials. It would be great to be able to automatically fail over to another provider if one was unreachable. (Edit:We've heard reports of people who have failed over to another server with the same SIP credentials using a special DNS record. If you've tried this, please let us know how well it worked..)

Mango’s (TOAO) conclusion

This is our favourite ATA. We like it even better than other Linksys models that have routers included. We find the performance of these routers to be sub-par. Besides, an ATA such as the PAP2T should work perfectly fine behind a (decent) router without even any port forwarding, as long as your provider is NAT-aware. The only other ATA we might consider is the SPA2102 if you require T.38 support.

Voicemail or IVR

We are all familiar with the good old Voicemail, commercialized by Bell under the name “Call Answer”. Though you can certainly have your own voicemail on your premises, it is preferable to purchase it as a service from your provider, just in case you are somehow completely inaccessible, or if you are getting simultaneous calls while on the phone.

Audacity screen captureTo record a greeting you usually have to login to your voicemail by pressing *97 or *98, then record it in one of the menus. However, if you want a more complex approach, where you give the caller the possibility to call you on other phones as well, or you want to set up your very own calling card (aka DISA), you will need to create an IVR system. For this you need to first design the flow, then create its components, including recording the prompts.

In most cases, the required prompts need to be 22.050 kHz, 16 bit, mono wave (*.wav) files. In Windows, you can use the included Sound Recorder application (see image below for XP). Elsewhere, you can use Audacity which is free and multiplatform. Before exporting your recording, ensure that it conforms to specs.

Another way of obtaining the voice recording wave files is to call your own voicemail and record it as a message, then wait for the system to email the resulting msg#####.wav file to you.

e.g.: SIPdiscount with DLink settings from Deal @ RedFlagDeals

This was posted a long time ago, in 2006, but that service is still available. They offer a number of free destination, but it is unclear how long that could last.

Browse to: 192.168.15.1 for router's admin page
Open Advanced tabs (default login and password: admin)
SIP Configuration tab

Server
Server FQDN: Enabled
IP address: 0.0.0.0
Domain Name: sip1.sipdiscount.com
Port: 5060
Service Domain: __
URL Format: SIP-URL
User Parameter Phone: Enabled
Caller ID Delivery: Yes
Display CID: Enabled
Timer T2: 4sec
Initial Unregister: Enabled
Register Expiration: 3600 sec
Session Expires: 1800 sec
Min-SE: 1800 sec
Session Expires Refresher: uac
Outbound Proxy: enabled
Outbound Proxy IP: 80.239.235.200
Outbound Proxy Port: 5060
G.711a-law 1st 20ms
G.711u-law 2nd 20ms
G.723.1 4th 30ms
G.729a 3rd 10ms
G.726 5th 20ms
STUN Configuration
STUN State: Disabled
- note: I didn't need STUN to traverse my router's NAT as I'm connecting this voip router directly to the net.
No risk here as I'm only connecting a phone to it.
(Most ISP give you a free second IP, all you need is a Hub or Switch to 'split' the network)
- If you need to enter a STUN server on the 1402S, you'll need the IP address of
stun.sipdiscount.com as the data field on this router uses the 4-octet IP number format (same deal for its Outbound Proxy address).
Here's what I would use, if I can figure out how to enable it:
STUN Server IP Address: 213.61.187.150 (ping stun.sipdiscount.com)
STUN Server Port: 3478
STUN ReqInterval: 60 sec
User Agent
Same Phone Number: Enabled
Index: 1
Phone Number: (your login)
Display Name: (your login)
User Agent Port: 5060
Authentication Username: (your login)
Authentication Password: *******
Confirm Password: ******
Plug'N Dial Provision
Plug'N Dial Server Address
Software Update Mode: TFTP
Server FQDN: disabled
Server Address: 0.0.0.0
Domain Name: __
Server port: 69
Update Configuration
Plug'N Dial: disabled
Plug'N Dial: __
Last Update Status __

Setting up X-Ten Lite softphone

Though for most households the best bet is undoubtedly an ATA (see above), there is no reason to stop at that. If the provider allows more than one channel – and most do – you can also connect to your account from a softphone and make outgoing calls regardless of whether the main ATA is used or not. For incoming calls the device to have registered last with SIP will ring first.

The following presentation was inspired by fonosip.

X-Lite SIP configuration

On the X-Ten Lite program. Click on the MENU button (on the right of CLEAR and on the left of the green button)

Select System Settings, SIP Proxy, Default. And enter the following info:

  • Enabled: Yes
  • Display name: Your name
  • Username: (from VoipInterface.net - MyServices) – Auth User as well
  • Password: from MyServices
  • Domain/Realm = SIP Proxy: toronto.voip.ms

Testing the Service

To test the service on fonosip dial 613 for an echo test (A service that test the quality / latency of your connection). Also try 411, 555, 8004, 33091

Troubleshooting

  • If the phone fails to login, please take the time to double check your configuration as above.
  • If everything appears to be correct, the problem may be your firewall
  • If you are running XP, try disabling the built in firewall.
  • If you have an external firewall try opening SIP ports
  • If everything else fails and your router / Firewall supports DMZ, try putting the machine with the softphone on the DMZ; try this last, it’s a bad idea
  • Ports:
    • SIP signalling port (UDP listen) = 5060 RTP/RTCP ports (UDP) = 8000 – 8001
    • RTP/RTCP port (UDP listen) = 10000 - 30000 (depending on your sip phone)

Our interesting codes

You might want to call a few of the testing numbers of your provider and see how that works, before calling real people. The following are known to work with my provider:

1-555-555-0911: Test CallerID and e911 Test

044+Country Code+number: International Premium (override account setting – 033 for Value)
*97 Voicemail (*98 for prompt)
4443: Echo Test (will speak back to you – to test how others hear you)
4747: DTMF Test (to ensure that dial tones are recognized)
311: Non-Emergency Police, Municipal and Other Governmental Services (Canadian Servers)
511: Provision of Weather and Traveler Information Services (Canadian Servers)
811: Non-Urgent Health Teletriage / telehealth Services (Canadian Servers)

If you are one of my customers, you may call me or email me your questions at any time. If not, feel free to ask below!

Sources / More info: cid-spoof, dlink-sipdiscount, NEthing-VOIP, 3pl, audacity-portable

image

Comments

Popular posts from this blog