Kristian Kielhofner wrote: > On 3/27/08, Jaime Blaney <[EMAIL PROTECTED]> wrote: > >> Hi, >> >> Is there any documentation or suggestions on how to implement a system for >> provisioning sip phones (grandstream in particular) in Astlinux? >> I know that using a tftp server the phone will download a cfg<MAC address> >> file with its configuration. But I want to know how to make it more >> dinamically. For instance, when I connect the phone it requests an ip >> address with DHCP, then the system automatically using the phone's mac >> address create the phone's cfg file containing an extension number, asterisk >> server location, etc. >> I'm a little lost on how to implement this in astlinux and how to write an >> script for this. >> >> Thanks, >> >> Jaime >> >> > > Jaime, > > I thought of a way to do this a while back... > > First off, you could make mini_httpd (and Linux) treat .cfg files as > CGI and call something in PHP, etc to generate them on the fly. Now > you only have one problem - mini_httpd will still return an HTTP 404 > for any files that don't exist. Hmm... A while back I had a patch to > mini_httpd that would look at the User-Agent header and use a custom > polycom error document if the client was a Polycom. The only trick > was getting the CGI code ini mini_httpd to actually *execute* for > error pages. I got stopped there. > > You could make your Grandstreams use HTTP and modify this code a > little for their user agent string, file format, etc. > > This is the kind of thing that would be pretty straight forward in > Apache. But that's not fun, is it? :) > > I've attached the small patch to these e-mail to hopefully get you started. > >
I'd prefer to keep the web server as unmodified as possible... There should also be a way to do this that isn't specific to Polycoms, since provisioning a Sipura is probably 95% of the same stuff. -Philip ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ Astlinux-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/astlinux-users Donations to support AstLinux are graciously accepted via PayPal to [EMAIL PROTECTED]
