Leo,
the reply file must be also a FIFO file already existing and must be
some process reading from it for SER to be able to write something.
Try to monitor SER logs to trace your problem.
Best regards,
Marian
Leo wrote:
Dear serusers,
I have spent the past several nights trying to figure out how to use the
ser_fifo to send commands and get info back from SER using PHP.
My understanding of using the fifo in SER is to send it
:fifo_command:result_filename. In the example below I am sending the
"ul_dump" command to the fifo and telling to return the result to a file
called "delthis.txt". The file "delthis.txt" never gets created and
it
doesn't look like this fifo thing is working at all.
The examples in the admin guide are not helping me. Can anyone one help?
The test PHP code is below:
<html>
<head>
<title>Browser SERCTL </title>
</head>
<body>
<?php
function wrfifo()
{
$fifo_handle = fopen("/tmp/ser_fifo" , "w");
if (!$fifo_handle)
{
echo "cannot open ser_fifo<br>";
return 0;
}
if (fwrite($fifo_handle, ":ul_dump:/tmp/delthis.txt")==-1)
{
echo "cannot write to fifo";
fclose($fifo_handle);
return 0;
}
fclose($fifo_handle);
system("cat /tmp/delthis.txt");
return 1;
}
echo "begin<br>";
$success = wrfifo();
if ($success)
{
echo "success<br>";
}
else
{
echo "failure<br>";
}
?>
Leo Papadopoulos
leo(a)ltcjp.com
--
Voice System
http://www.voice-system.ro