<include>
<extension name="welcome_ivr">
<condition field="destination_number" expression="^samira$">
<action application="lua" data="welcome.lua"/>
</condition>
</extension>
</include>
/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