You go to a domestic flight, so yes, for sure you must clear immigration. And for sure need a VoA (otherwise you need it in DPS anyway) I would count on the whole shebang - collecting and rechecking bags included, in what I assume is a self-connection. Make sure you have plenty of time, you are not protected if the first flight is late. With self-connections I usually put a night in between. In this case you probably can take a bet - take 4 hours in between for instance, and if your Qatar flight is hopelessly late the worst damage is buying a new ticket CGK-DPS, a route with plenty of flights.