In the book, even during war time, service is for a set period (2 years, IIRC) and completely voluntary, you're permitted to quit at any point and time right up to the point of actually entering combat, and thence immediately after. There is a regular military, who serve for longer, but the voluntary aspect of service is a fundamental aspect of the deal. Heinlein was pretty thoroughly anti-conscription or forced servitude generally, although he was a huge proponent of military service.
“I also think there are prices too high to pay to save the United States. Conscription is one of them. Conscription is slavery, and I don't think that any people or nation has a right to save itself at the price of slavery for anyone, no matter what name it is called. We have had the draft for twenty years now; I think this is shameful. If a country can't save itself through the volunteer service of its own free people, then I say: Let the damned thing go down the drain!” Robert Heinlein