That "pinging" or "dwoop" noise you hear after ignoring a spam call is a common occurrence and is related to how automated dialing systems work.
Here is the most likely explanation:
Autodialer System: Spammers often use autodialers (or predictive dialers) that dial many numbers at once and use software to detect when a human answers, as opposed to a busy signal or a long answering machine message.
The "Ping": The sound you hear is often a signal generated by their system, sometimes called a line connect tone or similar sound. It's meant for the dialer's internal system or the agent's headset to indicate that a connection has been made and a person may be on the line.
A System Glitch: When you ignore the call, hang up immediately, or your phone sends an immediate "decline" signal, the autodialer is trying to process that event. The "ping" you hear is likely the sound bleeding through as the system attempts to connect or registers that the call was answered/rejected and is dropping the line.
In short, it's generally a byproduct of the spammer's automated equipment trying to manage a high volume of calls. It's not usually a sign of a virus or anything wrong with your phone.