Asterisk Call Ringing Status Save

How to hung up the call when the dial number status is ringing on first ring.
I want to hang up the call on first ring and save that logs.

You can’t, because the caller doesn’t know exactly where the callee is in the ringing process; ringback tone does not reflect the actual ringing, and may not even exist beyond calling phone instrument. Also note that many providers will block or surcharge users who make large numbers of short and unanswered calls.

The closest you an get is to specify a timeout, on Dial, that is normally sufficient for, at least one ring.

There are options for CDRs to log unanswered calls.