[Freeswitch-users] Problem Verifying an existing file with lua
Michael Collins
msc at freeswitch.org
Mon Nov 7 20:26:47 MSK 2011
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 at 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<http://www.blindi.net/mailman/listinfo/blinde-misc>
>
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20111107/7a9aa332/attachment.html
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list