Agent status is reset to "logged-out" at freeswitch restart, I want it to be preserved

Status
Not open for further replies.

Zivk

Member
Apr 7, 2019
35
6
8
63
We have the freeswitch databases (like of mod_callcenter) on sqlite, regular file system. Our call center agents have default status of "logged-out". During the day they log-in and become "available". If freeswitch is restarted for whatever reason, the agents status is changed to "logged-out". This is very bad for us. I don' know if it's because freeswitch resets all sqlite content on start, or whatever other reason.

Is there a way to make freeswitch preserve the agents status?
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,076
578
113
This is on FusionPBX? I have never known this behaviour. We have queues that agents have NEVER logged into. They have always been logged in.
 

Zivk

Member
Apr 7, 2019
35
6
8
63
FusionPBX 4.4.3.

I see in freeswitch documentation that there's a mod_callcenter flag truncate-agents-on-load whose default is supposed to be false, yet the agent status changes at start. Tried to set this flag to false in autoload_configs/callcenter.conf (via the XML Editor) but nothing changed.
 
Last edited:

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,076
578
113
It wouldn't change, that file does not get loaded, this would be the relevant file:

/usr/share/freeswitch/scripts/app/xml_handler/resources/scripts/configuration/callcenter.conf.lua
 

Zivk

Member
Apr 7, 2019
35
6
8
63
Oh I suspected that FusionPBX generates callcenter.conf programatically, thanks for the reference. So I see that FusionPBX sets on start the agent status according to what it finds in table v_call_center_agents. And it seems that the data in this table is not up-to-date: I login to an agent, the Call Center Agent Status screen tells me correctly that the agent is logged-in, but column v_call_center_agents.agent_status is "Logged Out". How does v_call_center_agents gets status updates when the agent logs in/out?

(deleted inaccurate comment)
 
Last edited:

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,505
420
83
I seem to remember reading, that it is best to leave the "status" dropdown blank in the call center agent record otherwise this status is used as a default.
 

Zivk

Member
Apr 7, 2019
35
6
8
63
Seems there's no option to leave agent status empty in the UI.

I'm pulling the question back, there are several issues like whether the FreeSWITCH mod_callcenter and FusionPBX use the same database (to allow access to the "agents" table from FusionPBX lua), whether either script "agent_status.lua" or "agent_status_ext.lua" is called, why restart of a specific queue changes status of agents in other queues and even other domains, etc.
 
Last edited:
Status
Not open for further replies.