Sorry... You can't really bring it to a screeching halt. Ah... The torture the students give their teachers :)
Cockatiels show how happy they are with the noises they make, and this is it's way of fitting into the "flock" when they make the same noises that you, as a flock member, do.
If you teach it something else- like a softer "ooo-ooh" sound and reinforce it (repeat it) when he whistles this tune you taught him, there is a chance you can get him to forget the whistle, but it is not guaranteed. Just make sure it is a noise that is not constantly made (like the ringing of the phone or a Nextel/Verizon 2-way beep) so it won't be used again.
I had this problem, so I taught my male cockatiel the Star Wars Darth Vader theme. He sings this constantly instead of trying to sound like a regular ringing telephone, but now he's starting to make a noise like the beep of my Nextel because it is a fairly constant sound in my home.
If anything, be happy he's making this noise. This means he's happy to have you as his companion :)
Please DO NOT USE A SQUIRT GUN OR BOTTLE TO PUNISH A BIRD. Most owners use this as a method to bathe thier birds, and it is harsh to a bird to use it as a method of distraction as such. They have VERY thin skin and may bruise easily if it is at a high power.
You would never want a bird to be afraid of water- a squirt bottle is the easiest way to bathe a bird, cool them in summer and administer remidies for scratches and cuts if you cannot handle them.
Don't scream to get them to stop. This is a positive reinforcement- they are getting a reaction to the whistle, and may keep doing it to get you to scream- and the last thing you need to a parrot to mimic you yelling cursewords. Grandma would have a heart attack.
Throwing things does not help either. You scare the bird, can stress them out, and can end up with more problems then just an annoying whistle; they may end up with plucking or biting behaviors because they are afraid of you, or because you have made them upset. If you were in the spotlight on American Idol, you wouldn't want someone throwing a shoe at you, would you? It's quite the selfesteem killer.