Fix a nil variable concatentation error on user_status
This commit is contained in:
parent
22d3edb3f8
commit
ca46dfcbee
|
|
@ -143,7 +143,6 @@
|
||||||
user_uuid = row.user_uuid;
|
user_uuid = row.user_uuid;
|
||||||
username = row.username;
|
username = row.username;
|
||||||
user_status = row.user_status;
|
user_status = row.user_status;
|
||||||
freeswitch.consoleLog("NOTICE", "[call_center] user_status: ".. user_status .. "\n");
|
|
||||||
if (user_status == "Available") then
|
if (user_status == "Available") then
|
||||||
action = "logout";
|
action = "logout";
|
||||||
status = 'Logged Out';
|
status = 'Logged Out';
|
||||||
|
|
@ -151,6 +150,7 @@
|
||||||
action = "login";
|
action = "login";
|
||||||
status = 'Available';
|
status = 'Available';
|
||||||
end
|
end
|
||||||
|
freeswitch.consoleLog("NOTICE", "[call_center] user_status: ".. status .. "\n");
|
||||||
|
|
||||||
--set the user_status in the users table
|
--set the user_status in the users table
|
||||||
sql = "UPDATE v_users SET ";
|
sql = "UPDATE v_users SET ";
|
||||||
|
|
@ -199,7 +199,9 @@
|
||||||
end);
|
end);
|
||||||
|
|
||||||
--send the status to the display
|
--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
|
--set the session sleep to give time to see the display
|
||||||
if (session:ready()) then
|
if (session:ready()) then
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue