[Freeswitch-users] how to take the result of running lua script on dialplan of freeswitch?
Samira Mh
saami_mh at ymail.com
Thu May 31 08:59:23 MSD 2012
hi guys,
<include>
<extension name="welcome_ivr">
<condition field="destination_number" expression="^samira$">
<action application="lua" data="welcome.lua"/>
</condition>
</extension>
</include>
i have created lua script like this:
/usr/local/freeswitch/script/welcome.lua
#!/usr/bin/lua
local sf = string.format
function binary_op(a, b, callback)
return callback(a, b);
end
function plus(a, b) return a + b end
function minus(a, b) return a - b end
function times(a, b) return a * b end
print(sf("Plus : %d", binary_op(5, 5, plus)));
print(sf("Minus: %d", binary_op(5, 5, minus)));
print(sf("Times: %d", binary_op(5, 5, times)));
the result of running that is 3 number,
but how can i get the 3 number in dialplan of freeswitch so that use the result of this number on it ?
thanks so much
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120530/85ec3f8f/attachment.html
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list