You need to subscribe for the call delivered event, in case the station is call observed and a call is alerting at the users station a notification is provided containg all relevant CTI data.
Usually the caller number is stored in the callingDevice attribute, which is a mandatory attribute, but in case the call goes through an IVR this is overwrittten - and the customer caller number is located in the originalCallInfo optional parameter - which is an Avaya properietary attribute.
Delivered Event
Event: CSTADeliveredEvent
ServiceParameters: monitorCrossRefID, connection, alertingDevice,
callingDevice, calledDevice, lastRedirectionDevice,
localConnectionInfo, cause
Private Parameters: deliveredType, trunk, trunkGroup, trunkMember, split,
lookaheadInfo, userEnteredCode, userInfo, reason, originalCallInfo,
distributingDevice, distributingVDN, ucid, callOriginatorInfo,
flexibleBilling, deviceHistory
orignialCallInfo: [optional] Specifies the original call information.
Note that information is not repeated in the originalCallInfo, if it is already reported in the CSTA service parameters or in the private data. For example, the callingDevice and calledDevice in the originalCallInfo will be NULL if the callingDevice and the calledDevice in the CSTA service parameters are the original calling and called devices. Only when the original devices are different from the most recent callingDevice and calledDevice, the callingDevice and calledDevice in the originalCallInfo will be set.
There are reliable solutions out there that are Avaya DevConnect certified and also Salesforce security reviewed that already have this intelligence, one out of the many is Desktop Connect - a Geomant product.
You can find out more here or on App Exchange