Review of Atcom AG-188N IAX+SIP ATA (VoIP adapter) – Part 7 – Addendum

Although I have technically finished up the series on the Atcom AG-188N (sold in North America by CIGear), I wanted to open a post to answer any questions or comments that may arise.

One thing that came up in another thread was that I didn’t say much about how the AG-188N unit can be remotely provisioned by a service provider. That’s because I was primarily writing the review from the end user’s point of view. I’m not a provider, and I guess I assumed that any provider that would be purchasing these units in quantity would be talking to the manufacturer or the distributor with questions about provisioning. I can tell you that there is a page explicitly for setting up provisioning, which looks like this:

Atcom AG-188N Auto Provisioning Configuration screen

Atcom AG-188N Auto Provisioning Configuration screen

Here’s what the fields contain:

  • Current Version —  the current version number is displayed
  • Server Address — FTP/TFTP server address
  • Username — FTP server user name
  • Password — FTP server password
  • Config File Name — The name of configuration file
  • Config Encrypt Key — The encrypt key of configuration file
  • Protocol Type — The protocol type used for upgrading — choices are FTP, TFTP, or HTTP
  • Update Interval Time — The AG-188N  will check for a new configuration file at the specified interval
  • Update Mode — auto provision mode — choices are:
    • Disable — Will not auto-update
    • Update after reboot — Will auto update after a reboot
    • Update at time interval — Will auto update at the specified interval

The normal way you’d use this is that you’d first create a “master” settings file by making a backup of the settings from one AG-188N that has been configured the way you want it (that is, with whatever “default” settings you want all users to have).  You’d use “Backup Config” to save this as a plain text file.  You can then open this file in any plain text editor (but use one that preserves the existing line endings, or you may have issues when you attempt to re-upload it). Note the first line of the default file contains this line:

<<VOIP CONFIG FILE>>Version:2.0001

When you change the  configuration file, you should bump the version number — presumably that’s how the unit would know there’s a new version. Then, for each unit, you’d customize the file (changing the values that are unique to each extension), and then save the file to your server with a unique filename and the .cfg extension.  For example, if you had an extension 200, you might name the edited file 200.cfg, and make sure that filename also is placed in the “Config File Name” field in the configuration file itself. You could upload the customized configuration file to the device the first time by using the Web Update page on the AG-188, or if the unit had already been sent to a customer site, you could send them an e-mail with the settings to enter on the above page.

The question was asked, is there a nice configuration tool such as is supplied for some other adapters?  Not to my knowledge, but if you look at the actual format of a configuration file, you’ll realize how easy it would be for any competent programmer to create such a tool. As an example, here’s a sample IAX2 configuration section from the file:

<IAX2 CONFIG MODULE>
Server   Address   :myserver.dyndns.com
Server   Port      :4569
User     Name      :200
User     Password  :securepassword
User     Number    :200
Voice    Number    :
Voice    Text      :
EchoTest Number    :
EchoTest Text      :
Local    Port      :4569
Enable   Register  :1
Refresh  Time      :60
Enable   G.729     :0

All you would need to do is do a search-and-replace on each line in the file — find the values that need to be unique for each extension and then change them.  You could do this using a Bash or Perl or PHP script, or probably any of a number of other scripting languages (you could even do it in BASIC, if that’s the language you’re most comfortable using).  Or you could get fancy and build a database of settings for each extension, allowing you to change values globally (for example, if changing a server name) or for one extension or a group of extensions. If you do that, and you don’t mind sharing it, please post a link in the comments, because I’m sure there would probably be others who would appreciate such a tool.

I know someone will ask, “How do I use the Config Encrypt Key?” And my answer to that is, doggone if I know, but if encrypting the file is that important to you, you’re probably going to be buying in sufficient quantity that you will be talking directly with the distributor and/or the manufacturer, so ask them.  As I said, I wrote this series primarily for end users, and while some end users may want to be able to auto-provision their devices (and there is even some talk of a provisioning tool or module possibly coming in a future version of FreePBX), there are few that would actually need the configuration file to be encrypted, provided that all users are internal and that your FTP or TFTP server (the one used to serve configuration files) is not accessible from the Internet.

Of course, if you have remote users, then you may be concerned about having them FTP or TFTP a plain text configuration file that shows their SIP and/or IAX user name(s) and password(s) with no encryption whatsoever — and if you are not concerned, you probably should be!  For those users, I think I’d at least compress the file with a password (using ZIP or some other format that allows password protection of files), then e-mail the compressed file to the customer, and then use some other medium (such as phone or fax) to get the file password to them.  They can then uncompress the file, and use the Web Update page on the AG-188N to get the .cfg file into their AG-188N.  I realize that’s not very convenient, so if I ever find out how the Config Encrypt Key is implemented, I’ll definitely edit this post to show the information.

Setting up a dial prefix for local calls

Reader Bill asked the following:

I have a couple of the 188N and been trying to get it to prefix 1916 my provider requires all local calls to have a the prefix of your area code to dial local numbers. So far I am failing in how to get this to work.

Can someone point me in the right direction?

Actually, it’s easy, but slightly non-intuitive. In the left-hand menu click on Dial-Peer – again, I know it looks like it’s not a clickable link, but it is. That will bring up the Dial-Peer page, as shown in Part 3 of this series. Now, click the Add button, and you should see this dialog:

Atcom AG-188N Dial-Peer screen: Add rule

Atcom AG-188N Dial-Peer screen: Add rule

You need only fill in the three fields shown here. The Phone Number field contains the pattern for a seven digit call — [2-9]xxxxxx (don’t add a trailing T in this case because you want it to match only if exactly seven digits are dialed). The Call Mode should match the mode you normally use for outgoing calls – I used IAX2 in this example but if you normally use SIP then select that.  In the Alias field, I entered the modification that Bill wants to make to seven-digit numbers — add:1916 to add the leading 1 plus 916 area code. Enter those values, click Submit, then click on Save Config and you should be all set.

There are actually four different keywords you can use at the start of an alias:

add: As shown here, add is used to add a prefix to the phone number, so (as in this example) you don’t have to dial leading prefix digits on local calls.
all: Replaces the number dialed with the number following the all keyword – this is how you can make a speed dial code.
del: Deletes the first N numbers. N is set in the Delete Length field.
rep: Replaces the first N numbers. N is set in the Delete Length field. Typical example: You’re in a country where the international dialing prefix code is 011 but you are using a carrier that expects you to send 00, followed by country code and number.  In the Phone Number field you’d put 011T, then in the Alias field you’d put rep:00, and set the Delete Length to 3. Whenever a user dials a number starting with 011, it will then be changed to 00.

The use of the Dial-Peer page is explained more fully in the AG-188N manual, in the section How to use the dial rule? near the back of the manual.

As I said, this post is intended to be open-ended, in case any other questions or comments about the AG-188N require a response. So if you are interested in this device, you might want to check back from time to time, to see if anything else has been posted.

Disclosure: CIGear provided me with an Atcom AG-188N for review purposes, and allowed me to keep it after I was finished writing this series, and for that I am most grateful.

Previous Installment

Articles in the series: Review of Atcom AG-188N IAX+SIP ATA (VoIP adapter)

Part 1 – The unboxing
Part 2 – Initial setup using IAX
Part 3 – Setting the time and configuring outbound dialing
Part 4 – Setting up SIP, and securing the adapter
Part 5 – Networking and Internal Router
Part 6 – Final Thoughts and Summary Review
Part 7 – Addendum

2 Comments »

  1. Since you mention not thinking of provisioning because you were looking at it from an end-user perspective, provisioning is often an end-user issue in the case where the end user is a small/medium business running their own Asterisk server. Once I get more than 20 or 30 extensions out there, it’s darn convenient to be able to change the settings for a specific phone right on your Asterisk box and have the phones and ATA adapters pick it up next time they reboot (and in a lot of cases, Asterisk can tell them to reload their config).

    Heck, even at home, where I have 4 total telephones in the house, I use provisioning from the asterisk server to load all the phones. It’s just a nice convenience to not have to mess with the web interface on all of the phones to set things up. :)

    I’m probably a bit of a geek, too, though. :)

  2. joseph said

    This unit would be the perfect one if it only PSTN line function as an FXO line (similar like in Sipura). With the current settings it is still usable but only to home user not for business use as the unit is limited by PSTN line function.

RSS feed for comments on this post · TrackBack URI

Leave a Comment