Britain's four major broadcasters announced the order in which they will screen three proposed debates, which was decided by drawing lots.
ITV won the right to stage the first debate, scheduled for April 2, which will pitch Mr Cameron and Mr Miliband against Liberal Democrat Nick Clegg, Ukip's Nigel Farage, the Greens' Natalie Bennett, the Scottish National Party's Nicola Sturgeon and Leanne Wood of Plaid Cymru.
The same line-up of seven leaders have been invited to take part in the second debate, a fortnight later on April 16, which will be hosted by the BBC.
And the final showdown between the two men most likely to emerge from the general election as prime minister has been scheduled for April 30 on Sky News and Channel 4.
Mr Cameron has yet to confirm whether he will take part in any or all of the debates, having expressed concern at the exclusion of the Democratic Unionist Party from the format proposed by the broadcasters. However, the TV companies have indicated their determination to go ahead with the broadcasts in the absence of any leader not willing to take part.
Liberal Democrats have voiced dissatisfaction with the proposal to exclude Mr Clegg from the third debate.
Labour's election strategy chief Douglas Alexander confirmed that Mr Miliband will take part in the April 30 head-to-head debate and challenged Mr Cameron to commit himself to turning up.
In a letter to Conservative chairman Grant Shapps, Mr Alexander wrote: "I am happy to confirm on Mr Miliband's behalf that he will turn up to debate on April 30. Can you today confirm that Mr Cameron will be there too?
"Failure to answer this question will lead many to conclude that you and Mr Cameron are reluctant to give the British people the chance to make up their own minds.
"The broadcasters have set the date. The invitation is in the post. The only question remaining is whether David Cameron is willing to go head-to-head with Ed Miliband."
Electoral Reform Society deputy chief executive Darren Hughes said: "We welcome today's agreement by the broadcasters as another important step forward in getting the TV debates which the British public deserve.
"But it's now up to the parties to commit, once and for all, to taking part. The time for negotiation is over. The debates must go on as planned, with no excuses and no backing out. That would be an insult to democracy.
"We want to see all the invited party leaders do the right thing and confirm that they will take part in the debates. The British public deserve the opportunity to hold the main party leaders to account in the run-up to the election, especially the parties that could form a government after May. Now is the time for commitment, not copping out."