There are three possible endings you can unlock by fulfilling certain requirements.
Only one of these endings will unlock the bonus mission.
Below is a list of all three endings and the requirements needed to unlock each one...
1: If Sam saves the cruise ship, CIA Agent Hisham, and Lambert, or only two out of three with NSA trust above 33%, then he evades capture and escapes the compound of the final JBA mission(which unlocks the bonus level).
2: If Sam only saves one out of three, or two out of three with NSA trust below 33%, then he is captured by the NYPD, charged with murder and conspiracy to commit terrorism, and pleads 'not guilty'. Before his trial begins, however, Sam breaks out of prison and goes on the run.
3: If Sam does not save any of the three, or only one with NSA trust below 33%, he is initially captured by the NYPD, but escapes using a smoke grenade.