Search code examples
asteriskasterisk-ari

Asterisk. I'm using ARI to collect events, how do I group events into single customer interactions from start to finish?


I'm subscribed to events listed here under Event using ARI https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+REST+Data+Models#Asterisk13RESTDataModels-Event

I have multiple calls at the same time and because of this getting a lot of different events, how do I group these events into interactions - one interaction per one customer? Like a customer called one extension, then was transferred to another extension, talked there and hung up this is one interaction and at the same time another customer was calling and talked without transferring - this is a second interaction etc, so I need to generate as many interactions as there was user calls.

Where can I read some documentation about the order of events being generated per call or anything at all on the matter? I don't have access to a production asterisk, so I can't just see what events are generated and go from there. Right now I don't even have any idea about what events are generated when a customer calls and talks.


Solution

  • You can parse channel's Uniqueid. For transfer you have parse link/unlink and bridge/unbridge events, change uniqueid to new one.

    No other way.

    Asterisk events DEPEND of asterisk version. So best way is just dump all events and see.

    You also can check CEL system.