Add a patch for voicemail thanks GerritV for contributing it.
This commit is contained in:
@@ -23,6 +23,7 @@
|
|||||||
-- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
-- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
-- POSSIBILITY OF SUCH DAMAGE.
|
-- POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
|
||||||
--include config.lua
|
--include config.lua
|
||||||
scripts_dir = string.sub(debug.getinfo(1).source,2,string.len(debug.getinfo(1).source)-(string.len(argv[0])+1));
|
scripts_dir = string.sub(debug.getinfo(1).source,2,string.len(debug.getinfo(1).source)-(string.len(argv[0])+1));
|
||||||
dofile(scripts_dir.."/resources/functions/config.lua");
|
dofile(scripts_dir.."/resources/functions/config.lua");
|
||||||
@@ -40,9 +41,11 @@
|
|||||||
for key,value in pairs(argv) do
|
for key,value in pairs(argv) do
|
||||||
if (key > 1) then
|
if (key > 1) then
|
||||||
arguments = arguments .. " '" .. value .. "'";
|
arguments = arguments .. " '" .. value .. "'";
|
||||||
|
--freeswitch.consoleLog("notice", "[app.lua] argv["..key.."]: "..argv[key].."\n");
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--route the request to the application
|
--route the request to the application
|
||||||
--freeswitch.consoleLog("notice", "[app] lua route: ".. scripts_dir .. "/app/" .. app_name .. "/index.lua\n");
|
--freeswitch.consoleLog("notice", "["..app_name.."]".. scripts_dir .. "/app/" .. app_name .. "/index.lua\n");
|
||||||
dofile(scripts_dir .. "/app/" .. app_name .. "/index.lua");
|
loadfile(scripts_dir .. "/app/" .. app_name .. "/index.lua")(argv);
|
||||||
|
|
||||||
|
|||||||
@@ -41,8 +41,8 @@
|
|||||||
debug["sql"] = false;
|
debug["sql"] = false;
|
||||||
|
|
||||||
--get the argv values
|
--get the argv values
|
||||||
script_name = argv[0];
|
script_name = argv[1];
|
||||||
voicemail_action = argv[1];
|
voicemail_action = argv[2];
|
||||||
|
|
||||||
--starting values
|
--starting values
|
||||||
dtmf_digits = '';
|
dtmf_digits = '';
|
||||||
@@ -193,7 +193,7 @@
|
|||||||
--send a message waiting event
|
--send a message waiting event
|
||||||
if (voicemail_action == "mwi") then
|
if (voicemail_action == "mwi") then
|
||||||
--get the mailbox info
|
--get the mailbox info
|
||||||
account = argv[2];
|
account = argv[3];
|
||||||
array = explode("@", account);
|
array = explode("@", account);
|
||||||
voicemail_id = array[1];
|
voicemail_id = array[1];
|
||||||
domain_name = array[2];
|
domain_name = array[2];
|
||||||
|
|||||||
Reference in New Issue
Block a user