Initial treatment is directed at controlling the ventricular rate, most often with a calcium channel blocker, a beta blocker, or digoxin . Medical or electrical cardioversion to restore sinus rhythm is the next step in patients who remain in atrial fibrillation.