[asterisk-users] OT - How to configure Apache2 server to receive Polycom log files ?

Olivier oza.4h07 at gmail.com
Wed Jun 25 04:44:39 CDT 2014


Thanks for sharing this.
I'll give it a try ASAP and post my comments here.

Thanks again.


2014-06-17 14:51 GMT+02:00 Stepan Hradsky <stepan.hradsky at ha-vel.cz>:

>  Hi,
>
> I have this configuration in apache site configuration
>
>         <Directory /home/prov/polycom>
>                 RewriteEngine On
>                 RewriteCond %{REQUEST_METHOD} =PUT [OR]
>                 RewriteCond %{REQUEST_METHOD} =HEAD
>                 RewriteRule ^(.*)$ put.php?url=$1
>         </Directory>
>
> this redirect PUT method to put.php script which read input and write to
> file in logs directory.
>
> and this is file put.php:
> <?php
>
> /* PUT data comes in on the stdin stream */
> $putdata = fopen("php://input", "r");
>
> $mode="w";
> /* Open a file for writing */
> $file=basename($_SERVER['REQUEST_URI']);
> if (substr($file,-3)!='cfg' and substr($file,-3)!='xml') {
>         if (!is_dir("logs")) mkdir("logs");
>         $file="logs/$file";
>         $mode="a";
> }
> $fp = fopen($file, $mode);
>
> /* Read the data 1 KB at a time  and write to the file */
> while ($data = fread($putdata, 1024)) fwrite($fp, $data);
>
> /* Close the streams */
> fclose($fp);
> fclose($putdata);
> ?>
>
> BR
> Stepan
>
> Dne 16.6.2014 15:51, Olivier napsal(a):
>
>    Hello,
>
>  To troubleshoot Polycom phone provisionning (with an asterisk 11 box),
> I'm looking to enable HTTP log file upload ie the capability for Polycom
> phones to upload some data to a given HTTP server.
>
>  At the moment, Polycom phones are downloading config files from an
> Apache2 HTTP server, thanks to a DHCP  server configuration option bellow.
> option tftp-server-name "http://192.168.64.250/polycom";
>
>  Looking at Apache2 log files, I can see that Polycom phones are trying to
> upload log files but every attempt to upload data (fails with 405 error, no
> matter how I configured target upload directory ownership. See:
>
> 192.168.64.215 - - [16/Jun/2014:15:25:03 +0200] "PUT
> /polycom/log/0004f2394356-boot.log HTTP/1.1" 405 582 "-" "FileTransport
> PolycomSoundPointIP-SPIP_650-UA/4.3.0.0246"
>
>
> Has someone successfully received Polycom file uploads with an HTTP server
> (ie without using FTP) or is it something can't simply be done ?
>  If positive, can you share key configuration settings ?
>
>  Regards
>
>
>
> --
> S pozdravem / with kind regards
>
> Štěpán Hradský
>
> oddělení specialistů hlasových služeb / voice department
>
> ha-vel internet s.r.o.
>
> Olešní 587/11A
> 712 00 Ostrava Muglinov
> Czech Republic
>
> T +420 552 305 370/ F +420 552 305 306
> Hotline: +420 552 305 321http://www.ha-vel.cz
>
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>                http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20140625/9f02aa0b/attachment.html>


More information about the asterisk-users mailing list