Grandstream provisioning

So Jeff, our senior guru, recently finished adding a feature for automated provisioning of Grandstream phones and ATA devices. Here’s a quick look.

You’ll need a working Java runtime (JRE), the Grandstream Linux configuration tool, and a configuration template (or templates) for your specific phone(s) and/or ATA model(s). Unpack the configuration tool tarball (GS_CFG_GEN.tar.gz). It isn’t necessary to edit encode.sh; you’ll be able to set JAVA_HOME and GAPSLITE_HOME in the Freeside interface.

Right now you’ll also need a Freeside 1.9 or 2.1 snapshot from March 5th or later (or the upcoming 1.9.2 release – more on that soon).

Lastly, you need a TFTP server to boot/reconfigure your device(s) from the resulting configuration file (without a TFTP server, you can still test generation of the configuration file).

First (well, after you have Freeside setup or upgraded), go to Configuration -> Provisioning and services -> Exports. Add a new export, and select “grandstream – Provision phone numbers to Grandstream Networks phones/ATAs” from the dropdown. A number of Grandstream-specific settings will appear.

Set “Export host” to the hostname or IP address of your TFTP server (if you don’t have one yet, set this to an arbitrary value). Verify or set the java path and the path to the Grandstream configuration tool. Patse the configuration template for your device in the “Configuration template” textarea, and edit the settings for your environment (i.e. replace “P47 = sip.mycompany.com” with your SIP server, etc.).

If you have a TFTP server ready, turn on the “Enable upload to TFTP server via SSH” checkbox (if not, you can set this up later and skip to the next step). Enter a username and directory. You’ll need to setup SSH keys for that username.

All right, you’re done with the export setup. Click the “Add export” button at the bottom if you haven’t already and make sure there were no errors. Next, you need to associate the newly-added export with one or more devices. Under Configuration -> Phone -> View/Edit phone device types, add or edit a device corresponding to the template you used in the export. In the Exports section, check the box next to your newly-added export.

Okay, you’re ready to try it out now! Add a test customer and order a package with a phone serivce, or view an existing test phone service. (Setting things up from scratch? You’ll need to setup VoIP first. You can skip the rate plans and CDRs for now if you just want to see the Grandstream stuff.)

From the view page of the svc_phone service, you’ll see a Devices section at the bottom. Add a device of the type you added above and enter the MAC address. You’ll see the device is now listed in the Devices section, and there is a “Phone config” link. Click on the “Phone config” link to test the provisioning. If everything works, you should be prompted to download a binary file to configure the devices. If you setup a TFTP server, the config file is copied over to the TFTP server for you to boot and reconfigure the device.

Hope this is useful for folks out there using Grandstream devices.

– Ivan

Leave a Reply