Thanks for the reply.
FusionPBX 5.3.8, Switch Version 1.10.12 (64bit)
the current user_record dialplan was working okay but not when a call was routed to extension from ivr menu digit options.
For this, i added the record_session variable from false to true and disabled the api_on_answer, but that caused every call to record even failed one and every ring users.
So i reverted to original setup of user_record dialplan and instead of set api_on_answer, i used export suggested by AI and now every recording works as old version worked.
AI suggested that api_on_answer works if call is answered but in IVR, call is already answered thus record was not working