NOTE: PLEASE READ THIS ENTIRE DOCUMENT BEFORE ENTERING THE URL LISTED BELOW INTO YOUR DEVICE. THIS URL WILL OVERWRITE SETTINGS THAT ARE ALREADY PRESENT AND THE SETTINGS IT WILL CHANGE ARE CLEARLY LISTED BELOW. I ACCEPT NO RESPONSIBILITY FOR ANY LOSSES (SUCH AS YOUR OWN TIME) THAT MAY OCCUR AS A RESULT OF USING THIS CONFIGURATION FILE. THESE SETTINGS WILL NOT DAMAGE YOUR HARDWARE BUT COULD RESULT IN THE INABILITY TO DIAL SOME NUMBERS IF THE DIALPLAN DOES NOT MATCH YOUR CURRENT ONE.
INSTRUCTIONS ON HOW TO REMOVE THIS CONFIGURATION ARE AT THE BOTTOM OF THIS POST.
If you're using a VoIP provider there is a good chance you may well have a Linksys IP phone or Analogue Telephone Adapter (ATA). The Linksys 92x/94x series of IP phone, SPA2102 and 3102, and older SPA3000 and PAP2 ATA's are a very popular choice due to their great performance and reasonable pricing.
If you live in New Zealand and are using one of these are a handful of configuration changes that need to be made to configure the device to New Zealand telephone standards and to ensure that the tones heard match those from PSTN providers such as Telecom, TelstraClear, Orcon and Vodafone who all use the same tones which are specified in Telecom's Telepermit specifications. If you fail to correctly set some other settings such as the FXS impedance on your device you risk echo on your calls due to an impedance mismatch with your analogue phone, likewise if you set the incorrect impedance on the FXO port on a SPA3102 or SPA3000 you will also risk echo due an impedance mismatch with the PSTN line. Ideally you'll also want a correct dialplan that allows calls to connect immediately after you dial the number, and not have to wait several seconds for this to happen.
At present WorldxChange are the only VoIP provider in New Zealand to offer a full autoprovisiong service for their customers. If you sign up to their VFX or DVX service you can enter a URL into your device which will connect to their servers and correctly configure your device with the optimal settings and user settings.
DO NOT USE THIS FILE IF YOU ARE ON VFX or DVX. THERE IS NO NEED AND IT WILL WIPE YOUR CONFIGURATION!
If you're using another provider such as 2talk, iTalk, or a Linksys device on your own IP PBX, you're on your own when it comes to configuring your device. These providers and others provide a list of settings, however many of these are either not correct or not optimal for New Zealand. This leaves people who know nothing about VoIP left to configure their own device, and in many cases making mistakes or using incorrect settings that may result in an inferior quality call, and left blaming VoIP as being an inferior technology when the reality is it's not.
I've been working for several weeks on a New Zealand specific configuration file for Linksys devices, and also hosting this file so that anybody who wants to quickly and easily configure their device can enter a web URL into their device which will download all the correct settings. The only thing required by the end user is to configure their SIP user account details, network settings, and a couple of other optional setting that I'll leave to the end user such as the preferred voice codec. By default your device will check once per week for a new configuration file however this can be easily disabled if you do not want to do this. Instructions on how to change this are at the bottom.
To enable this provisioning file log into your device and click on the Provisioning tab. Into the Profile Rule field enter the following http://voipzone.co.nz/spaconfig.cfg Also check that the Provision Enable is set to Yes and Resync On Reset is also set to Yes
Your device will now reset and download the provisioning file. This can take approximately 30 seconds or so to occur and once it is complete the device will reset again. If you look in the menu options listed below you should now see these updated to reflect the new settings.
A list of all settings in my file is listed here. This file could change in the future if any updates are needed and because it's a XML file rather than a LInksys compiled configuration file you can view the contents of the file at any time from a web browser by entering the URL above.
CONTENTS OF THIS PROVISIONING FILE
<!-- Linksys SPAxxx Config File with NZ specific indications and setup (C)2010 Steven Biddle email@example.com ->
<Call_Return_Code ua="na"> </Call_Return_Code>
<Blind_Transfer_Code ua="na"> </Blind_Transfer_Code>
<Call_Back_Act_Code ua="na"> </Call_Back_Act_Code>
<Call_Redial_Code ua="na"> </Call_Redial_Code>
<Call_Back_Busy_Act_Code ua="na"> </Call_Back_Busy_Act_Code>
<Cfwd_All_Act_Code ua="na"> </Cfwd_All_Act_Code>
<Cfwd_All_Deact_Code ua="na"> </Cfwd_All_Deact_Code>
<Cfwd_Busy_Act_Code ua="na"> </Cfwd_Busy_Act_Code>
<Cfwd_Busy_Deact_Code ua="na"> </Cfwd_Busy_Deact_Code>
<Cfwd_No_Ans_Act_Code ua="na"> </Cfwd_No_Ans_Act_Code>
<Cfwd_No_Ans_Deact_Code ua="na"> </Cfwd_No_Ans_Deact_Code>
<Cfwd_Last_Act_Code ua="na"> </Cfwd_Last_Act_Code>
<Cfwd_Last_Deact_Code ua="na"> </Cfwd_Last_Deact_Code>
<Accept_Last_Act_Code ua="na"> </Accept_Last_Act_Code>
<Accept_Last_Deact_Code ua="na"> </Accept_Last_Deact_Code>
<Block_Last_Act_Code ua="na"> </Block_Last_Act_Code>
<Block_Last_Deact_Code ua="na"> </Block_Last_Deact_Code>
<CW_Act_Code ua="na"> </CW_Act_Code>
<CW_Deact_Code ua="na"> </CW_Deact_Code>
<CW_Per_Call_Act_Code ua="na"> </CW_Per_Call_Act_Code>
<CW_Per_Call_Deact_Code ua="na"> </CW_Per_Call_Deact_Code>
<Block_CID_Act_Code ua="na"> </Block_CID_Act_Code>
<Block_CID_Deact_Code ua="na"> </Block_CID_Deact_Code>
<Block_CID_Per_Call_Act_Code ua="na"> </Block_CID_Per_Call_Act_Code>
<Block_CID_Per_Call_Deact_Code ua="na"> </Block_CID_Per_Call_Deact_Code>
<Block_ANC_Act_Code ua="na"> </Block_ANC_Act_Code>
<Block_ANC_Deact_Code ua="na"> </Block_ANC_Deact_Code>
<DND_Act_Code ua="na"> </DND_Act_Code>
<DND_Deact_Code ua="na"> </DND_Deact_Code>
<Secure_All_Call_Act_Code ua="na"> </Secure_All_Call_Act_Code>
<Secure_No_Call_Act_Code ua="na"> </Secure_No_Call_Act_Code>
<Secure_One_Call_Act_Code ua="na"> </Secure_One_Call_Act_Code>
<Secure_One_Call_Deact_Code ua="na"> </Secure_One_Call_Deact_Code>
<Paging_Code ua="na"> </Paging_Code>
<Call_Park_Code ua="na"> </Call_Park_Code>
<Call_Pickup_Code ua="na"> </Call_Pickup_Code>
<Call_UnPark_Code ua="na"> </Call_UnPark_Code>
<Group_Call_Pickup_Code ua="na"> </Group_Call_Pickup_Code>
<Media_Loopback_Code ua="na"> </Media_Loopback_Code>
<Referral_Services_Codes ua="na"> </Referral_Services_Codes>
<CID_Act_Code ua="na"> </CID_Act_Code>
<CID_Deact_Code ua="na"> </CID_Deact_Code>
<CWCID_Act_Code ua="na"> </CWCID_Act_Code>
<CWCID_Deact_Code ua="na"> </CWCID_Deact_Code>
<Dist_Ring_Act_Code ua="na"> </Dist_Ring_Act_Code>
<Dist_Ring_Deact_Code ua="na"> </Dist_Ring_Deact_Code>
<Speed_Dial_Act_Code ua="na"> </Speed_Dial_Act_Code>
<Modem_Line_Toggle_Code ua="na"> </Modem_Line_Toggle_Code>
<Ring5_Cadence ua="na"> </Ring5_Cadence>
<Ring6_Cadence ua="na"> </Ring6_Cadence>
<Ring7_Cadence ua="na"> </Ring7_Cadence>
<Ring8_Cadence ua="na"> </Ring8_Cadence>
A BRIEF RUNDOWN OF THE SETTINGS
RESYNC PERIODIC = time of 604800 which is 7 days. The device will check every 7 days (or on reset) for a new configuration.
NTP/Time settings = Use nz.pool.ntp.org as a time server. Also correctly configure NZ DST settings. Because of a bug in earlier Linksys firmware not being able to handle DST in the Southern Hemisphere starting in a different year to the end date we reverse things and use GMT+13 as the normal time during DST and deduct 1hr from April to September.
All service activation codes have been disabled to stop them clashing with codes your VoIP provider or PBX may use. Depending on your setup you may wish to set some of these again. For example if you use an ATA you will not get the correct Call Forward dialtone with DND/CallFwd enabled if you do not map these to your VoIP provider or PBX as the ATA has no idea about these codes. This is not needed with an IP phone as the DND/Cfwd is managed via SIP messages.
All tones have been set to the NZ standard as defined by Telecom's TNA102 specifications. The only exception to this is the Reorder tone which is technically incorrect but these devices use this tone differently to normal POTS phones. All tones have been set to -15dB which is slightly louder than the -19dB Linksys default settings (I'm open to discussion as to whether this is too loud or too quiet, I personally think it's about right). Distinctive Ring cadences have also been set to the Telepermit specifications.
RTP packet size has been set to 20ms and both FXO and FXS line impedance has been set to the correct 370+620||310nF that is used here in NZ (and is clearly documented in the Telepermit specifications).
Some new firmware releases from Linksys do not support this setting. If this option is not available the safest option to use is 600 Ohm.
And now to look at the dialplan. This will pattern match virtually every number that the normal person will need to call. I've detailed the number ranges below and how they are matched. While I've put a lot of effort into this there is a chance that some errors may exist or there could be service numbers or calling card access numbers that I have missed. Any feedback on these is appreciated.
# = Asterisk/FreePBX directory
*xx = Asterisk/FreePBX shortcodes
*0xx.= Linksys codec selection. Also pattern matches *0 for Epygi Quadro Voicemail access
[2-9]xxxxxx = local calls
xxxS1 = local 3 digit PBX extns with short timeout as well as 3 digit emergency and service codes 111, 123 etc
0210xxxxxxx = 0210 + 8 digits
0212xxxxxx = 0212 + 7 digits
021[3-9]xxxxx = 0213 - 0219 + 6 digits
02xxxxxxx = 020 + 022 + 027 + 029 + 7 digits
0240xxxxxx = 0240 + 6 digits
024[1-9]xxxxxxx = 0241 - 0249 + 7 digits
028xxxxxx = 0280 + 0281 + 0283 + 0284 + 0285 + 0286 + 0287 + 7 digits
028xxxxxxx = 0282 + 0288 + 0289 + 8 digits
026[1-3]xxxxx = 0261 + 0262 + 0263 + 6 digits
0264xxxxxx = 0264 + 7 digits
0[0-9]xxxxxx = all 03 + 04 + 06 + 07 + 09 toll calls as well as 0900
0508xxxxxx = 0508
070xxxxxxx = 070 personal numbers. Allocated for use but not currently in use. Possible that shortly they may be available.
080[1-8]xxxxxx = 0800 + 0800 - 0808 as defined by NAD guidelines but not currently used
1xxx = service codes mainly Telecom
08[2-3]xxx = 082210 and 083210 for voicemail on WxC and Telecom and Telecom's 083030, 083032 and 083033 conferencing
01681x. = Telecom's USA toll free service for calling North American toll free 800 numbers
083201234 = recorded message number you are calling from
014xx = calling card platform
015xxx = calling card platform
017 = 0170 and 0172 for international directories
00x. = international calls
In trying to create a dialplan that can be used across both standalone phones and phones connected to a PBX there is one small issue I am aware of that is not possible (at least that I can work out!) to resolve. To try and pattern match local 3 digit PBX extensions as well as local 7 digit numbers means using a small delay (S1) after the phone detects 3 digits. If you are dialling a 7 digit local number and pause for too long after the 3rd digit you will find that the call is pattern matched as a 3 digit local number.
OPTIONAL SECURITY SETTING
VoIP "hacking" is becoming a real risk these days and if you have an insecure VoIP device you are leaving yourself wide open to possible fraud. Do not under any circumstances port forward the web interface for your IP phone or ATA so it's accessible from the web. This is about as secure to leaving your front door wide open!
From VoIP security perspective inbound URI calling also poses security risks that end users need to be aware of. URI calling is the ability to call another SIP device directly over the internet without the call going via a VoIP provider or PSTN. If you have a Linksys ATA at home on your internet connection somebody else using a VoIP device can call you directly by dialling the SIP URI firstname.lastname@example.org, ie email@example.com
There have been numerous cases lately of SIP trojans actively scanning devices looking for valid user accounts. Once it detects a SIP device on port 5060 it repeatedly tries usernames until it finds the correct one. I recommend that you set "'AUTH INVITE" to 'YES' in your Linksys device configuration. This will only allow a SIP invite message from an authorised SIP peer (ie your VoIP provider). This setting will disable the ability to accept inbound SIP URI calls so if you need this ability do not change this setting.
EDIT: It seems this setting may disable inbound calls on iTalk and 2talk. If you are using iTalk or 2talk leave this setting set to 'no'. Another option which exists only in the ATA devices called 'Restrict Source IP' that will lock down inbound SIP traffic to the IP of your SIP proxy server. Setting this to 'yes' will perform a similar job.
HOW TO REMOVE OR DISABLE THESE SETTINGS
As mentioned above entering this provisioning URL this file will cause the device to attempt to reprovision itself once every 7 days to get an updated configuration file. If you want to disable this feature set the "Provision Enable" setting show in the web interface menu above to "NO". If you are going to change any of the settings listed above such as the Service Activation Codes it's important that you change this setting to "NO". If you fail to do this your changes will be deleted every week when the device checks for a new configuration file.
If you are uncertain about proceeding with this URL I recommend taking a snapshot of your current settings, in particular your dialplan before proceeding. This file will only change the settings listed above, it will not change any other settings in your device such as network or SIP user settings. If you are unhappy with the results you can return to your existing configuration by disabling the Provision Enable setting as detailed in the paragraph above, removing the provisioning URL, and manually entering your settings again.
I've been using Linksys devices for many years but only recently decided to publish this information because the number of poorly configured devices and misinformation about NZ configurations got the better of me! I'm open to any feedback or comments about this project and am very interested in comment about the dialplan settings. It is possible this setting may stop you being able to dial some numbers and some PBX's may use different codes that I have not included. Please let me know about any issues so I can attempt to resolve them.
I have also developed a modified trixbox Linksys autoprovisioning tool that will help those who are using Asterisk, trixbox or Elastix and want to correctly configure their Linksys devices with their PBX. For help with this or to suggest improvements my contact details are listed in the right.
PS: Thanks also has to go to Mike Beattie who helped test the dialplan settings.
PPS: If you are going to include these settings on your site some link love to my post and acknowledgement would be appreciated.
Other related posts:
Polycom IP Phone New Zealand time and tone settings
Sangoma Roadshow heads to New Zealand in September
Obihai OBi 200 Analogue Telephone Adapter (ATA) Review
comments powered by Disqus