1

I'm trying to make a realtime application with Asterisk 15 ARI, and I need to get all agents/users (sip) status in queue... I need to know if the user has logged in queue, is on pause, in a call...

I'm reading the Asterisk ARI docs but not found anything about that.

I'm using node-ari-client to watch the Stasis events.

Thanks for u help.

2 Answers2

3

I think AMI is more adequate for this purpose, as ARI is more suitable to build your dialplan application.

You may use AMI action QueueStatus to see who is logged in, paused, etc. Maybe https://www.npmjs.com/package/asterisk-ami-client will help you to build the client.

Jerdguez
  • 66
  • 3
0

ARI allows to get current state of SIP peers via http://localhost:8088/ari/endpoints/SIP

[
  {
    "technology": "SIP",
    "resource": "111",
    "state": "online",
    "channel_ids": []
  },
  {
    "technology": "SIP",
    "resource": "222",
    "state": "offline",
    "channel_ids": []
  },
 {
    "technology": "SIP",
    "resource": "333",
    "state": "unknown",
    "channel_ids": []
  },
]
Kosmo
  • 13
  • 5
  • for me the solution is pickup the status by AMI, using the queueStatus action. Because I need this info in realtime. Anyway, thanks for u help. – Rodrigo Roberto de Almeida Apr 23 '20 at 16:52
  • Not at all. I was looking for more detailed information from ARI about SIP users and peers like you and did not find any. AMI was a solution, even if the recieved strings of data have to be formatted. My answer may be useful if an application needs structured JSON from native REST of asterisk. I also found out that only /events in ARI uses websocket. Channels, bridges and endpoints are served via http. – Kosmo Apr 27 '20 at 21:15