Thomas,

I suspect there is a problem elsewhere in your dialplan. Can you pastebin the whole extension and also a debug log of a call flowing through this extension? I have a feeling that will help us figure out what is going on. Please use pastebin.freeswitch.org and "FreeSWITCH Log" for syntax highlighting.

-MC

On Sun, Nov 6, 2011 at 3:51 PM, Thomas Hoellriegel <admin@blindi.net> wrote:
Hi Sammy,
I become no output true or false.
My Script is now:

function file_exists(fname)
local f = io.open(fname, "r")
if (f and f:read()) then return true end
end
if ( session:ready() ) then
session:answer( );
datei = session:getVariable("call_screen_filename");
if (file_exists(datei..extension.**.".wav")) then
session:setVariable("fileex", "true");
session:setVariable(fileex, true)
returns true;
else
session:setVariable("fileex", "false");
returns false;
end
end

The variable fileex is emty.
The variable:
call_screen_filename
will not be changed after to execute these script.

I like to setup a callscreening.
if the name exists, transfer to the given extension.
If the name don.t exists, start the recording and transwer the call.

Thanks.





---------------
Du kannst mich jederzeit kostenlos per Festnetz erreichen unter:
http://www.blindi.net/callback
homepage: http://www.blindi.net
blinde-misc mailingliste für blinde. anmeldung unter:
http://www.blindi.net/mailman/listinfo/blinde-misc


FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org