[Freeswitch-users] loops

Sam u2nsam at gmail.com
Tue Dec 21 12:36:18 MSK 2010


Hello,

I am trying to get a loop done using if ... then .. return function,
using below syntax but getting error on it.


if (session:ready()) then return ack()
end


function ack()

session:answer();
session:streamFile("/usr/local/freeswitch/sounds/en/us/callie/zrtp/8000/zrtp-somethings_wrong.wav")

end



error:---
EXECUTE sofia/internal/7001 at 192.168.2.190 lua(hello.lua)
2010-12-21 14:55:34.724790 [ERR] mod_lua.cpp:182
/usr/local/freeswitch/scripts/hello.lua:1: attempt to call global 'ack' (a
nil value)
stack traceback:
        /usr/local/freeswitch/scripts/hello.lua:1: in main chunk


Any ideas to resolve this.

Regards
Sam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20101221/c4644c19/attachment.html 


More information about the FreeSWITCH-users mailing list