Event Showing Who Called Who

Home » Asterisk Users » Event Showing Who Called Who
Asterisk Users No Comments

I’m monitoring the ARI, and if extension 1 calls extension 2, it seems that extension 2 enters the bridge first, then extension 1 enters the bridge. Can I safely (always) determine who initiated the call by who is the latest endpoint to enter the bridge? Or is there a better way to know who initiates the call?

I want to make this dialplan agnostic, so I don’t want to listen for ChannelDialplan events. I see a Dial event that holds caller and peer information but that doesn’t mean a bridge will be successful, so do I have to start tracking the id’s of each endpoint, track who ‘dialed’, and once a bridge is entered try to related that data?

Looking ahead I wonder how to handle if extension 1 calls a call group..but I’ll ignore that for now.

Thanks

Brian

(ast newb)