How to tell it is Incoming or outbound call?

Hi,

For a bridged call or dialed call, Our CRM needs to know which is customer number so that a window can pop up to show customer info.

Is there a way to know whether a call is incoming or outbound? Or which channel is incoming?
For asterisk-java BridgeEvent that has two channels, but I can not tell which is incoming channel from customer.

Thanks for help.
Dave

The channels will always be in the same order. I suspect that is incoming followed by outging.

I’m assuming that the Java wrapper for AMI doesn’t destroy the ordering.