Koozali.org: home of the SME Server

[Announce] SAIL tftp server and grandstream provisioning

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
[Announce] SAIL tftp server and grandstream provisioning
« on: April 22, 2006, 11:32:52 PM »
Hi,

We've just put SAIL 2.1.11, build 181 onto the ftp server and its got something a bit different in it which we'd like you to try.

181, despite its rather humble release designation, has the base architecture in it to do fully automatic provisioning for your phones and ATA's.

In simple terms this means you can plug the phone in and it will get its identity directly from SARK/SAIL. No more messing about with the myriad phone settings, it will be set up entirely automatically for you (well, almost  - you do have to point the phone at SARK/SAIL but that's all).

To do this, we've implemented a TFTP server in 181. Further, as a first out, we've created an add-on rpm which allows us to automatically provision the popular Grandstream range of phones. That's the BT 101/102 and the GXS2000 units. Next we plan to include Sipura devices, probably followed by Mitel and SNOM.

The outcome is that you only have to fill out one field in the grandstream browser; - the tftp address (which is the address of your SARK/SAIL box). You then create an extension for the phone in SARK/SAIL making sure that you include the mac address of the phone in the mac-id field. Press save and SARK/SAIL will automatically generate the configuration file for the phone and store it onto the TFTP server. Now you just need to reboot the phone and it will be automatically configured with its extension number and all of the correct settings to communicate correctly with SAIL.

Finally, because we've had to incorporate some none-gpl code for the grandstreams, we've had to create a separate add-on rpm.  You will also need to install the base tftp-server (using Yum).  To help you get going we've created a how-to on the docs site which you can find here

http://selintra.com/docs/cgi-bin/view/Main/DocChapter254

We hope you'll have fun with this, we like it a lot.

Kind Regards

Selintra

Offline ldkeen

  • *
  • 403
  • +0/-0
[Announce] SAIL tftp server and grandstream provisioning
« Reply #1 on: April 23, 2006, 02:34:10 PM »
How cool is that. I couldn't wait to D/L it and try it out. Ran into a few problems though, maybe you can help. First of all here is what I have on the system:

[root@guru ~]# rpm -q selintra-sail
selintra-sail-2.1.11-181
[root@guru ~]# rpm -q jre
jre-1.5.0_06-fcs
[root@guru ~]# rpm -q tftp-server
tftp-server-0.39-1
[root@guru ~]# rpm -q xinetd
xinetd-2.3.13-4.4E.1
[root@guru ~]# rpm -q gs-cfg-gen
gs-cfg-gen-1.0.0-1

Initially I got this error:

Apr 23 21:34:30 guru xinetd[32567]: libwrap refused connection to tftp (libwrap=in.tftpd) from 192.168.10.241
Apr 23 21:34:38 guru xinetd[32569]: libwrap refused connection to tftp (libwrap=in.tftpd) from 192.168.10.241
Apr 23 21:34:46 guru xinetd[32570]: libwrap refused connection to tftp (libwrap=in.tftpd) from 192.168.10.241

So I had to manually edit /etc/e-smith/templates/etc/hosts.allow/tftpd

and change:

        $OUT .= "in.tftpd: 127.0.0.1 192.168.1.0/255.255.255.0\n";

to reflect my LAN settings, as such

        $OUT .= "in.tftpd: 127.0.0.1 192.168.10.0/255.255.255.0\n";

Now I can't see any errors in the logs (both messages and iptables/current) but the phone doesn't appear to be getting the info off the tftp server. I tried opening tcp69 and udp69 but this doesn't work either. I'm running in server/gateway mode, the phone is a BT101 with the following config

Program--1.0.5.10    Bootloader--1.0.0.18    HTML--1.0.0.37    VOC--1.0.0.6

I have set the "tftp server" field on the phone to my server's LAN IP address (192.168.10.1) Any ideas?
Regards
Lloyd

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
[Announce] SAIL tftp server and grandstream provisioning
« Reply #2 on: April 24, 2006, 06:07:09 PM »
HI Lloyd,

We think we may have a fix for you but we want you to try something first...


Fetch up your server/gateway (if it isn't already up).

In hosts.allow

in.tftpd: ALL

Next; shut down xinetd

/etc/init.d/xinetd stop

Now start tftpd in standalone mode as follows:-

in.tftpd -l -v -v -p -s /tftpboot

Reboot the phone...

How'd we do?

Best

Selintra

Offline JonB

  • *
  • 351
  • +0/-0
[Announce] SAIL tftp server and grandstream provisioning
« Reply #3 on: April 30, 2006, 04:34:09 PM »
Finally got a chance to play with this.

After a bit of trial and error I finally got it to work.

First I had to upgrade the GS100 firmware to the latest (the original firmware did not have the config server settings)

The second thing I discovered is that when adding the MAC address in the extension settings it must be in the format

000b820244d6

I was initially adding as 00.0b.82.02.44.d6

One thing I have noticed is that time.gist.gov no longer seems to work as a NTP time server.

Jon
...

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
[Announce] SAIL tftp server and grandstream provisioning
« Reply #4 on: April 30, 2006, 07:28:27 PM »
Quote
After a bit of trial and error I finally got it to work.


Hi Jon

Cool - we're chuffed you've got it working.  Good point re the MAC address format, we'll update the docs pages to reflect.  Which release of the GS100 firmware do you now have?  We'll put that up as well.  

Sam is just finishing up the provisioning for Sipura devices. The spa-841/941 and all of the extension ata's work fine but the spa3K took a bit more work.  He finally got it running Friday evening so we'll probably put up a new release Wednesday/Thursday (it's a national holiday here on Monday).


Thanks again

Selintra

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
[Announce] SAIL tftp server and grandstream provisioning
« Reply #5 on: April 30, 2006, 07:32:39 PM »
Quote
One thing I have noticed is that time.gist.gov no longer seems to work as a NTP time server.


Sorry, missed this Jon.

I'm not 100% sure but I think we have all of our test and demo phones set to get their time from pool.ntp.org.  I'll check when I'm next in the office.


Best

jeff@selintra.com

Offline JonB

  • *
  • 351
  • +0/-0
[Announce] SAIL tftp server and grandstream provisioning
« Reply #6 on: May 01, 2006, 12:37:16 AM »
Jeff,

The gsconfig template by default sets

Code: [Select]
# NTP Server
P30 = time.gist.gov

# Time Zone. Offset in minutes to GMT
P64 = 420

# Daylight Savings Time. 0 - no, 1 - yes
P75 = 0

# Date Display Format. 0 - Year-Month-Day, 1 - Month-Day-Year, 2 - Day-Month-Year
P102 = 0


There is already a NTP server on the SME so why not use this as the default setting

The timezone is default set for New York. For example NZ will be +720 i.e 12 hrs ahead of GMT.

The ntp server,timezone, date format and daylight saving settings will need to be manually configured in /etc/e-smith/templates/tftpboot/gsconfig/20-general

To make the changes stick

delete all files in /tftpboot  i.e gsconfig and gsxxxxxxxxxxxx files

Go to SAIL- Globals and Save. This will rebuild the gsconfig file with the new settings.

Go to SAIL - Extensions, modify the Grandstream extensions, dont change anything but save. This will rebuild the encrypted gsxxxxxxxxxxxx.

Reboot the Grandstream and the new settings should be uploaded to the phone.

Jon
...

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
[Announce] SAIL tftp server and grandstream provisioning
« Reply #7 on: May 01, 2006, 01:43:07 AM »
Hi Jon,

Quote
# NTP Server
P30 = time.gist.gov


Has a typo crept in from somewhere?  Shouldn't it be time.nist.gov? (leastways, I can ping time.nist.gov but not time.gist.gov)

Nevertheless, you shouldn't have to mess about with the templates to get the set-up you want. We'll have to decide whether or not to expose the tftp data in the manager interface so that users may set/modify it themselves.  

Best

Offline JonB

  • *
  • 351
  • +0/-0
[Announce] SAIL tftp server and grandstream provisioning
« Reply #8 on: May 01, 2006, 04:53:27 AM »
Yep, fat finger syndrome.

While I can ping time.nist.gov the phones do not pick up a time.

time-a.nist.gov seems to work perfectly mind you so does using the SME servers NTP server which is sync'ed with pool.ntp.org anyway.

There is already a TimeZone database entry so if there was someway of converting a TimeZone to an offset then the entry in the gsconfig template fragment could be automatic.

Jon
...

Offline JonB

  • *
  • 351
  • +0/-0
[Announce] SAIL tftp server and grandstream provisioning
« Reply #9 on: May 02, 2006, 12:49:55 PM »
Jeff,

Just noticed that with SAIL build 183, Flash Operator Panel is showing each trunk 4 times.

Jon
...

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
[Announce] SAIL tftp server and grandstream provisioning
« Reply #10 on: May 02, 2006, 06:47:42 PM »
Quote
Just noticed that with SAIL build 183, Flash Operator Panel is showing each trunk 4 times.


Hi Jon,

Yeah, it's supposed to be an "enhancement", but we're not so sure at the moment!  

What we do is generate 4 instances for each VOIP line (gateways and analogue trunks still only get one each).  The idea is (according to the FOP notes), you can then individually deal with multiple concurrent calls on the same VOIP line.  The blocks are supposed to light up individually as a new call arrives.  To be honest - we aren't too sure it works. :-(

You might want to enlist a few buddies and give it a whirl.


Best

jeff@selintra.com