I recently have played around with linphone, and I successfully integrate it with my own server for call, and text message, However I am trying to config the sending image and it does not work at all. I get the .php file for file upload on own server and I point the sharing image server from linphone to it but it does not send any parameters to the server.
How to config linphone image sharing server to our own server
2.3k views Asked by Thyda Eng At
2
There are 2 answers
1
On
Example from here http://osdir.com/ml/linphone-developers-sip-voip/2013-08/msg00003.html
<?php
function getExtension($str)
{
$i = explode('.', $str);
return strtolower(end($i));
}
if ($_FILES["userfile"]["error"] > 0)
{
return;
}
else
{
$size = ($_FILES["userfile"]["size"] / 1024);
if($size > 1000)
{
return;
}
$locdir = dirname(__FILE__);
$globdir = "http://192.168.91.101/userdata";
$uploaddir = '/images/' . date('Y-m-d') . '/';
if (!is_dir($uploaddir)) {
mkdir($uploaddir, 0777);
}
$uploadfile = $uploaddir . uniqid() . '.' . getExtension($_FILES["userfile"]["name"]);
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $locdir . $uploadfile))
{
echo $globdir . $uploadfile;
}
}
?>
Ok, here is original PHP file - https://wiki.linphone.org/wiki/index.php/Liblinphone:file_transfer
just copy paste, its work.
its send/answer this xml document to another user that use linphone.
If you want to make it compatible with Asterix you need to implement the correct answer like xml document or just send
echo "Photo'.$http_url.'"
(this work with Jitsi)..