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

Stepan Hradsky stepan.hradsky at ha-vel.cz
Tue Jun 17 07:51:28 CDT 2014


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 
> <http://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

S(te(pán Hradský

odde(lení specialistu* hlasových sluz(eb / voice department

ha-vel internet s.r.o.

Oles(ní 587/11A
712 00 Ostrava Muglinov
Czech Republic

T +420 552 305 370/ F +420 552 305 306
Hotline: +420 552 305 321
http://www.ha-vel.cz

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20140617/a879c0da/attachment.html>


More information about the asterisk-users mailing list