retrieving agent name

Any and all non-support discussions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

retrieving agent name

Postby raulbmjr » Wed Aug 23, 2023 1:39 pm

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
raulbmjr
 
Posts: 3
Joined: Thu Nov 07, 2019 9:12 am

Re: retrieving agent name

Postby carpenox » Wed Aug 23, 2023 2:09 pm

You could use logged_in_agents to get a list of all logged in agents...
Alma Linux 9.4 | SVN Version: 3889 | DB Schema Version: 1721 | Asterisk 18.21.1 | PHP8
www.dialer.one -:- 1-833-DIALER-1 -:- https://linktr.ee/CyburDial -:- WA: +19549477572
GC: https://join.skype.com/ujkQ7i5lV78O | DC: https://discord.gg/DVktk6smbh
carpenox
 
Posts: 2423
Joined: Wed Apr 08, 2020 2:02 am
Location: St Petersburg, FL

Re: retrieving agent name

Postby martinch » Wed Aug 23, 2023 3:44 pm

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.
Project Lead @ mDial -> https://github.com/TheBlode/mDial
martinch
 
Posts: 273
Joined: Thu Nov 15, 2018 9:14 am
Location: England, UK


Return to General Discussion

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 44 guests