Koozali.org: home of the SME Server

Cisco provisioning and SAIL 2.2.1

Offline groutley

  • *****
  • 213
  • +0/-0
    • http://www.routley.homeip.net
Cisco provisioning and SAIL 2.2.1
« on: November 03, 2007, 06:24:14 AM »
Hi Jeff,
  I had been scratching my head with my Cisco 7940 phone since upgrading to SAIL 2.2.1
I had manually provisioned it by building the cfg files and placing into the tftpboot directory.
After upgrade the first thing I notices was the tftpboot dir had been cleaned out,
so I copied the relevent files back from tftpboot.bak directories.

That was fine,  but as you know I have rebooted my box a few times, and every time my Cisco phone would stop working, and I'd discover that somehow SIPdefault was being overwritten with an incorrect gateway IPaddr.
Today it twigged ! and I find that there are various IP device files, for RINGLIST.DAT, SIPdefault.cfg and Cisco 7960.
I had built my own Cisco 79XX device previously (I think), as my device has nothing in the provisioning field.
So I figure this is simple, I could just copy and past from the Cisco 7960 device provisioning field, to my 79XX
provisioning field. (well made sense to me).
But it only kind of works ?
i.e it does not pic up the variables line $ext etc..  as the phone actualy displays the variable.. '$ext' on the display in the Line field instead of '5010'.
So I guess I don't understand how this provisioning works under the covers ?
I hoped I could easily modify using your example, to elaborate and properly provision all the settings I had in my manual SIPxxxx.cfg file.

I gather this is work in progress ? which is fine, and certainly happy to test and report ;-)

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Cisco provisioning and SAIL 2.2.1
« Reply #1 on: November 03, 2007, 01:39:53 PM »
Thanks mate - this is good stuff.

Let's take a look at what's going on here....

Firstly, you've just uncovered a corner case...   From 537 we regen tftpboot in its entirety, which means you can't put your own stuff in there.  On reflection this was a rather dumb, "only me" decision and I will have it fixed tout suite.  This is why you are losing your code.  Not very PC of us was it? 

OK, let's get your 7960 up and running.  As SIP phones get ever more complex and require ever more file types we had to come up with some general way of allowing you to specify files and filenames that we may not yet be aware of.  WE wanted the provisioning system to be open ended enough to allow you to unpack your brand new spiffy ipsuperphone1, or whatever, and still be able to provision it from SARK, even tho' we may never have heard of the ipsuperphone1 and know nothing about it here at Selintra.  So... the kiddies (the ones who we don't allow sharp objects) came up with .... Descriptors.  A Descriptor is anything you want it to be.  It's just a general purpose container.  It will be copied into the tftpboot file under the name you give it and it will contain whatever you put in it.

So... let's assume your ipsuperphone1 requires a regular mac-address type file, and a general file called superphone1.general.  Well, you can just create a descriptor called superphone1.general and shove whatever the superphone needs in to it.  Get the idea?

The first phone we tested this on was, you guessed it, the 7960.  The 7960 needs a minimum of three files to get its act together;  SIP{mac-address}.cnf, SIPDefault.cnf and RINGLIST.DAT. 

SIPDefault.cnf and RINGLIST.DAT are provided as descriptor entries in ipdevices and you can freely modify them to suit your needs. 

Now, the SIPDefault.cnf, as provided by us is ever so slightly dodgy and you'll need to make a slight change to it for your phone to work (we will fix this very shortly).

Here's what it looks like...

Code: [Select]
; sip default configuration file

# Image Version
image_version: P0S3-08-7-00 ;
# Proxy Server
proxy1_address: 192.168.1.210;
proxy_register: 1 ;
logo_url: "http://192.168.1.210/logo.bmp" ;

You'll need to change the IP addresses to suit your server.

For the phone itself, I suggest you delete your extension and recreate it including the mac address.  You should find it just works (assuming your 7960 gets its rocks off the same way ours does).

Kind Regards and sorry for the bloody essay.

S






   

Offline groutley

  • *****
  • 213
  • +0/-0
    • http://www.routley.homeip.net
Re: Cisco provisioning and SAIL 2.2.1
« Reply #2 on: November 05, 2007, 12:38:39 PM »
G'day Jeff,
Great stuff, yes starting to really follow this now (I think).
Will be great if the tftproot can be used for more than sail ;-)
especially if yu want to put lots of ringtones etc, that each user phone can select and provision from the tftproot.
I have been playing again, with these descriptor files, to get the phone working as I had it manualy provisioned. One thing I am confused about is, the likes of the SIPdefault.cnf descriptor if I code
logo_url: "http://$localip/asterisk-tux.bmp" ;
the variable does not work ?  I look on the phone and not only is there no logo displayed,
but the settings on the phone show the logo url to be $localip
so it took this as actual and not a variable.
yet in the same descriptor file,
proxy1_address: $localip ;
works correctly..  what am I doing wrong here ?

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Cisco provisioning and SAIL 2.2.1
« Reply #3 on: November 05, 2007, 01:17:55 PM »
You aren't doing anything wrong.  It's a bug.

Can you use vim or pico?

If you can then open the following file....

/etc/e-smith/templates/tftpboot/seldir/10conf

At or around line 99 you will find...

Code: [Select]
                      $out =~ s/\$localip/$localip/;
Shove a g in there - like this..

Code: [Select]
                      $out =~ s/\$localip/$localip/g;
That should do it.

I've already updated svn so this will be in the next release but we've torn down a biggish part of the code at the moment for an upcoming change and I don't want to cut a release just yet.

Kind Regards

S


Offline groutley

  • *****
  • 213
  • +0/-0
    • http://www.routley.homeip.net
Re: Cisco provisioning and SAIL 2.2.1
« Reply #4 on: November 05, 2007, 01:32:23 PM »
Great,
  yes that seemed to fix that one up  :)
 thanks Jeff