简体   繁体   中英

How to get SIP user status with ARI?

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.

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.

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": []
  },
]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM