Short answer, you will need to establish an agreement ahead of time. As the check occurs before the connection is ever established.
This is apparently not a spell used for cold calling.
As explained by @Fie (emphasis theirs)
according to the spell targetting rules in XGE (pp. 85–6), the validity of the target (i.e. whether the creature is willing) must be determined before the spell has any effect (including the target recognising you as the creature it is communicating with).
Meaning that though you are familiar with the target, they must be willing to receive your message before they receive it. A short conversation among friends can be had, "Hey, is it ok if I use telepathy to communicate with you in the future?" to establish that willingness in some regard ahead of time.
If the target for some reason becomes unwilling, the spell will fail without contact ever being established and the target not realizing you attempted to reach them. Perhaps they are busy at the moment, but that doesn't stop them from later being willing once more.
The Willingness check will occur before connection is made on casting the spell.
Alternatively, there may be a discussion on the hypothetical,
- "if A somehow knew that it was B calling, would they accept the call?" willingness being applied that way, as they are willing in this case.
But it is unclear if the question instead is,
- "are they willing to accept an unknown call before knowing who sent the request?" which might not be the same willingness.
Could be stated more clearly in either case.
Curious though, the duration is 24 hours without an off switch other than moving to another plane of existence. Once the spell succeeds, the willingness of the creature to continue the link is seemingly no longer considered.