From d4f2c57455abf43b2b3be2e2c48541960a6e0589 Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Wed, 3 Dec 2014 09:02:54 +0000 Subject: [PATCH] Get the values from the database and set them as lua variables. --- .../resources/scripts/directory/directory.lua | 30 ++++++++++++++----- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/resources/install/scripts/app/xml_handler/resources/scripts/directory/directory.lua b/resources/install/scripts/app/xml_handler/resources/scripts/directory/directory.lua index 580f799f01..7ef6d9ffe7 100644 --- a/resources/install/scripts/app/xml_handler/resources/scripts/directory/directory.lua +++ b/resources/install/scripts/app/xml_handler/resources/scripts/directory/directory.lua @@ -232,6 +232,13 @@ sip_force_expires = row.sip_force_expires; nibble_account = row.nibble_account; sip_bypass_media = row.sip_bypass_media; + forward_all_enabled = row.forward_all_enabled; + forward_all_destination = row.forward_all_destination; + forward_busy_enabled = row.forward_busy_enabled; + forward_busy_destination = row.forward_busy_destination; + forward_no_answer_enabled = row.forward_no_answer_enabled; + forward_no_answer_destination = row.forward_no_answer_destination; + do_not_disturb = row.do_not_disturb; --set the dial_string if (string.len(row.dial_string) > 0) then @@ -333,6 +340,13 @@ sip_force_expires = row.sip_force_expires; nibble_account = row.nibble_account; sip_bypass_media = row.sip_bypass_media; + forward_all_enabled = row.forward_all_enabled; + forward_all_destination = row.forward_all_destination; + forward_busy_enabled = row.forward_busy_enabled; + forward_busy_destination = row.forward_busy_destination; + forward_no_answer_enabled = row.forward_no_answer_enabled; + forward_no_answer_destination = row.forward_no_answer_destination; + do_not_disturb = row.do_not_disturb; end); end @@ -455,25 +469,25 @@ table.insert(xml, [[ ]]); end if (string.len(forward_all_enabled) > 0) then - table.insert(xml, [[ ]]); + table.insert(xml, [[ ]]); end if (string.len(forward_all_destination) > 0) then - table.insert(xml, [[ ]]); + table.insert(xml, [[ ]]); end if (string.len(forward_busy_enabled) > 0) then - table.insert(xml, [[ ]]); + table.insert(xml, [[ ]]); end if (string.len(forward_busy_destination) > 0) then - table.insert(xml, [[ ]]); + table.insert(xml, [[ ]]); end if (string.len(forward_no_answer_enabled) > 0) then - table.insert(xml, [[ ]]); + table.insert(xml, [[ ]]); end if (string.len(forward_no_answer_destination) > 0) then - table.insert(xml, [[ ]]); + table.insert(xml, [[ ]]); end if (string.len(do_not_disturb) > 0) then - table.insert(xml, [[ ]]); + table.insert(xml, [[ ]]); end table.insert(xml, [[ ]]); table.insert(xml, [[ ]]); @@ -547,4 +561,4 @@ --send the xml to the console if (debug["xml_string"]) then freeswitch.consoleLog("notice", "[xml_handler] XML_STRING: \n" .. XML_STRING .. "\n"); - end + end \ No newline at end of file