Make a beep than hang up

I have a working click to call application on my company page, and i want to exclude nonexistent phone numbers.
I want to check if some phone numbers is in function. It is possible with asterisk, to make only a call for 2sec. (only a short beep if it is possible) and write in a log if number exist or not? I think a short agi script, or call file…

Thank u!

It is possible, but it might not be legal.

Thank u for reply!
which country which law is prohibit this?
Can u make a description how i can make this?

The UK has either laws or industry codes of practice against excessive silent calls. Most calls to a human should end up in a speech connection.

Ok! Thank u!