Fix a nil variable concatentation error on user_status

This commit is contained in:
Mark Crane 2014-04-13 06:28:37 +00:00
parent 22d3edb3f8
commit ca46dfcbee
1 changed files with 4 additions and 2 deletions

View File

@ -143,7 +143,6 @@
user_uuid = row.user_uuid;
username = row.username;
user_status = row.user_status;
freeswitch.consoleLog("NOTICE", "[call_center] user_status: ".. user_status .. "\n");
if (user_status == "Available") then
action = "logout";
status = 'Logged Out';
@ -151,6 +150,7 @@
action = "login";
status = 'Available';
end
freeswitch.consoleLog("NOTICE", "[call_center] user_status: ".. status .. "\n");
--set the user_status in the users table
sql = "UPDATE v_users SET ";
@ -199,7 +199,9 @@
end);
--send the status to the display
reply = api:executeString("uuid_display "..uuid.." '"..status.."'");
if (status ~= nil) then
reply = api:executeString("uuid_display "..uuid.." '"..status.."'");
end
--set the session sleep to give time to see the display
if (session:ready()) then