<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi,<br>
<br>
I have this configuration in apache site configuration<br>
<br>
<Directory /home/prov/polycom><br>
RewriteEngine On<br>
RewriteCond %{REQUEST_METHOD} =PUT [OR]<br>
RewriteCond %{REQUEST_METHOD} =HEAD<br>
RewriteRule ^(.*)$ put.php?url=$1<br>
</Directory><br>
<br>
this redirect PUT method to put.php script which read input and
write to file in logs directory.<br>
<br>
and this is file put.php:<br>
<?php<br>
<br>
/* PUT data comes in on the stdin stream */<br>
$putdata = fopen("php://input", "r");<br>
<br>
$mode="w";<br>
/* Open a file for writing */<br>
$file=basename($_SERVER['REQUEST_URI']);<br>
if (substr($file,-3)!='cfg' and substr($file,-3)!='xml') {<br>
if (!is_dir("logs")) mkdir("logs");<br>
$file="logs/$file";<br>
$mode="a";<br>
}<br>
$fp = fopen($file, $mode);<br>
<br>
/* Read the data 1 KB at a time and write to the file */<br>
while ($data = fread($putdata, 1024)) fwrite($fp, $data);<br>
<br>
/* Close the streams */<br>
fclose($fp);<br>
fclose($putdata);<br>
?><br>
<br>
BR <br>
Stepan<br>
<br>
<div class="moz-cite-prefix">Dne 16.6.2014 15:51, Olivier napsal(a):<br>
</div>
<blockquote
cite="mid:CAPeT9jga+2dFCxHo3FZ6jTJ_c+fr_Gum4FFAVV07CmxZrTp4xA@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div>
<div>
<div>
<div>Hello,<br>
<br>
</div>
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.<br>
<br>
</div>
At the moment, Polycom phones are downloading config files
from an Apache2 HTTP server, thanks to a DHCP server
configuration option bellow.<br>
option tftp-server-name "<a moz-do-not-send="true"
href="http://192.168.64.250/polycom">http://192.168.64.250/polycom</a>";<br>
<br>
</div>
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:<br>
</div>
<br>
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/<a
moz-do-not-send="true" href="http://4.3.0.0246">4.3.0.0246</a>"<br>
<br>
</div>
<br>
<div>Has someone successfully received Polycom file uploads with
an HTTP server (ie without using FTP) or is it something can't
simply be done ?<br>
</div>
<div>If positive, can you share key configuration settings ?<br>
<br>
</div>
<div>Regards<br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
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 321
<a class="moz-txt-link-freetext" href="http://www.ha-vel.cz">http://www.ha-vel.cz</a>
</pre>
</body>
</html>