Congratulations, your parrot is a very good trainer! This isn't done out of malice or anything - your parrot is a flock animal, you are his flock, and he is trying to get his flock to be with him. So:
He screams - you look at him.
He screams a bit more - you go over to him, talk to him and make a fuss of him.
You go away, but he knows that if he screams again, he can get you to come back.
You've stopped looking at him (rewarding him) and he's quietened down because he's not getting that reward. It's important to be consistent and to not look at him when he screams; if you ignore him some of the time and reward him some of the time, he's going to scream in the hope he does get a reward.
It's important to reward him when he is being quiet. If he's quiet, then look at him and go up to his cage to talk to him, but step away if he starts screaming.
It's also important to ensure that he's not lonely or bored. If there's a quiet contact sound he makes, encourage it by responding when he makes that call. You can respond with just a "hi" or "hey bird" - I actually find myself mimicking Leia's sound. Birds are flock animals and it's not natural for them to be shut away from the rest of their flock. They get stressed if they're kept away from us, and they call to at least make sure their flock is within hearing distance.
If you can, include him in what you're doing - either have him out of the cage or, if he's in the cage, just chat to him. Leia's cage is by my desk and I just tell her what I'm up to.