Fix ringback on the ivr menu by getting the global variable representing the ring back tones.
This commit is contained in:
@@ -61,6 +61,9 @@
|
|||||||
if f~=nil then io.close(f) return true else return false end
|
if f~=nil then io.close(f) return true else return false end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--prepare the api object
|
||||||
|
api = freeswitch.API();
|
||||||
|
|
||||||
--get the ivr menu from the database
|
--get the ivr menu from the database
|
||||||
sql = [[SELECT * FROM v_ivr_menus
|
sql = [[SELECT * FROM v_ivr_menus
|
||||||
WHERE ivr_menu_uuid = ']] .. ivr_menu_uuid ..[['
|
WHERE ivr_menu_uuid = ']] .. ivr_menu_uuid ..[['
|
||||||
@@ -104,8 +107,10 @@
|
|||||||
|
|
||||||
--set the ringback
|
--set the ringback
|
||||||
if (ivr_menu_ringback) then
|
if (ivr_menu_ringback) then
|
||||||
session:setVariable("ringback", ivr_menu_ringback);
|
ringback = string.gsub(ivr_menu_ringback, "^${*(.-)%}*$", "%1");
|
||||||
session:setVariable("transfer_ringback", ivr_menu_ringback);
|
ringback = api:executeString("global_getvar "..ringback);
|
||||||
|
session:setVariable("ringback", ringback);
|
||||||
|
session:setVariable("transfer_ringback", ringback);
|
||||||
end
|
end
|
||||||
|
|
||||||
--get the sounds dir, language, dialect and voice
|
--get the sounds dir, language, dialect and voice
|
||||||
@@ -147,9 +152,6 @@
|
|||||||
end
|
end
|
||||||
ivr_menu_invalid_entry = sounds_dir.."/"..default_language.."/"..default_dialect.."/"..default_voice.."/"..ivr_menu_invalid_sound;
|
ivr_menu_invalid_entry = sounds_dir.."/"..default_language.."/"..default_dialect.."/"..default_voice.."/"..ivr_menu_invalid_sound;
|
||||||
|
|
||||||
--prepare the api object
|
|
||||||
api = freeswitch.API();
|
|
||||||
|
|
||||||
--define the ivr menu
|
--define the ivr menu
|
||||||
function menu()
|
function menu()
|
||||||
--increment the tries
|
--increment the tries
|
||||||
@@ -271,4 +273,4 @@
|
|||||||
if ( session:ready() ) then
|
if ( session:ready() ) then
|
||||||
session:answer();
|
session:answer();
|
||||||
menu();
|
menu();
|
||||||
end
|
end
|
||||||
Reference in New Issue
Block a user