[asterisk-dev] Adding ARI subscription type for module's, notification event

Sungtae Kim pchero21 at gmail.com
Thu Jan 3 16:33:29 CST 2019


Hi, Asterisk team,

Thank you for your kind reply.

Yes, with adding ARI subscription type, I expect this will make more 
easier to implementing more ARI interfaces.

Actually, I was wanted to implementing ARI interfaces for the other 
Asterisk modules. But it turns out there's no way to notify the 
module-generated notification messages via ARI. And I thought this 
implementation must be done and more important.

Adding the subscription type does nothing by itself. It just making new 
pathway for the message notification. But it makes easier to 
implementing the other ARI interfaces.

Even the ARI deos not designed for the module monitoring or event 
notify, this would be very useful for the ARI users. Because of the 
module need to be notified how they are working and what is going on. 
The module's event and notification can not use the 
Channels/Bridges/Endpoint type. Because it's not.

AMI does this feature already, but providing notification message via 
ARI event subscription would be more understandable to use the Asterisk 
with ARI.

So this is why I'm trying to make this feature.

With this feature, I can expect these new ARI interfaces in the future.
- /agents
- /parks
- /queues
- any other asterisk modules

And adding these ARI events.

* Park
- ParkedCall
- ParkedCallGiveUp
- ParkedCallSwap

* Queue
- QueueCallerAbandon
- QueueCallerJoin
- QueueCallerLeave
- QueueMemberAdded
- QueueMemberPause
- QueueMemberPenalty
- QueueMemberRemoved
- QueueMemberRinginuse
- QueueMemberStatus

...

And all event will be provided by json type like this.
'''
{
     "type": "QueueCallerJoin",
     "timestamp": "2018-10-23T12:36:11.110+0000",
     "queue": "test",
     "position": 1,
     "count": 1,
     "channel": {
         "id": "pchero-462475.572686",
         "name": "PJSIP/pchero-voip-00001b1f",
         "state": "Up",
         "caller": {
             "name": "",
             "number": "1337"
         },
         "connected": {
             "name": "",
             "number": "1337"
         },
         "accountcode": "",
         "dialplan": {
             "context": "pchero-voip",
             "exten": "s",
             "priority": 2
         },
         "creationtime": "2018-10-23T12:36:02.671+0000",
         "language": "en"
     },
     "asterisk_id": "210445d7-73bd-456a-aef2-e0ef847bfa0f",
     "application": "pchero_voip"
}
'''

This is just some of example of possiblities.

In short, this feature will make possible to adding module-based ARI 
interfaces.

Thank you.

Kind regards,
Sungtae




More information about the asterisk-dev mailing list