3CX API Add/Remove Queue Agents

Status
Not open for further replies.

gdelgiovine

Free User
Joined
Jun 8, 2022
Messages
13
Reaction score
2
Is it possible to Add/Remove Queue Agents with 3CX API?

The Queue Object contains the Members collection (obsolete) and the QueueAgents, but i didn't found any sample or info on add/remove items into this objects (they are marked for get/set )
I need to dynamically assign Extensions to specified Queues for use in a powerdialer solution.
Thank you.

Gabriele.
 
  • Like
Reactions: Kalana_SIMSYN
Is it possible to Add/Remove Queue Agents with 3CX API?

The Queue Object contains the Members collection (obsolete) and the QueueAgents, but i didn't found any sample or info on add/remove items into this objects (they are marked for get/set )
I need to dynamically assign Extensions to specified Queues for use in a powerdialer solution.
Thank you.

Gabriele.
Solution found on samples.

string Extensions="100;101;102";
var collection = Extensions.Split(';')
.Select(x => PhoneSystem.Root.GetDNByNumber(x) as Extension)
.Where(x => x != null)
.Distinct();
queue.QueueAgents = collection.Select(x => queue.CreateAgent(x)).ToArray();
queue.Save();
Be warned: this is very basic. You MUST check that every Extension number really exists or entire Agents collection will be empty.
 
Last edited:
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
112,323
Messages
591,894
Members
165,472
Latest member
arneg