Page 1 of 1

retrieving agent name

PostPosted: Wed Aug 23, 2023 1:39 pm
by raulbmjr
Greetings!

Is there any way we can retrieve agent name thru non_agent_api by passing agent_user parameter?

------------
OS: Amazon Linux 2 AMI
Version: 2.14-853a
Build: 220328-1420
Asterisk: 13.29.2
SVN Version: 3593

Re: retrieving agent name

PostPosted: Wed Aug 23, 2023 2:09 pm
by carpenox
You could use logged_in_agents to get a list of all logged in agents...

Re: retrieving agent name

PostPosted: Wed Aug 23, 2023 3:44 pm
by martinch
The only way would be by parsing logged_in_agents like Chris has said.

If you want to roll your sleeves up and get your hands dirty;

  • Modify `logged_in_agents` if you have passed in agent_user then limit the search to only that agent.
  • Create a new API function to fetch only the full name of the agent such as `fetch_full_name`

I'm happy to write something along those lines but that wouldn't be official ViCi code and I somewhat doubt they'll accept it as it's somewhat niche, at least from how I'm reading it. You may have a legitmate reason to use this over and over though so if there is a usecase, then that's cool :)

Hope this helps.
Martin.