diff --git a/resources/install/scripts/app/agent_status/index.lua b/resources/install/scripts/app/agent_status/index.lua index bd333d1721..230c59785b 100644 --- a/resources/install/scripts/app/agent_status/index.lua +++ b/resources/install/scripts/app/agent_status/index.lua @@ -166,6 +166,16 @@ status = "Invalid ID or Password"; end +--set the status and presence + if (session:ready()) then + if (action == "login") then + session:execute("playback", sounds_dir.."/ivr/ivr-you_are_now_logged_in.wav"); + end + if (action == "logout") then + session:execute("playback", sounds_dir.."/ivr/ivr-you_are_now_logged_out.wav"); + end + end + --send the status to the display if (status ~= nil) then reply = api:executeString("uuid_display "..uuid.." '"..status.."'"); @@ -175,15 +185,3 @@ if (session:ready()) then session:execute("sleep", "2000"); end - ---set the status and presence - if (session:ready()) then - if (action == "login") then - session:execute("playback", sounds_dir.."/ivr/ivr-you_are_now_logged_in.wav"); - --session:execute("playback", "tone_stream://%(500,0,300,200,100,50,25)"); - end - if (action == "logout") then - session:execute("playback", sounds_dir.."/ivr/ivr-you_are_now_logged_out.wav"); - --session:execute("playback", "tone_stream://%(200,0,500,600,700)"); - end - end