mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-04 02:43:48 +00:00
Update ivr.conf.lua
Fix multi-lingual support for IVR Menu direct dial your call is being transferred and invalid entry.
This commit is contained in:
@@ -38,9 +38,21 @@
|
||||
|
||||
--set the cache
|
||||
if (XML_STRING == "-ERR NOT FOUND" or XML_STRING == "-ERR CONNECTION FAILURE") then
|
||||
--required includes
|
||||
local Database = require "resources.functions.database"
|
||||
local Settings = require "resources.functions.lazy_settings"
|
||||
|
||||
--get the language, dialect and voice
|
||||
default_language = params:getHeader("variable_default_language");
|
||||
default_dialect = params:getHeader("variable_default_dialect");
|
||||
default_voice = params:getHeader("variable_default_voice");
|
||||
if (default_language == nil) then default_language = 'en'; end
|
||||
if (default_dialect == nil) then default_dialect = 'us'; end
|
||||
if (default_voice == nil) then default_voice = 'callie'; end
|
||||
|
||||
--set the sound prefix
|
||||
sound_prefix = sounds_dir..[[/]]..default_language..[[/]]..default_dialect..[[/]]..default_voice..[[/]];
|
||||
|
||||
--connect to the database
|
||||
local dbh = Database.new('system');
|
||||
|
||||
@@ -237,7 +249,7 @@
|
||||
--direct dial
|
||||
if (ivr_menu_direct_dial == "true") then
|
||||
table.insert(xml, [[ <entry action="menu-exec-app" digits="/^(\d{2,11})$/" param="set ${cond(${user_exists id $1 ]]..domain_name..[[} == true ? user_exists=true : user_exists=false)}" description="direct dial"/>\n]]);
|
||||
table.insert(xml, [[ <entry action="menu-exec-app" digits="/^(\d{2,11})$/" param="playback ${cond(${user_exists} == true ? ivr/ivr-call_being_transferred.wav : ivr/ivr-that_was_an_invalid_entry.wav)}" description="direct dial"/>\n]]);
|
||||
table.insert(xml, [[ <entry action="menu-exec-app" digits="/^(\d{2,11})$/" param="playback ${cond(${user_exists} == true ? ]]..sound_prefix..[[ivr/ivr-call_being_transferred.wav : ]]..sound_prefix..[[ivr/ivr-that_was_an_invalid_entry.wav)}" description="direct dial"/>\n]]);
|
||||
table.insert(xml, [[ <entry action="menu-exec-app" digits="/^(\d{2,11})$/" param="transfer ${cond(${user_exists} == true ? $1 XML ]]..domain_name..[[ : ]]..ivr_menu_extension..[[ XML ]]..domain_name..[[)}" description="direct dial"/>\n]]);
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user