Unity will not be able to connect direct to both Avaya PBXs.
To do centralized voicemail in this environment you'll need at least one of the Avaya's tightly integrated with either the other Avaya or CCM. By 'tightly' integrated I mean the trunk between them needs to pass sufficient info for centralized voicemail. RDNIS and MWI are the two big ones. For example, a QSIG trunk with supplementary services should be able to provide this. Avaya also has their own inter-PBX networking protocol, DCS I think, which is capable of supporting centralized voicemail.
-Eric