They are forbidden if they are about a player that is still on a contract with another club. The rules are really simple. If a player has more than 6 months on the contract no other club can contact him or his agent (it's really the same thing) about signing a contract with them.
Currently under both the transfer rules established by FIFA and the Football Association followed by the clubs playing in England if another club wants to procure the services of a player that is registered with another club they must speak directly with that club and not to the player or his agent. The individual player and the agent who represents him will only be brought in for discussions with the potential purchasing club once the two clubs have agreed on a fee.
Same rules apply to every club competition. This is also why most of the news like "Sanchez agrees contract with Juventus. Juventus now only needs to make a bid" are ridiculous piece of bullshit journalism.
And yeah this is about transfers but it's the same rule that doesn't allow any contacts with a player before he's on <6months.