Moved the display update to the end (#1913)
Moved the UPDATE sip request to the end as it was sending the UPDATE request sometimes before the ACK had been received to the 200OK. This was sometimes causing it to fail. Also removed a couple of commented out lines.
This commit is contained in:
parent
4cc8a8582b
commit
cf39ea04d9
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue